diff options
Diffstat (limited to 'src/panfrost')
-rw-r--r-- | src/panfrost/midgard/compiler.h | 5 | ||||
-rw-r--r-- | src/panfrost/midgard/midgard_compile.c | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/src/panfrost/midgard/compiler.h b/src/panfrost/midgard/compiler.h index 79fe7dfc78a..59176f3c0ee 100644 --- a/src/panfrost/midgard/compiler.h +++ b/src/panfrost/midgard/compiler.h @@ -448,9 +448,12 @@ void emit_binary_bundle( struct util_dynarray *emission, int next_tag); -/* NIR stuff */ +/* NIR stuff. TODO: Move? Share? Something? */ bool nir_undef_to_zero(nir_shader *shader); +void +nir_clamp_psiz(nir_shader *shader, float min_size, float max_size); + #endif diff --git a/src/panfrost/midgard/midgard_compile.c b/src/panfrost/midgard/midgard_compile.c index 9c1349094bd..5eb61455a75 100644 --- a/src/panfrost/midgard/midgard_compile.c +++ b/src/panfrost/midgard/midgard_compile.c @@ -2596,8 +2596,10 @@ midgard_compile_shader_nir(nir_shader *nir, midgard_program *program, bool is_bl NIR_PASS_V(nir, nir_lower_vars_to_ssa); - if (ctx->stage == MESA_SHADER_VERTEX) + if (ctx->stage == MESA_SHADER_VERTEX) { NIR_PASS_V(nir, nir_lower_viewport_transform); + NIR_PASS_V(nir, nir_clamp_psiz, 1.0, 1024.0); + } NIR_PASS_V(nir, nir_lower_var_copies); NIR_PASS_V(nir, nir_lower_vars_to_ssa); |