From: Kenneth Graunke Date: Wed, 9 Nov 2011 09:09:03 +0000 (-0800) Subject: i965: Don't try to normalize cubemap coordinates for textureSize. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b618e788976b0391fe28987537f7789e91f957a5;p=mesa.git i965: Don't try to normalize cubemap coordinates for textureSize. Although textureSize is represented as an ir_texture with op == ir_txs, it doesn't have a coordinate, so normalizing it doesn't make sense. Fixes crashes in oglconform glsl-bif-tex-size basic.samplerCube.* tests. Signed-off-by: Kenneth Graunke Reviewed-by: Eric Anholt --- diff --git a/src/mesa/drivers/dri/i965/brw_cubemap_normalize.cpp b/src/mesa/drivers/dri/i965/brw_cubemap_normalize.cpp index 37f6d11c9fc..9e149f96f53 100644 --- a/src/mesa/drivers/dri/i965/brw_cubemap_normalize.cpp +++ b/src/mesa/drivers/dri/i965/brw_cubemap_normalize.cpp @@ -51,6 +51,9 @@ brw_cubemap_normalize_visitor::visit_leave(ir_texture *ir) if (ir->sampler->type->sampler_dimensionality != GLSL_SAMPLER_DIM_CUBE) return visit_continue; + if (ir->op == ir_txs) + return visit_continue; + void *mem_ctx = ralloc_parent(ir); ir_variable *var = new(mem_ctx) ir_variable(ir->coordinate->type,