summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorKarol Herbst <[email protected]>2018-12-04 16:40:30 +0100
committerKarol Herbst <[email protected]>2019-01-21 00:17:18 +0100
commit0a793c78a35ecadad088e34fcc1088f5126e636d (patch)
tree8f4c6127d741fdf5ec6e22972bc86d2a226e5b50 /src/gallium
parent4125211e9c46a3b6f3eb82ded7a57a1a07e0fe02 (diff)
nir: add bit_size parameter to system values with multiple allowed bit sizes
v2: add assert to verify we have at least one valid bit_size v3: fix use of load_front_face in nir_lower_two_sided_color and tgsi_to_nir Signed-off-by: Karol Herbst <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/auxiliary/nir/tgsi_to_nir.c2
-rw-r--r--src/gallium/drivers/vc4/vc4_nir_lower_blend.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/gallium/auxiliary/nir/tgsi_to_nir.c b/src/gallium/auxiliary/nir/tgsi_to_nir.c
index 000109621d8..10e24387849 100644
--- a/src/gallium/auxiliary/nir/tgsi_to_nir.c
+++ b/src/gallium/auxiliary/nir/tgsi_to_nir.c
@@ -516,7 +516,7 @@ ttn_src_for_file_and_index(struct ttn_compile *c, unsigned file, unsigned index,
c->scan->input_semantic_name[index] == TGSI_SEMANTIC_FACE) {
nir_ssa_def *tgsi_frontface[4] = {
nir_bcsel(&c->build,
- nir_load_front_face(&c->build),
+ nir_load_front_face(&c->build, 1),
nir_imm_float(&c->build, 1.0),
nir_imm_float(&c->build, -1.0)),
nir_imm_float(&c->build, 0.0),
diff --git a/src/gallium/drivers/vc4/vc4_nir_lower_blend.c b/src/gallium/drivers/vc4/vc4_nir_lower_blend.c
index 67ae05d4f61..ff6268f478a 100644
--- a/src/gallium/drivers/vc4/vc4_nir_lower_blend.c
+++ b/src/gallium/drivers/vc4/vc4_nir_lower_blend.c
@@ -100,7 +100,7 @@ vc4_blend_channel_f(nir_builder *b,
return nir_load_system_value(b,
nir_intrinsic_load_blend_const_color_r_float +
channel,
- 0);
+ 0, 32);
case PIPE_BLENDFACTOR_CONST_ALPHA:
return nir_load_blend_const_color_a_float(b);
case PIPE_BLENDFACTOR_ZERO:
@@ -118,7 +118,7 @@ vc4_blend_channel_f(nir_builder *b,
nir_load_system_value(b,
nir_intrinsic_load_blend_const_color_r_float +
channel,
- 0));
+ 0, 32));
case PIPE_BLENDFACTOR_INV_CONST_ALPHA:
return nir_fsub(b, nir_imm_float(b, 1.0),
nir_load_blend_const_color_a_float(b));