anv/apply_pipeline_layout: Multiply uniform sizes by 4
authorJason Ekstrand <jason.ekstrand@intel.com>
Fri, 11 Dec 2015 06:36:47 +0000 (22:36 -0800)
committerJason Ekstrand <jason.ekstrand@intel.com>
Fri, 11 Dec 2015 06:36:49 +0000 (22:36 -0800)
This is because uniforms are now in terms of bytes everywhere.

src/vulkan/anv_nir_apply_pipeline_layout.c

index 5a31b02ae4f89df5a8fcce3eb4f2766f6d3e61f3..96b9f21fd09dbb00de652557e7c23b6116a81394 100644 (file)
@@ -284,7 +284,7 @@ anv_nir_apply_pipeline_layout(nir_shader *shader,
                                                    var->data.binding, &state);
 
             var->data.driver_location = shader->num_uniforms +
-                                        image_index * BRW_IMAGE_PARAM_SIZE;
+                                        image_index * BRW_IMAGE_PARAM_SIZE * 4;
          }
       }
 
@@ -310,7 +310,7 @@ anv_nir_apply_pipeline_layout(nir_shader *shader,
       }
 
       shader->num_uniforms += layout->stage[shader->stage].image_count *
-                              BRW_IMAGE_PARAM_SIZE;
+                              BRW_IMAGE_PARAM_SIZE * 4;
    }
 
    return state.progress;