diff options
author | Jason Ekstrand <[email protected]> | 2015-09-30 17:37:36 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2015-10-02 14:19:39 -0700 |
commit | cdf314cb21377ee7caca05bd1abab6a2b921d213 (patch) | |
tree | 48b8aedf5d9a1e9a8a6ae036195c99666b85516a /src/mesa/drivers/dri/i965/brw_fs_nir.cpp | |
parent | 7fee8b6f055831bc070bb36d02a8b1c4d601652a (diff) |
i965/nir: Simplify uniform setup
Reviewed-by: Iago Toral Quiroga <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_fs_nir.cpp')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs_nir.cpp | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp index 829c663ec1d..eb0fe7b2856 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp @@ -185,20 +185,17 @@ fs_visitor::nir_setup_uniforms(nir_shader *shader) if (shader_prog) { brw_nir_setup_glsl_uniforms(shader, shader_prog, prog, stage_prog_data, true); - - foreach_list_typed(nir_variable, var, node, &shader->uniforms) { - /* UBO's and atomics don't take up space in the uniform file */ - if (var->interface_type != NULL || var->type->contains_atomic()) - continue; - - if(type_size_scalar(var->type) > 0) - param_size[var->data.driver_location] = type_size_scalar(var->type); - } } else { brw_nir_setup_arb_uniforms(shader, prog, stage_prog_data); + } + + foreach_list_typed(nir_variable, var, node, &shader->uniforms) { + /* UBO's and atomics don't take up space in the uniform file */ + if (var->interface_type != NULL || var->type->contains_atomic()) + continue; - if(prog->Parameters->NumParameters > 0) - param_size[0] = prog->Parameters->NumParameters * 4; + if (type_size_scalar(var->type) > 0) + param_size[var->data.driver_location] = type_size_scalar(var->type); } } |