diff options
author | Timothy Arceri <[email protected]> | 2016-11-05 09:24:51 +1100 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2017-01-06 11:21:41 +1100 |
commit | f62eb6c7eb22cd97c691ebdb5f25eb5fe8e9ed11 (patch) | |
tree | 6ffcf849dfef0c490d475a880a8208a4ab2fbf9b /src/mesa/state_tracker | |
parent | 0e7eec1ab5f27ced1aa4b2d77c2c63512d299694 (diff) |
st/mesa/glsl/i965: set num_ssbos directly in shader_info
Here we also remove the duplicate field in gl_linked_shader and always
get the value from shader_info instead.
Reviewed-by: Lionel Landwerlin <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r-- | src/mesa/state_tracker/st_atom_storagebuf.c | 10 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/mesa/state_tracker/st_atom_storagebuf.c b/src/mesa/state_tracker/st_atom_storagebuf.c index 1b6ed99e54a..d01688cd649 100644 --- a/src/mesa/state_tracker/st_atom_storagebuf.c +++ b/src/mesa/state_tracker/st_atom_storagebuf.c @@ -53,7 +53,7 @@ st_bind_ssbos(struct st_context *st, struct gl_linked_shader *shader, c = &st->ctx->Const.Program[shader->Stage]; - for (i = 0; i < shader->NumShaderStorageBlocks; i++) { + for (i = 0; i < shader->Program->info.num_ssbos; i++) { struct gl_shader_storage_buffer_binding *binding; struct st_buffer_object *st_obj; struct pipe_shader_buffer *sb = &buffers[i]; @@ -80,13 +80,13 @@ st_bind_ssbos(struct st_context *st, struct gl_linked_shader *shader, } } st->pipe->set_shader_buffers(st->pipe, shader_type, c->MaxAtomicBuffers, - shader->NumShaderStorageBlocks, buffers); + shader->Program->info.num_ssbos, buffers); /* clear out any stale shader buffers */ - if (shader->NumShaderStorageBlocks < c->MaxShaderStorageBlocks) + if (shader->Program->info.num_ssbos < c->MaxShaderStorageBlocks) st->pipe->set_shader_buffers( st->pipe, shader_type, - c->MaxAtomicBuffers + shader->NumShaderStorageBlocks, - c->MaxShaderStorageBlocks - shader->NumShaderStorageBlocks, + c->MaxAtomicBuffers + shader->Program->info.num_ssbos, + c->MaxShaderStorageBlocks - shader->Program->info.num_ssbos, NULL); } diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp index 393d66820d8..b4ccc5f0525 100644 --- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp +++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp @@ -6645,7 +6645,7 @@ set_affected_state_flags(uint64_t *states, if (prog->info.num_ubos) *states |= new_ubos; - if (shader->NumShaderStorageBlocks) + if (prog->info.num_ssbos) *states |= new_ssbos; if (prog->info.num_abos) |