summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/tgsi
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2019-03-21 14:15:43 +1000
committerDave Airlie <[email protected]>2019-03-22 09:30:26 +1000
commit8dc8b1361ad39feb89220944daf1a35d0f332b11 (patch)
tree7f2301cd1526aec195cc69019e87a3513f806ca0 /src/gallium/auxiliary/tgsi
parent7b7cb1bc35cf9ec5d0acb9dd6ea8d7da95c962cb (diff)
softpipe: handle 32-bit bitfield inserts
Fixes piglits if ARB_gpu_shader5 is enabled Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/tgsi')
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_exec.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_exec.c b/src/gallium/auxiliary/tgsi/tgsi_exec.c
index f66df18c7f5..5f55de0390c 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_exec.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_exec.c
@@ -4967,10 +4967,14 @@ micro_bfi(union tgsi_exec_channel *dst,
{
int i;
for (i = 0; i < 4; i++) {
- int width = src3->u[i] & 0x1f;
+ int width = src3->u[i];
int offset = src2->u[i] & 0x1f;
- int bitmask = ((1 << width) - 1) << offset;
- dst->u[i] = ((src1->u[i] << offset) & bitmask) | (src0->u[i] & ~bitmask);
+ if (width == 32) {
+ dst->u[i] = src1->u[i];
+ } else {
+ int bitmask = ((1 << width) - 1) << offset;
+ dst->u[i] = ((src1->u[i] << offset) & bitmask) | (src0->u[i] & ~bitmask);
+ }
}
}