LLVMArrayType(LLVMPointerType(LLVMFloatTypeInContext(lc), 0), LP_MAX_TGSI_CONST_BUFFERS);
elem_types[LP_JIT_CTX_NUM_CONSTANTS] =
LLVMArrayType(LLVMInt32TypeInContext(lc), LP_MAX_TGSI_CONST_BUFFERS);
- elem_types[LP_JIT_CTX_ALPHA_REF] = LLVMFloatTypeInContext(lc);
- elem_types[LP_JIT_CTX_STENCIL_REF_FRONT] =
- elem_types[LP_JIT_CTX_STENCIL_REF_BACK] = LLVMInt32TypeInContext(lc);
- elem_types[LP_JIT_CTX_U8_BLEND_COLOR] = LLVMPointerType(LLVMInt8TypeInContext(lc), 0);
- elem_types[LP_JIT_CTX_F_BLEND_COLOR] = LLVMPointerType(LLVMFloatTypeInContext(lc), 0);
- elem_types[LP_JIT_CTX_VIEWPORTS] = LLVMPointerType(viewport_type, 0);
elem_types[LP_JIT_CTX_TEXTURES] = LLVMArrayType(texture_type,
PIPE_MAX_SHADER_SAMPLER_VIEWS);
elem_types[LP_JIT_CTX_SAMPLERS] = LLVMArrayType(sampler_type,
PIPE_MAX_SAMPLERS);
elem_types[LP_JIT_CTX_IMAGES] = LLVMArrayType(image_type,
PIPE_MAX_SHADER_IMAGES);
+ elem_types[LP_JIT_CTX_ALPHA_REF] = LLVMFloatTypeInContext(lc);
+ elem_types[LP_JIT_CTX_STENCIL_REF_FRONT] =
+ elem_types[LP_JIT_CTX_STENCIL_REF_BACK] = LLVMInt32TypeInContext(lc);
+ elem_types[LP_JIT_CTX_U8_BLEND_COLOR] = LLVMPointerType(LLVMInt8TypeInContext(lc), 0);
+ elem_types[LP_JIT_CTX_F_BLEND_COLOR] = LLVMPointerType(LLVMFloatTypeInContext(lc), 0);
+ elem_types[LP_JIT_CTX_VIEWPORTS] = LLVMPointerType(viewport_type, 0);
elem_types[LP_JIT_CTX_SSBOS] =
LLVMArrayType(LLVMPointerType(LLVMInt32TypeInContext(lc), 0), LP_MAX_TGSI_SHADER_BUFFERS);
elem_types[LP_JIT_CTX_NUM_SSBOS] =
LP_CHECK_MEMBER_OFFSET(struct lp_jit_context, num_constants,
gallivm->target, context_type,
LP_JIT_CTX_NUM_CONSTANTS);
+ LP_CHECK_MEMBER_OFFSET(struct lp_jit_context, textures,
+ gallivm->target, context_type,
+ LP_JIT_CTX_TEXTURES);
+ LP_CHECK_MEMBER_OFFSET(struct lp_jit_context, samplers,
+ gallivm->target, context_type,
+ LP_JIT_CTX_SAMPLERS);
+ LP_CHECK_MEMBER_OFFSET(struct lp_jit_context, images,
+ gallivm->target, context_type,
+ LP_JIT_CTX_IMAGES);
LP_CHECK_MEMBER_OFFSET(struct lp_jit_context, alpha_ref_value,
gallivm->target, context_type,
LP_JIT_CTX_ALPHA_REF);
LP_CHECK_MEMBER_OFFSET(struct lp_jit_context, viewports,
gallivm->target, context_type,
LP_JIT_CTX_VIEWPORTS);
- LP_CHECK_MEMBER_OFFSET(struct lp_jit_context, textures,
- gallivm->target, context_type,
- LP_JIT_CTX_TEXTURES);
- LP_CHECK_MEMBER_OFFSET(struct lp_jit_context, samplers,
- gallivm->target, context_type,
- LP_JIT_CTX_SAMPLERS);
- LP_CHECK_MEMBER_OFFSET(struct lp_jit_context, images,
- gallivm->target, context_type,
- LP_JIT_CTX_IMAGES);
LP_CHECK_MEMBER_OFFSET(struct lp_jit_context, ssbos,
gallivm->target, context_type,
LP_JIT_CTX_SSBOS);
const float *constants[LP_MAX_TGSI_CONST_BUFFERS];
int num_constants[LP_MAX_TGSI_CONST_BUFFERS];
+ 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];
+
float alpha_ref_value;
uint32_t stencil_ref_front, stencil_ref_back;
struct lp_jit_viewport *viewports;
- 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];
};
enum {
LP_JIT_CTX_CONSTANTS = 0,
LP_JIT_CTX_NUM_CONSTANTS,
+ LP_JIT_CTX_TEXTURES,
+ LP_JIT_CTX_SAMPLERS,
+ LP_JIT_CTX_IMAGES,
LP_JIT_CTX_ALPHA_REF,
LP_JIT_CTX_STENCIL_REF_FRONT,
LP_JIT_CTX_STENCIL_REF_BACK,
LP_JIT_CTX_U8_BLEND_COLOR,
LP_JIT_CTX_F_BLEND_COLOR,
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
#define lp_jit_context_num_constants(_gallivm, _ptr) \
lp_build_struct_get_ptr(_gallivm, _ptr, LP_JIT_CTX_NUM_CONSTANTS, "num_constants")
+#define lp_jit_context_textures(_gallivm, _ptr) \
+ lp_build_struct_get_ptr(_gallivm, _ptr, LP_JIT_CTX_TEXTURES, "textures")
+
+#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_alpha_ref_value(_gallivm, _ptr) \
lp_build_struct_get(_gallivm, _ptr, LP_JIT_CTX_ALPHA_REF, "alpha_ref_value")
#define lp_jit_context_viewports(_gallivm, _ptr) \
lp_build_struct_get(_gallivm, _ptr, LP_JIT_CTX_VIEWPORTS, "viewports")
-#define lp_jit_context_textures(_gallivm, _ptr) \
- lp_build_struct_get_ptr(_gallivm, _ptr, LP_JIT_CTX_TEXTURES, "textures")
-
-#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")