summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/attrib.h
diff options
context:
space:
mode:
authorFrancisco Jerez <[email protected]>2016-02-26 17:12:27 -0800
committerFrancisco Jerez <[email protected]>2016-03-06 12:22:40 -0800
commitff7a2b489e6a8f3f63f71f36cd63d91cd81c326d (patch)
treeff3803b21036c877bc9be5f8d3cbd0442da43b49 /src/mesa/main/attrib.h
parent537d3df97466835ad6438fe2c9121283e0da1bcd (diff)
i965: Add support for swizzling arbitrary immediates to (brw_)swizzle().
Scalar immediates used to be handled correctly by swizzle() (as the identity) but since commit 58fa9d47b536403c4e3ca5d6a2495691338388fd it will corrupt the contents of the immediate. Vector immediates were never handled correctly, but we had ad-hoc code to swizzle VF immediates in the vec4 copy propagation pass. This takes care of swizzling V and UV in addition. v2: Don't implement swizzling of V/UV immediates (Matt). If you need to swizzle an integer vector immediate in the future apply the following diff to go back to v1: --- a/src/mesa/drivers/dri/i965/brw_eu.c +++ b/src/mesa/drivers/dri/i965/brw_eu.c @@ -119,11 +119,10 @@ brw_swap_cmod(uint32_t cmod) static unsigned imm_shift(enum brw_reg_type type, unsigned i) { - assert(type != BRW_REGISTER_TYPE_UV && type != BRW_REGISTER_TYPE_V && - "Not implemented."); - if (type == BRW_REGISTER_TYPE_VF) return 8 * (i & 3); + else if (type == BRW_REGISTER_TYPE_UV || type == BRW_REGISTER_TYPE_V) + return 4 * (i & 7); else return 0; } Reviewed-by: Iago Toral Quiroga <[email protected]>
Diffstat (limited to 'src/mesa/main/attrib.h')
0 files changed, 0 insertions, 0 deletions