zink: rename zink_context::*image_views -> sampler_views

this is wrongly named and conflicts with things that are actually
image_views (assuming we're using gallium terminology in order to match
the rest of the ecosystem)

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8504>
This commit is contained in:
Mike Blumenkrantz 2020-08-04 16:36:27 -04:00 committed by Marge Bot
parent 9f389af35f
commit 263d3ae188
4 changed files with 8 additions and 8 deletions

View File

@ -210,8 +210,8 @@ zink_blit(struct pipe_context *pctx,
ctx->num_samplers[PIPE_SHADER_FRAGMENT],
ctx->sampler_states[PIPE_SHADER_FRAGMENT]);
util_blitter_save_fragment_sampler_views(ctx->blitter,
ctx->num_image_views[PIPE_SHADER_FRAGMENT],
ctx->image_views[PIPE_SHADER_FRAGMENT]);
ctx->num_sampler_views[PIPE_SHADER_FRAGMENT],
ctx->sampler_views[PIPE_SHADER_FRAGMENT]);
util_blitter_save_fragment_constant_buffer_slot(ctx->blitter, ctx->ubos[PIPE_SHADER_FRAGMENT]);
util_blitter_save_vertex_buffer_slot(ctx->blitter, ctx->buffers);
zink_blit_begin(ctx, ZINK_BLIT_SAVE_FB | ZINK_BLIT_SAVE_FS);

View File

@ -610,10 +610,10 @@ zink_set_sampler_views(struct pipe_context *pctx,
for (unsigned i = 0; i < num_views; ++i) {
struct pipe_sampler_view *pview = views ? views[i] : NULL;
pipe_sampler_view_reference(
&ctx->image_views[shader_type][start_slot + i],
&ctx->sampler_views[shader_type][start_slot + i],
pview);
}
ctx->num_image_views[shader_type] = start_slot + num_views;
ctx->num_sampler_views[shader_type] = start_slot + num_views;
}
static void

View File

@ -128,8 +128,8 @@ struct zink_context {
void *sampler_states[PIPE_SHADER_TYPES][PIPE_MAX_SAMPLERS];
VkSampler samplers[PIPE_SHADER_TYPES][PIPE_MAX_SAMPLERS];
unsigned num_samplers[PIPE_SHADER_TYPES];
struct pipe_sampler_view *image_views[PIPE_SHADER_TYPES][PIPE_MAX_SAMPLERS];
unsigned num_image_views[PIPE_SHADER_TYPES];
struct pipe_sampler_view *sampler_views[PIPE_SHADER_TYPES][PIPE_MAX_SAMPLERS];
unsigned num_sampler_views[PIPE_SHADER_TYPES];
float line_width;
float blend_constants[4];

View File

@ -376,7 +376,7 @@ zink_draw_vbo(struct pipe_context *pctx,
++num_buffer_info;
} else {
for (unsigned k = 0; k < shader->bindings[j].size; k++) {
struct pipe_sampler_view *psampler_view = ctx->image_views[i][index + k];
struct pipe_sampler_view *psampler_view = ctx->sampler_views[i][index + k];
struct zink_sampler_view *sampler_view = zink_sampler_view(psampler_view);
struct zink_resource *res = psampler_view ? zink_resource(psampler_view->texture) : NULL;
@ -462,7 +462,7 @@ zink_draw_vbo(struct pipe_context *pctx,
for (int j = 0; j < shader->num_bindings; j++) {
int index = shader->bindings[j].index;
if (shader->bindings[j].type != VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER) {
struct zink_sampler_view *sampler_view = zink_sampler_view(ctx->image_views[i][index]);
struct zink_sampler_view *sampler_view = zink_sampler_view(ctx->sampler_views[i][index]);
if (sampler_view)
zink_batch_reference_sampler_view(batch, sampler_view);
}