summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2018-03-14 09:51:23 +1100
committerTimothy Arceri <[email protected]>2018-03-20 14:19:35 +1100
commit632d5e97efa3d38155d290fa397af7a729de8682 (patch)
tree07545b8f52696ef2a9c0d69e148c857e7575df84 /src/mesa/state_tracker
parent231333a20d88336cd0474c573b46a2509b43245e (diff)
st/radeonsi: enable uniform packing in NIR backend
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r--src/mesa/state_tracker/st_glsl_to_nir.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/mesa/state_tracker/st_glsl_to_nir.cpp b/src/mesa/state_tracker/st_glsl_to_nir.cpp
index 9006650517b..2eb2ece5b16 100644
--- a/src/mesa/state_tracker/st_glsl_to_nir.cpp
+++ b/src/mesa/state_tracker/st_glsl_to_nir.cpp
@@ -753,14 +753,8 @@ st_finalize_nir(struct st_context *st, struct gl_program *prog,
st_nir_assign_uniform_locations(st->ctx, prog, shader_program,
&nir->uniforms, &nir->num_uniforms);
- /* Below is a quick hack so that uniform lowering only runs on radeonsi
- * (the only NIR backend that currently supports tess) once we enable
- * uniform packing support we will just use
- * ctx->Const.PackedDriverUniformStorage for this check.
- */
- if (screen->get_shader_param(screen, PIPE_SHADER_TESS_CTRL,
- PIPE_SHADER_CAP_MAX_INSTRUCTIONS) > 0) {
- NIR_PASS_V(nir, nir_lower_io, nir_var_uniform, type_size,
+ if (st->ctx->Const.PackedDriverUniformStorage) {
+ NIR_PASS_V(nir, nir_lower_io, nir_var_uniform, st_glsl_type_dword_size,
(nir_lower_io_options)0);
NIR_PASS_V(nir, st_nir_lower_uniforms_to_ubo, prog->Parameters);
}