summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gallium/auxiliary/draw/draw_llvm.c17
-rw-r--r--src/gallium/auxiliary/draw/draw_llvm.h15
-rw-r--r--src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline_llvm.c4
3 files changed, 11 insertions, 25 deletions
diff --git a/src/gallium/auxiliary/draw/draw_llvm.c b/src/gallium/auxiliary/draw/draw_llvm.c
index 20c9b7981ae..602839d0d44 100644
--- a/src/gallium/auxiliary/draw/draw_llvm.c
+++ b/src/gallium/auxiliary/draw/draw_llvm.c
@@ -189,18 +189,17 @@ create_jit_context_type(struct gallivm_state *gallivm,
{
LLVMTargetDataRef target = gallivm->target;
LLVMTypeRef float_type = LLVMFloatTypeInContext(gallivm->context);
- LLVMTypeRef elem_types[6];
+ LLVMTypeRef elem_types[5];
LLVMTypeRef context_type;
elem_types[0] = LLVMArrayType(LLVMPointerType(float_type, 0), /* vs_constants */
LP_MAX_TGSI_CONST_BUFFERS);
- elem_types[1] = elem_types[0]; /* gs_constants */
- elem_types[2] = LLVMPointerType(LLVMArrayType(LLVMArrayType(float_type, 4),
+ elem_types[1] = LLVMPointerType(LLVMArrayType(LLVMArrayType(float_type, 4),
DRAW_TOTAL_CLIP_PLANES), 0);
- elem_types[3] = LLVMPointerType(float_type, 0); /* viewport */
- elem_types[4] = LLVMArrayType(texture_type,
+ elem_types[2] = LLVMPointerType(float_type, 0); /* viewport */
+ elem_types[3] = LLVMArrayType(texture_type,
PIPE_MAX_SHADER_SAMPLER_VIEWS); /* textures */
- elem_types[5] = LLVMArrayType(sampler_type,
+ elem_types[4] = LLVMArrayType(sampler_type,
PIPE_MAX_SAMPLERS); /* samplers */
context_type = LLVMStructTypeInContext(gallivm->context, elem_types,
Elements(elem_types), 0);
@@ -212,12 +211,10 @@ create_jit_context_type(struct gallivm_state *gallivm,
LP_CHECK_MEMBER_OFFSET(struct draw_jit_context, vs_constants,
target, context_type, 0);
- LP_CHECK_MEMBER_OFFSET(struct draw_jit_context, gs_constants,
- target, context_type, 1);
LP_CHECK_MEMBER_OFFSET(struct draw_jit_context, planes,
- target, context_type, 2);
+ target, context_type, 1);
LP_CHECK_MEMBER_OFFSET(struct draw_jit_context, viewport,
- target, context_type, 3);
+ target, context_type, 2);
LP_CHECK_MEMBER_OFFSET(struct draw_jit_context, textures,
target, context_type,
DRAW_JIT_CTX_TEXTURES);
diff --git a/src/gallium/auxiliary/draw/draw_llvm.h b/src/gallium/auxiliary/draw/draw_llvm.h
index c9f125b1f63..c03c69e57b3 100644
--- a/src/gallium/auxiliary/draw/draw_llvm.h
+++ b/src/gallium/auxiliary/draw/draw_llvm.h
@@ -106,9 +106,6 @@ enum {
DRAW_JIT_VERTEX_DATA
};
-#define DRAW_JIT_CTX_TEXTURES 4
-#define DRAW_JIT_CTX_SAMPLERS 5
-
/**
* This structure is passed directly to the generated vertex shader.
*
@@ -123,7 +120,6 @@ enum {
struct draw_jit_context
{
const float *vs_constants[LP_MAX_TGSI_CONST_BUFFERS];
- const float *gs_constants[LP_MAX_TGSI_CONST_BUFFERS];
float (*planes) [DRAW_TOTAL_CLIP_PLANES][4];
float *viewport;
@@ -135,17 +131,14 @@ struct draw_jit_context
#define draw_jit_context_vs_constants(_gallivm, _ptr) \
lp_build_struct_get_ptr(_gallivm, _ptr, 0, "vs_constants")
-#define draw_jit_context_gs_constants(_gallivm, _ptr) \
- lp_build_struct_get_ptr(_gallivm, _ptr, 1, "gs_constants")
-
#define draw_jit_context_planes(_gallivm, _ptr) \
- lp_build_struct_get(_gallivm, _ptr, 2, "planes")
+ lp_build_struct_get(_gallivm, _ptr, 1, "planes")
#define draw_jit_context_viewport(_gallivm, _ptr) \
- lp_build_struct_get(_gallivm, _ptr, 3, "viewport")
+ lp_build_struct_get(_gallivm, _ptr, 2, "viewport")
-#define DRAW_JIT_CTX_TEXTURES 4
-#define DRAW_JIT_CTX_SAMPLERS 5
+#define DRAW_JIT_CTX_TEXTURES 3
+#define DRAW_JIT_CTX_SAMPLERS 4
#define draw_jit_context_textures(_gallivm, _ptr) \
lp_build_struct_get_ptr(_gallivm, _ptr, DRAW_JIT_CTX_TEXTURES, "textures")
diff --git a/src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline_llvm.c b/src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline_llvm.c
index 288b5242ae8..fab168c6d47 100644
--- a/src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline_llvm.c
+++ b/src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline_llvm.c
@@ -200,10 +200,6 @@ llvm_middle_end_bind_parameters(struct draw_pt_middle_end *middle)
fpme->llvm->jit_context.vs_constants[i] = draw->pt.user.vs_constants[i];
}
- for (i = 0; i < Elements(fpme->llvm->jit_context.gs_constants); ++i) {
- fpme->llvm->jit_context.gs_constants[i] = draw->pt.user.gs_constants[i];
- }
-
fpme->llvm->jit_context.planes =
(float (*)[DRAW_TOTAL_CLIP_PLANES][4]) draw->pt.user.planes[0];