mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 04:58:05 +02:00
zink: store sampler and image_view counts
Acked-by: Jordan Justen <jordan.l.justen@intel.com>
This commit is contained in:
parent
8e5fe441bd
commit
d29cc33a9b
2 changed files with 4 additions and 0 deletions
|
|
@ -180,6 +180,7 @@ zink_bind_sampler_states(struct pipe_context *pctx,
|
||||||
struct zink_context *ctx = zink_context(pctx);
|
struct zink_context *ctx = zink_context(pctx);
|
||||||
for (unsigned i = 0; i < num_samplers; ++i)
|
for (unsigned i = 0; i < num_samplers; ++i)
|
||||||
ctx->samplers[shader][start_slot + i] = (VkSampler)samplers[i];
|
ctx->samplers[shader][start_slot + i] = (VkSampler)samplers[i];
|
||||||
|
ctx->num_samplers[shader] = start_slot + num_samplers;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
@ -444,6 +445,7 @@ zink_set_sampler_views(struct pipe_context *pctx,
|
||||||
&ctx->image_views[shader_type][start_slot + i],
|
&ctx->image_views[shader_type][start_slot + i],
|
||||||
views[i]);
|
views[i]);
|
||||||
}
|
}
|
||||||
|
ctx->num_image_views[shader_type] = start_slot + num_views;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
||||||
|
|
@ -97,7 +97,9 @@ struct zink_context {
|
||||||
uint32_t buffers_enabled_mask;
|
uint32_t buffers_enabled_mask;
|
||||||
|
|
||||||
VkSampler samplers[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_SHADER_SAMPLER_VIEWS];
|
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];
|
float blend_constants[4];
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue