diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2017-12-31 07:12:27 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2017-12-31 07:12:27 +0000 |
commit | 051645c92924bf915d82bf219f2ed67309b5577a (patch) | |
tree | 4aae126dd8e5a18c6a9926a5468d1561e6038a07 /lib/mesa/src/gallium/drivers/swr/swr_context.h | |
parent | 2dae6fe6f74cf7fb9fd65285302c0331d9786b00 (diff) |
Merge Mesa 17.2.8
Diffstat (limited to 'lib/mesa/src/gallium/drivers/swr/swr_context.h')
-rw-r--r-- | lib/mesa/src/gallium/drivers/swr/swr_context.h | 46 |
1 files changed, 31 insertions, 15 deletions
diff --git a/lib/mesa/src/gallium/drivers/swr/swr_context.h b/lib/mesa/src/gallium/drivers/swr/swr_context.h index eecfe0d40..8bed78f86 100644 --- a/lib/mesa/src/gallium/drivers/swr/swr_context.h +++ b/lib/mesa/src/gallium/drivers/swr/swr_context.h @@ -24,6 +24,8 @@ #ifndef SWR_CONTEXT_H #define SWR_CONTEXT_H +#include "common/os.h" + #include "pipe/p_context.h" #include "pipe/p_state.h" #include "util/u_blitter.h" @@ -38,16 +40,18 @@ #define SWR_NEW_SAMPLER_VIEW (1 << 4) #define SWR_NEW_VS (1 << 5) #define SWR_NEW_FS (1 << 6) -#define SWR_NEW_VSCONSTANTS (1 << 7) -#define SWR_NEW_FSCONSTANTS (1 << 8) -#define SWR_NEW_VERTEX (1 << 9) -#define SWR_NEW_STIPPLE (1 << 10) -#define SWR_NEW_SCISSOR (1 << 11) -#define SWR_NEW_VIEWPORT (1 << 12) -#define SWR_NEW_FRAMEBUFFER (1 << 13) -#define SWR_NEW_CLIP (1 << 14) -#define SWR_NEW_SO (1 << 15) -#define SWR_NEW_ALL 0x0000ffff +#define SWR_NEW_GS (1 << 7) +#define SWR_NEW_VSCONSTANTS (1 << 8) +#define SWR_NEW_FSCONSTANTS (1 << 9) +#define SWR_NEW_GSCONSTANTS (1 << 10) +#define SWR_NEW_VERTEX (1 << 11) +#define SWR_NEW_STIPPLE (1 << 12) +#define SWR_NEW_SCISSOR (1 << 13) +#define SWR_NEW_VIEWPORT (1 << 14) +#define SWR_NEW_FRAMEBUFFER (1 << 15) +#define SWR_NEW_CLIP (1 << 16) +#define SWR_NEW_SO (1 << 17) +#define SWR_LARGE_CLIENT_DRAW (1<<18) // Indicates client draw will block namespace std { @@ -83,16 +87,23 @@ struct swr_draw_context { uint32_t num_constantsVS[PIPE_MAX_CONSTANT_BUFFERS]; const float *constantFS[PIPE_MAX_CONSTANT_BUFFERS]; uint32_t num_constantsFS[PIPE_MAX_CONSTANT_BUFFERS]; + const float *constantGS[PIPE_MAX_CONSTANT_BUFFERS]; + uint32_t num_constantsGS[PIPE_MAX_CONSTANT_BUFFERS]; swr_jit_texture texturesVS[PIPE_MAX_SHADER_SAMPLER_VIEWS]; swr_jit_sampler samplersVS[PIPE_MAX_SAMPLERS]; swr_jit_texture texturesFS[PIPE_MAX_SHADER_SAMPLER_VIEWS]; swr_jit_sampler samplersFS[PIPE_MAX_SAMPLERS]; + swr_jit_texture texturesGS[PIPE_MAX_SHADER_SAMPLER_VIEWS]; + swr_jit_sampler samplersGS[PIPE_MAX_SAMPLERS]; float userClipPlanes[PIPE_MAX_CLIP_PLANES][4]; + uint32_t polyStipple[32]; + SWR_SURFACE_STATE renderTargets[SWR_NUM_ATTACHMENTS]; - void *pStats; + struct swr_query_result *pStats; // @llvm_struct + SWR_INTERFACE *pAPI; // @llvm_struct - Needed for the swr_memory callbacks }; /* gen_llvm_types FINI */ @@ -110,6 +121,7 @@ struct swr_context { struct swr_vertex_shader *vs; struct swr_fragment_shader *fs; + struct swr_geometry_shader *gs; struct swr_vertex_element_state *velems; /** Other rendering state */ @@ -119,7 +131,7 @@ struct swr_context { struct pipe_constant_buffer constants[PIPE_SHADER_TYPES][PIPE_MAX_CONSTANT_BUFFERS]; struct pipe_framebuffer_state framebuffer; - struct pipe_poly_stipple poly_stipple; + struct swr_poly_stipple poly_stipple; struct pipe_scissor_state scissor; SWR_RECT swr_scissor; struct pipe_sampler_view * @@ -127,13 +139,12 @@ struct swr_context { struct pipe_viewport_state viewport; struct pipe_vertex_buffer vertex_buffer[PIPE_MAX_ATTRIBS]; - struct pipe_index_buffer index_buffer; struct blitter_context *blitter; /** Conditional query object and mode */ struct pipe_query *render_cond_query; - uint render_cond_mode; + enum pipe_render_cond_flag render_cond_mode; boolean render_cond_cond; unsigned active_queries; @@ -160,6 +171,8 @@ struct swr_context { struct swr_draw_context swrDC; unsigned dirty; /**< Mask of SWR_NEW_x flags */ + + SWR_INTERFACE api; }; static INLINE struct swr_context * @@ -173,7 +186,7 @@ swr_update_draw_context(struct swr_context *ctx, struct swr_query_result *pqr = nullptr) { swr_draw_context *pDC = - (swr_draw_context *)SwrGetPrivateContextState(ctx->swrContext); + (swr_draw_context *)ctx->api.pfnSwrGetPrivateContextState(ctx->swrContext); if (pqr) ctx->swrDC.pStats = pqr; memcpy(pDC, &ctx->swrDC, sizeof(swr_draw_context)); @@ -188,4 +201,7 @@ void swr_clear_init(struct pipe_context *pipe); void swr_draw_init(struct pipe_context *pipe); void swr_finish(struct pipe_context *pipe); + +void swr_do_msaa_resolve(struct pipe_resource *src_resource, + struct pipe_resource *dst_resource); #endif |