aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <[email protected]>2019-07-11 13:15:17 -0700
committerAlyssa Rosenzweig <[email protected]>2019-07-11 13:30:55 -0700
commitfe783c5b0c3d88dcdac6c9a46e9b5da007a7a516 (patch)
tree455561e596f45727c5bf4000c132cd2b82e4e5b1 /src
parentc4e6d759dd3a55de9c756f08407ed9af1018ac01 (diff)
pan/midgard: Correct component count clamping PSIZ
Kind of a funky corner case that does not (as far as I know) apply to organic shaders from GLES but does pop up in generated shaders from the fixed-function desktop pipeline. Fixes: bb483a91663f ("panfrost: Clamp point size") Signed-off-by: Alyssa Rosenzweig <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/panfrost/nir/nir_clamp_psiz.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/drivers/panfrost/nir/nir_clamp_psiz.c b/src/gallium/drivers/panfrost/nir/nir_clamp_psiz.c
index fb42406750b..249a400a19e 100644
--- a/src/gallium/drivers/panfrost/nir/nir_clamp_psiz.c
+++ b/src/gallium/drivers/panfrost/nir/nir_clamp_psiz.c
@@ -54,7 +54,8 @@ nir_clamp_psiz(nir_shader *shader, float min_size, float max_size)
nir_builder_init(&b, func->impl);
b.cursor = nir_before_instr(instr);
- nir_ssa_def *in_size = nir_ssa_for_src(&b, intr->src[1], 1);
+ nir_ssa_def *in_size = nir_ssa_for_src(&b, intr->src[1],
+ intr->num_components);
nir_ssa_def *clamped =
nir_fmin(&b,