aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/brw_fs_nir.cpp
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2015-09-29 14:07:20 -0700
committerJason Ekstrand <[email protected]>2015-10-02 14:19:39 -0700
commit03c4171b577b06b1d8dde50b6eb9507d8ef4c1ce (patch)
tree68496cb85f98e420a0f9c62555c067a586d699a5 /src/mesa/drivers/dri/i965/brw_fs_nir.cpp
parent390b48fc4a9836b563560581fbfb4833546de0c8 (diff)
i965/nir: Pull common ARB program uniform handling into a common function
The way we deal with ARB program uniforms is basically the same in both the vec4 and the fs backend. This commit takes the best parts of both implementations and pulls the common code into a shared helper function. 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.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp
index d33e452f34d..3ba6a67c0c1 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp
@@ -196,14 +196,8 @@ fs_visitor::nir_setup_uniforms(nir_shader *shader)
param_size[var->data.driver_location] = type_size_scalar(var->type);
}
} else {
- /* prog_to_nir only creates a single giant uniform variable so we can
- * just set param up directly. */
- for (unsigned p = 0; p < prog->Parameters->NumParameters; p++) {
- for (unsigned int i = 0; i < 4; i++) {
- stage_prog_data->param[4 * p + i] =
- &prog->Parameters->ParameterValues[p][i];
- }
- }
+ brw_nir_setup_arb_uniforms(shader, prog, stage_prog_data);
+
if(prog->Parameters->NumParameters > 0)
param_size[0] = prog->Parameters->NumParameters * 4;
}