aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/brw_shader.cpp
diff options
context:
space:
mode:
authorChris Forbes <[email protected]>2013-10-08 22:09:28 +1300
committerChris Forbes <[email protected]>2013-10-26 21:54:15 +1300
commitbdcacaed9c64c49827d325d15ada2c482bfe1578 (patch)
tree42860a193338b0aaede5829e5020563aeb6dc2c4 /src/mesa/drivers/dri/i965/brw_shader.cpp
parent6bb2cf2107c4461ea9dd100edaf110b839311b90 (diff)
i965: relax brw_texture_offset assert
Some texturing ops are about to have nonconstant offset support; the offset in the header in these cases should be zero. Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_shader.cpp')
-rw-r--r--src/mesa/drivers/dri/i965/brw_shader.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_shader.cpp b/src/mesa/drivers/dri/i965/brw_shader.cpp
index 2fb43a6b4e6..df905fbc906 100644
--- a/src/mesa/drivers/dri/i965/brw_shader.cpp
+++ b/src/mesa/drivers/dri/i965/brw_shader.cpp
@@ -372,9 +372,14 @@ brw_math_function(enum opcode op)
}
uint32_t
-brw_texture_offset(ir_constant *offset)
+brw_texture_offset(struct gl_context *ctx, ir_constant *offset)
{
- assert(offset != NULL);
+ /* If the driver does not support GL_ARB_gpu_shader5, the offset
+ * must be constant.
+ */
+ assert(offset != NULL || ctx->Extensions.ARB_gpu_shader5);
+
+ if (!offset) return 0; /* nonconstant offset; caller will handle it. */
signed char offsets[3];
for (unsigned i = 0; i < offset->type->vector_elements; i++)