glsl/standalone: Enable GLSL 4.00 through 4.50
[mesa.git] / src / compiler / glsl / lower_shared_reference.cpp
index 533cd9202f4a22e53dc5002c74c6a91320b9b806..091f4027320bcc63c821572202c33591c2e68b12 100644 (file)
@@ -51,7 +51,7 @@ class lower_shared_reference_visitor :
       public lower_buffer_access::lower_buffer_access {
 public:
 
-   lower_shared_reference_visitor(struct gl_shader *shader)
+   lower_shared_reference_visitor(struct gl_linked_shader *shader)
       : list_ctx(ralloc_context(NULL)), shader(shader), shared_size(0u)
    {
       list_inithead(&var_offsets);
@@ -88,7 +88,7 @@ public:
                          unsigned write_mask);
 
    void *list_ctx;
-   struct gl_shader *shader;
+   struct gl_linked_shader *shader;
    struct list_head var_offsets;
    unsigned shared_size;
    bool progress;
@@ -138,11 +138,11 @@ lower_shared_reference_visitor::handle_rvalue(ir_rvalue **rvalue)
    bool row_major;
    int matrix_columns;
    assert(var->get_interface_type() == NULL);
-   const unsigned packing = GLSL_INTERFACE_PACKING_STD430;
+   const enum glsl_interface_packing packing = GLSL_INTERFACE_PACKING_STD430;
 
-   setup_buffer_access(mem_ctx, var, deref,
+   setup_buffer_access(mem_ctx, deref,
                        &offset, &const_offset,
-                       &row_major, &matrix_columns, packing);
+                       &row_major, &matrix_columns, NULL, packing);
 
    /* Now that we've calculated the offset to the start of the
     * dereference, walk over the type and emit loads into a temporary.
@@ -206,11 +206,11 @@ lower_shared_reference_visitor::handle_assignment(ir_assignment *ir)
    bool row_major;
    int matrix_columns;
    assert(var->get_interface_type() == NULL);
-   const unsigned packing = GLSL_INTERFACE_PACKING_STD430;
+   const enum glsl_interface_packing packing = GLSL_INTERFACE_PACKING_STD430;
 
-   setup_buffer_access(mem_ctx, var, deref,
+   setup_buffer_access(mem_ctx, deref,
                        &offset, &const_offset,
-                       &row_major, &matrix_columns, packing);
+                       &row_major, &matrix_columns, NULL, packing);
 
    deref = new(mem_ctx) ir_dereference_variable(store_var);
 
@@ -365,12 +365,12 @@ lower_shared_reference_visitor::lower_shared_atomic_intrinsic(ir_call *ir)
    bool row_major;
    int matrix_columns;
    assert(var->get_interface_type() == NULL);
-   const unsigned packing = GLSL_INTERFACE_PACKING_STD430;
+   const enum glsl_interface_packing packing = GLSL_INTERFACE_PACKING_STD430;
    buffer_access_type = shared_atomic_access;
 
-   setup_buffer_access(mem_ctx, var, deref,
+   setup_buffer_access(mem_ctx, deref,
                        &offset, &const_offset,
-                       &row_major, &matrix_columns, packing);
+                       &row_major, &matrix_columns, NULL, packing);
 
    assert(offset);
    assert(!row_major);
@@ -475,7 +475,7 @@ lower_shared_reference_visitor::visit_enter(ir_call *ir)
 } /* unnamed namespace */
 
 void
-lower_shared_reference(struct gl_shader *shader, unsigned *shared_size)
+lower_shared_reference(struct gl_linked_shader *shader, unsigned *shared_size)
 {
    if (shader->Stage != MESA_SHADER_COMPUTE)
       return;