diff options
author | Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com> | 2021-05-05 12:24:44 -0700 |
---|---|---|
committer | Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com> | 2021-06-08 09:23:55 -0700 |
commit | 8af6766062044167fb3b61950ddbc7d67e4c3e48 (patch) | |
tree | 9d74934c90d19501867bfdc53dfd318d7e221114 /src/mesa/main | |
parent | b5f6fc442c1014e2e05f752d971a2276ae6cd13e (diff) |
nir: Move workgroup_size and workgroup_variable_size into common shader_info
Move it out the "cs" sub-struct, since these will be used for other
shader stages in the future.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11225>
Diffstat (limited to 'src/mesa/main')
-rw-r--r-- | src/mesa/main/compute.c | 6 | ||||
-rw-r--r-- | src/mesa/main/shaderapi.c | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/mesa/main/compute.c b/src/mesa/main/compute.c index 17aef1a433a..bcf2aaa78f5 100644 --- a/src/mesa/main/compute.c +++ b/src/mesa/main/compute.c @@ -89,7 +89,7 @@ validate_DispatchCompute(struct gl_context *ctx, const GLuint *num_groups) * program for the compute shader stage has a variable work group size." */ struct gl_program *prog = ctx->_Shader->CurrentProgram[MESA_SHADER_COMPUTE]; - if (prog->info.cs.workgroup_size_variable) { + if (prog->info.workgroup_size_variable) { _mesa_error(ctx, GL_INVALID_OPERATION, "glDispatchCompute(variable work group size forbidden)"); return GL_FALSE; @@ -113,7 +113,7 @@ validate_DispatchComputeGroupSizeARB(struct gl_context *ctx, * shader stage has a fixed work group size." */ struct gl_program *prog = ctx->_Shader->CurrentProgram[MESA_SHADER_COMPUTE]; - if (!prog->info.cs.workgroup_size_variable) { + if (!prog->info.workgroup_size_variable) { _mesa_error(ctx, GL_INVALID_OPERATION, "glDispatchComputeGroupSizeARB(fixed work group size " "forbidden)"); @@ -269,7 +269,7 @@ valid_dispatch_indirect(struct gl_context *ctx, GLintptr indirect) * compute shader stage has a variable work group size." */ struct gl_program *prog = ctx->_Shader->CurrentProgram[MESA_SHADER_COMPUTE]; - if (prog->info.cs.workgroup_size_variable) { + if (prog->info.workgroup_size_variable) { _mesa_error(ctx, GL_INVALID_OPERATION, "%s(variable work group size forbidden)", name); return GL_FALSE; diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c index 11f164dc93e..22f6c0cf708 100644 --- a/src/mesa/main/shaderapi.c +++ b/src/mesa/main/shaderapi.c @@ -935,7 +935,7 @@ get_programiv(struct gl_context *ctx, GLuint program, GLenum pname, } for (i = 0; i < 3; i++) params[i] = shProg->_LinkedShaders[MESA_SHADER_COMPUTE]-> - Program->info.cs.workgroup_size[i]; + Program->info.workgroup_size[i]; return; } case GL_PROGRAM_SEPARABLE: |