From: Brian Paul Date: Wed, 26 Aug 2009 17:05:04 +0000 (-0600) Subject: i965: clean up texture target switches X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f8b344114f4475ba267cbba320ab1c1d755d30a6;p=mesa.git i965: clean up texture target switches --- diff --git a/src/mesa/drivers/dri/i965/brw_wm_emit.c b/src/mesa/drivers/dri/i965/brw_wm_emit.c index 5f29ca1cd49..268f7965c00 100644 --- a/src/mesa/drivers/dri/i965/brw_wm_emit.c +++ b/src/mesa/drivers/dri/i965/brw_wm_emit.c @@ -735,10 +735,14 @@ static void emit_tex( struct brw_wm_compile *c, emit = WRITEMASK_XY; nr = 2; break; - default: + case TEXTURE_3D_INDEX: + case TEXTURE_CUBE_INDEX: emit = WRITEMASK_XYZ; nr = 3; break; + default: + /* unexpected target */ + abort(); } if (inst->tex_shadow) { @@ -810,11 +814,15 @@ static void emit_txb( struct brw_wm_compile *c, brw_MOV(p, brw_message_reg(4), arg[1]); brw_MOV(p, brw_message_reg(6), brw_imm_f(0)); break; - default: + case TEXTURE_3D_INDEX: + case TEXTURE_CUBE_INDEX: brw_MOV(p, brw_message_reg(2), arg[0]); brw_MOV(p, brw_message_reg(4), arg[1]); brw_MOV(p, brw_message_reg(6), arg[2]); break; + default: + /* unexpected target */ + abort(); } brw_MOV(p, brw_message_reg(8), arg[3]);