zink: store sampler and image_view counts

Acked-by: Jordan Justen <jordan.l.justen@intel.com>
This commit is contained in:
Erik Faye-Lund 2019-07-10 17:10:49 +02:00
parent 8e5fe441bd
commit d29cc33a9b
2 changed files with 4 additions and 0 deletions

View file

@ -180,6 +180,7 @@ zink_bind_sampler_states(struct pipe_context *pctx,
struct zink_context *ctx = zink_context(pctx);
for (unsigned i = 0; i < num_samplers; ++i)
ctx->samplers[shader][start_slot + i] = (VkSampler)samplers[i];
ctx->num_samplers[shader] = start_slot + num_samplers;
}
static void
@ -444,6 +445,7 @@ zink_set_sampler_views(struct pipe_context *pctx,
&ctx->image_views[shader_type][start_slot + i],
views[i]);
}
ctx->num_image_views[shader_type] = start_slot + num_views;
}
static void

View file

@ -97,7 +97,9 @@ struct zink_context {
uint32_t buffers_enabled_mask;
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_SHADER_SAMPLER_VIEWS];
unsigned num_image_views[PIPE_SHADER_TYPES];
float blend_constants[4];