zink: handle image descriptors during zink_shader creation

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-11-17 18:47:33 -05:00 committed by Marge Bot
parent 10fb7a8c0f
commit c4d00b9ca4
2 changed files with 3 additions and 3 deletions

View file

@ -500,8 +500,8 @@ zink_shader_create(struct zink_screen *screen, struct nir_shader *nir,
} else {
assert(var->data.mode == nir_var_uniform);
const struct glsl_type *type = glsl_without_array(var->type);
if (glsl_type_is_sampler(type)) {
VkDescriptorType vktype = zink_sampler_type(type);
if (glsl_type_is_sampler(type) || glsl_type_is_image(type)) {
VkDescriptorType vktype = glsl_type_is_image(type) ? zink_image_type(type) : zink_sampler_type(type);
int binding = zink_binding(nir->info.stage,
vktype,
var->data.binding);

View file

@ -69,7 +69,7 @@ struct zink_shader {
int binding;
VkDescriptorType type;
unsigned char size;
} bindings[PIPE_MAX_CONSTANT_BUFFERS + PIPE_MAX_SAMPLERS];
} bindings[PIPE_MAX_CONSTANT_BUFFERS + PIPE_MAX_SAMPLERS + PIPE_MAX_SHADER_BUFFERS + PIPE_MAX_SHADER_IMAGES];
size_t num_bindings;
struct set *programs;