diff options
author | Ilia Mirkin <[email protected]> | 2016-11-09 22:08:24 -0500 |
---|---|---|
committer | Ilia Mirkin <[email protected]> | 2016-11-15 20:25:22 -0500 |
commit | 96291478ea2ab91df571ef6ebe26782ef90bf0c1 (patch) | |
tree | c62c88b497d32a615da0f0118d896fd690ae7580 /src/gallium | |
parent | 8c0f76e961ae023bbe7c8deed1abd04496e9691b (diff) |
swr: mark both frag and vert textures read, don't forget about cbs
Signed-off-by: Ilia Mirkin <[email protected]>
Reviewed-by: Bruce Cherniak <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/swr/swr_state.cpp | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/src/gallium/drivers/swr/swr_state.cpp b/src/gallium/drivers/swr/swr_state.cpp index 65327f39d02..526d7e7307d 100644 --- a/src/gallium/drivers/swr/swr_state.cpp +++ b/src/gallium/drivers/swr/swr_state.cpp @@ -674,11 +674,21 @@ swr_update_resource_status(struct pipe_context *pipe, } /* texture sampler views */ - for (uint32_t i = 0; i < PIPE_MAX_SHADER_SAMPLER_VIEWS; i++) { - struct pipe_sampler_view *view = - ctx->sampler_views[PIPE_SHADER_FRAGMENT][i]; - if (view) - swr_resource_read(view->texture); + for (uint32_t j : {PIPE_SHADER_VERTEX, PIPE_SHADER_FRAGMENT}) { + for (uint32_t i = 0; i < ctx->num_sampler_views[j]; i++) { + struct pipe_sampler_view *view = ctx->sampler_views[j][i]; + if (view) + swr_resource_read(view->texture); + } + } + + /* constant buffers */ + for (uint32_t j : {PIPE_SHADER_VERTEX, PIPE_SHADER_FRAGMENT}) { + for (uint32_t i = 0; i < PIPE_MAX_CONSTANT_BUFFERS; i++) { + struct pipe_constant_buffer *cb = &ctx->constants[j][i]; + if (cb->buffer) + swr_resource_read(cb->buffer); + } } } |