diff options
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/main/mtypes.h | 17 | ||||
-rw-r--r-- | src/mesa/main/shaderapi.c | 7 |
2 files changed, 24 insertions, 0 deletions
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index 36d98eeef87..8d81aa1592c 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -2185,6 +2185,11 @@ struct gl_fragment_program struct gl_compute_program { struct gl_program Base; /**< base class */ + + /** + * Size specified using local_size_{x,y,z}. + */ + unsigned LocalSize[3]; }; @@ -2646,6 +2651,18 @@ struct gl_shader_program 0 if not present. */ } Vert; + /** + * Compute shader state - copied into gl_compute_program by + * _mesa_copy_linked_program_data(). + */ + struct { + /** + * If this shader contains a compute stage, size specified using + * local_size_{x,y,z}. Otherwise undefined. + */ + unsigned LocalSize[3]; + } Comp; + /* post-link info: */ unsigned NumUserUniformStorage; struct gl_uniform_storage *UniformStorage; diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c index 987c48aff34..571e13ca9b9 100644 --- a/src/mesa/main/shaderapi.c +++ b/src/mesa/main/shaderapi.c @@ -1846,6 +1846,13 @@ _mesa_copy_linked_program_data(gl_shader_stage type, dst_gp->UsesEndPrimitive = src->Geom.UsesEndPrimitive; } break; + case MESA_SHADER_COMPUTE: { + struct gl_compute_program *dst_cp = (struct gl_compute_program *) dst; + int i; + for (i = 0; i < 3; i++) + dst_cp->LocalSize[i] = src->Comp.LocalSize[i]; + } + break; default: break; } |