[Mesa-dev] [PATCH 9/9] i965: Use num_shared from nir_shader for shared variables size
Jordan Justen
jordan.l.justen at intel.com
Tue Mar 15 06:57:05 UTC 2016
Signed-off-by: Jordan Justen <jordan.l.justen at intel.com>
---
src/mesa/drivers/dri/i965/brw_cs.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/brw_cs.c b/src/mesa/drivers/dri/i965/brw_cs.c
index 0ab9ebd..9345ce8 100644
--- a/src/mesa/drivers/dri/i965/brw_cs.c
+++ b/src/mesa/drivers/dri/i965/brw_cs.c
@@ -71,7 +71,9 @@ brw_codegen_cs_prog(struct brw_context *brw,
memset(&prog_data, 0, sizeof(prog_data));
- if (prog->Comp.SharedSize > 64 * 1024) {
+ unsigned shared_size = cs->base.Program->nir->num_shared;
+
+ if (shared_size > 64 * 1024) {
prog->LinkStatus = false;
const char *error_str =
"Compute shader used more than 64KB of shared variables";
@@ -81,7 +83,7 @@ brw_codegen_cs_prog(struct brw_context *brw,
ralloc_free(mem_ctx);
return false;
} else {
- prog_data.base.total_shared = prog->Comp.SharedSize;
+ prog_data.base.total_shared = shared_size;
}
assign_cs_binding_table_offsets(brw->intelScreen->devinfo, prog,
--
2.7.0
More information about the mesa-dev
mailing list