diff options
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_jit.h')
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_jit.h | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_jit.h b/src/gallium/drivers/llvmpipe/lp_jit.h index 7868cf4eefa..81e0019a8b0 100644 --- a/src/gallium/drivers/llvmpipe/lp_jit.h +++ b/src/gallium/drivers/llvmpipe/lp_jit.h @@ -78,6 +78,16 @@ struct lp_jit_viewport }; +struct lp_jit_image +{ + uint32_t width; /* same as number of elements */ + uint32_t height; + uint32_t depth; + const void *base; + uint32_t row_stride; + uint32_t img_stride; +}; + enum { LP_JIT_TEXTURE_WIDTH = 0, LP_JIT_TEXTURE_HEIGHT, @@ -107,7 +117,15 @@ enum { LP_JIT_VIEWPORT_NUM_FIELDS /* number of fields above */ }; - +enum { + LP_JIT_IMAGE_WIDTH = 0, + LP_JIT_IMAGE_HEIGHT, + LP_JIT_IMAGE_DEPTH, + LP_JIT_IMAGE_BASE, + LP_JIT_IMAGE_ROW_STRIDE, + LP_JIT_IMAGE_IMG_STRIDE, + LP_JIT_IMAGE_NUM_FIELDS /* number of fields above */ +}; /** * This structure is passed directly to the generated fragment shader. * @@ -135,6 +153,7 @@ struct lp_jit_context struct lp_jit_texture textures[PIPE_MAX_SHADER_SAMPLER_VIEWS]; struct lp_jit_sampler samplers[PIPE_MAX_SAMPLERS]; + struct lp_jit_image images[PIPE_MAX_SHADER_IMAGES]; const uint32_t *ssbos[LP_MAX_TGSI_SHADER_BUFFERS]; int num_ssbos[LP_MAX_TGSI_SHADER_BUFFERS]; @@ -156,6 +175,7 @@ enum { LP_JIT_CTX_VIEWPORTS, LP_JIT_CTX_TEXTURES, LP_JIT_CTX_SAMPLERS, + LP_JIT_CTX_IMAGES, LP_JIT_CTX_SSBOS, LP_JIT_CTX_NUM_SSBOS, LP_JIT_CTX_COUNT @@ -192,6 +212,9 @@ enum { #define lp_jit_context_samplers(_gallivm, _ptr) \ lp_build_struct_get_ptr(_gallivm, _ptr, LP_JIT_CTX_SAMPLERS, "samplers") +#define lp_jit_context_images(_gallivm, _ptr) \ + lp_build_struct_get_ptr(_gallivm, _ptr, LP_JIT_CTX_IMAGES, "images") + #define lp_jit_context_ssbos(_gallivm, _ptr) \ lp_build_struct_get_ptr(_gallivm, _ptr, LP_JIT_CTX_SSBOS, "ssbos") |