[Mesa-dev] [PATCH 33/74] i965: handle visiting of ir_var_buffer variables

Iago Toral Quiroga itoral at igalia.com
Thu May 14 07:06:36 PDT 2015


---
 src/mesa/drivers/dri/i965/brw_fs_visitor.cpp   | 3 ++-
 src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp | 5 +++--
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
index 9c82aa3..a3c10cb 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
@@ -153,7 +153,8 @@ fs_visitor::visit(ir_variable *ir)
 	    this->output_components[output] = vector_elements;
 	 }
       }
-   } else if (ir->data.mode == ir_var_uniform) {
+   } else if (ir->data.mode == ir_var_uniform ||
+              ir->data.mode == ir_var_buffer) {
       int param_index = uniforms;
 
       /* Thanks to the lower_ubo_reference pass, we will see only
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
index 807e5df..4c83ecf 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
@@ -1053,11 +1053,12 @@ vec4_visitor::visit(ir_variable *ir)
       break;
 
    case ir_var_uniform:
+   case ir_var_buffer:
       reg = new(this->mem_ctx) dst_reg(UNIFORM, this->uniforms);
 
       /* Thanks to the lower_ubo_reference pass, we will see only
-       * ir_binop_ubo_load expressions and not ir_dereference_variable for UBO
-       * variables, so no need for them to be in variable_ht.
+       * ir_binop_{ubo,ssbo}_load expressions and not ir_dereference_variable
+       * for UBO/SSBO variables, so no need for them to be in variable_ht.
        *
        * Some uniforms, such as samplers and atomic counters, have no actual
        * storage, so we should ignore them.
-- 
1.9.1



More information about the mesa-dev mailing list