mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 09:08:10 +02:00
zink: use VK_WHOLE_SIZE when binding null db buffer descriptors
using range=0 is illegal
cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24478>
(cherry picked from commit b2a9881475)
This commit is contained in:
parent
9bc11e9912
commit
3c5e28f695
2 changed files with 10 additions and 6 deletions
|
|
@ -1642,7 +1642,7 @@
|
|||
"description": "zink: use VK_WHOLE_SIZE when binding null db buffer descriptors",
|
||||
"nominated": true,
|
||||
"nomination_type": 0,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null
|
||||
},
|
||||
|
|
|
|||
|
|
@ -603,8 +603,9 @@ update_descriptor_state_ubo(struct zink_context *ctx, gl_shader_stage shader, un
|
|||
ctx->di.db.ubos[shader][slot].address = res->obj->bda + ctx->ubos[shader][slot].buffer_offset;
|
||||
else
|
||||
ctx->di.db.ubos[shader][slot].address = 0;
|
||||
ctx->di.db.ubos[shader][slot].range = ctx->ubos[shader][slot].buffer_size;
|
||||
assert(ctx->di.db.ubos[shader][slot].range <= screen->info.props.limits.maxUniformBufferRange);
|
||||
ctx->di.db.ubos[shader][slot].range = res ? ctx->ubos[shader][slot].buffer_size : VK_WHOLE_SIZE;
|
||||
assert(ctx->di.db.ubos[shader][slot].range == VK_WHOLE_SIZE ||
|
||||
ctx->di.db.ubos[shader][slot].range <= screen->info.props.limits.maxUniformBufferRange);
|
||||
} else {
|
||||
ctx->di.t.ubos[shader][slot].offset = ctx->ubos[shader][slot].buffer_offset;
|
||||
if (res) {
|
||||
|
|
@ -638,7 +639,7 @@ update_descriptor_state_ssbo(struct zink_context *ctx, gl_shader_stage shader, u
|
|||
ctx->di.db.ssbos[shader][slot].address = res->obj->bda + ctx->ssbos[shader][slot].buffer_offset;
|
||||
else
|
||||
ctx->di.db.ssbos[shader][slot].address = 0;
|
||||
ctx->di.db.ssbos[shader][slot].range = ctx->ssbos[shader][slot].buffer_size;
|
||||
ctx->di.db.ssbos[shader][slot].range = res ? ctx->ssbos[shader][slot].buffer_size : VK_WHOLE_SIZE;
|
||||
} else {
|
||||
ctx->di.t.ssbos[shader][slot].offset = ctx->ssbos[shader][slot].buffer_offset;
|
||||
if (res) {
|
||||
|
|
@ -693,6 +694,7 @@ update_descriptor_state_sampler(struct zink_context *ctx, gl_shader_stage shader
|
|||
ctx->di.textures[shader][slot].imageLayout = VK_IMAGE_LAYOUT_UNDEFINED;
|
||||
if (zink_descriptor_mode == ZINK_DESCRIPTOR_MODE_DB) {
|
||||
ctx->di.db.tbos[shader][slot].address = 0;
|
||||
ctx->di.db.tbos[shader][slot].range = VK_WHOLE_SIZE;
|
||||
} else {
|
||||
ctx->di.t.tbos[shader][slot] = VK_NULL_HANDLE;
|
||||
}
|
||||
|
|
@ -740,10 +742,12 @@ update_descriptor_state_image(struct zink_context *ctx, gl_shader_stage shader,
|
|||
} else {
|
||||
if (likely(have_null_descriptors)) {
|
||||
memset(&ctx->di.images[shader][slot], 0, sizeof(ctx->di.images[shader][slot]));
|
||||
if (zink_descriptor_mode == ZINK_DESCRIPTOR_MODE_DB)
|
||||
if (zink_descriptor_mode == ZINK_DESCRIPTOR_MODE_DB) {
|
||||
ctx->di.db.texel_images[shader][slot].address = 0;
|
||||
else
|
||||
ctx->di.db.texel_images[shader][slot].range = VK_WHOLE_SIZE;
|
||||
} else {
|
||||
ctx->di.t.texel_images[shader][slot] = VK_NULL_HANDLE;
|
||||
}
|
||||
} else {
|
||||
assert(zink_descriptor_mode != ZINK_DESCRIPTOR_MODE_DB);
|
||||
struct zink_surface *null_surface = zink_get_dummy_surface(ctx, 0);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue