nir/info: Add compute shader local size to nir_shader_info

Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
This commit is contained in:
Jason Ekstrand
2015-10-08 15:02:25 -07:00
parent fe399f3a69
commit 4889c73dd1
2 changed files with 12 additions and 0 deletions
+8
View File
@@ -173,6 +173,14 @@ glsl_to_nir(const struct gl_shader_program *shader_prog,
shader->info.gs.invocations = sh->Geom.Invocations;
break;
case MESA_SHADER_COMPUTE: {
struct gl_compute_program *cp = (struct gl_compute_program *)sh->Program;
shader->info.cs.local_size[0] = cp->LocalSize[0];
shader->info.cs.local_size[1] = cp->LocalSize[1];
shader->info.cs.local_size[2] = cp->LocalSize[2];
break;
}
default:
break; /* No stage-specific info */
}
+4
View File
@@ -1501,6 +1501,10 @@ typedef struct nir_shader_info {
/** 1 .. MAX_GEOMETRY_SHADER_INVOCATIONS */
unsigned invocations;
} gs;
struct {
unsigned local_size[3];
} cs;
};
} nir_shader_info;