Commit a9f26372 authored by Mike Blumenkrantz's avatar Mike Blumenkrantz 🏋 Committed by Marge Bot

zink: add shader image support to zink_binding()

Reviewed-by: Erik Faye-Lund 's avatarErik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <!8504>
parent 934625d5
......@@ -586,7 +586,8 @@ zink_binding(gl_shader_stage stage, VkDescriptorType type, int index)
} else {
uint32_t stage_offset = (uint32_t)stage * (PIPE_MAX_CONSTANT_BUFFERS +
PIPE_MAX_SAMPLERS +
PIPE_MAX_SHADER_BUFFERS);
PIPE_MAX_SHADER_BUFFERS +
PIPE_MAX_SHADER_IMAGES);
switch (type) {
case VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER:
......@@ -602,6 +603,11 @@ zink_binding(gl_shader_stage stage, VkDescriptorType type, int index)
assert(index < PIPE_MAX_SHADER_BUFFERS);
return stage_offset + PIPE_MAX_CONSTANT_BUFFERS + PIPE_MAX_SHADER_SAMPLER_VIEWS + index;
case VK_DESCRIPTOR_TYPE_STORAGE_IMAGE:
case VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER:
assert(index < PIPE_MAX_SHADER_IMAGES);
return stage_offset + PIPE_MAX_CONSTANT_BUFFERS + PIPE_MAX_SHADER_SAMPLER_VIEWS + PIPE_MAX_SHADER_IMAGES + index;
default:
unreachable("unexpected type");
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment