gallivm: fix indirect addressing of temps in soa mode
[mesa.git] / src / gallium / auxiliary / draw / draw_llvm.h
index 8df02a2b31089feb7728fc9f060a5a947b193b09..5909fc10a2d47d6700134fb28e37f8b999429e57 100644 (file)
@@ -130,18 +130,23 @@ struct draw_jit_context
    struct draw_jit_sampler samplers[PIPE_MAX_SAMPLERS];
 };
 
+enum {
+   DRAW_JIT_CTX_CONSTANTS   = 0,
+   DRAW_JIT_CTX_PLANES      = 1,
+   DRAW_JIT_CTX_VIEWPORT    = 2,
+   DRAW_JIT_CTX_TEXTURES    = 3,
+   DRAW_JIT_CTX_SAMPLERS    = 4,
+   DRAW_JIT_CTX_NUM_FIELDS
+};
 
 #define draw_jit_context_vs_constants(_gallivm, _ptr) \
-   lp_build_struct_get_ptr(_gallivm, _ptr, 0, "vs_constants")
+   lp_build_struct_get_ptr(_gallivm, _ptr, DRAW_JIT_CTX_CONSTANTS, "vs_constants")
 
 #define draw_jit_context_planes(_gallivm, _ptr) \
-   lp_build_struct_get(_gallivm, _ptr, 1, "planes")
+   lp_build_struct_get(_gallivm, _ptr, DRAW_JIT_CTX_PLANES, "planes")
 
 #define draw_jit_context_viewport(_gallivm, _ptr) \
-   lp_build_struct_get(_gallivm, _ptr, 2, "viewport")
-
-#define DRAW_JIT_CTX_TEXTURES 3
-#define DRAW_JIT_CTX_SAMPLERS 4
+   lp_build_struct_get(_gallivm, _ptr, DRAW_JIT_CTX_VIEWPORT, "viewport")
 
 #define draw_jit_context_textures(_gallivm, _ptr) \
    lp_build_struct_get_ptr(_gallivm, _ptr, DRAW_JIT_CTX_TEXTURES, "textures")