diff --git a/.pick_status.json b/.pick_status.json index fe5ec8e0e59..76c22e36138 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -211,7 +211,7 @@ "description": "zink: Cap PIPE_SHADER_CAP_MAX_CONST_BUFFERS to 32", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "master_sha": null, "because_sha": "daaf5f1d1868bebec7931a51753236a850ebbd24" }, diff --git a/src/gallium/auxiliary/cso_cache/cso_context.c b/src/gallium/auxiliary/cso_cache/cso_context.c index df040ee6372..1eef6aac70c 100644 --- a/src/gallium/auxiliary/cso_cache/cso_context.c +++ b/src/gallium/auxiliary/cso_cache/cso_context.c @@ -405,6 +405,7 @@ void cso_destroy_context( struct cso_context *ctx ) assert(maxsam <= PIPE_MAX_SAMPLERS); assert(maxview <= PIPE_MAX_SHADER_SAMPLER_VIEWS); assert(maxssbo <= PIPE_MAX_SHADER_BUFFERS); + assert(maxcb <= PIPE_MAX_CONSTANT_BUFFERS); if (maxsam > 0) { ctx->pipe->bind_sampler_states(ctx->pipe, sh, 0, maxsam, zeros); } diff --git a/src/gallium/drivers/zink/zink_screen.c b/src/gallium/drivers/zink/zink_screen.c index 5ee02be415a..ce6e15bdb9e 100644 --- a/src/gallium/drivers/zink/zink_screen.c +++ b/src/gallium/drivers/zink/zink_screen.c @@ -449,7 +449,8 @@ zink_get_shader_param(struct pipe_screen *pscreen, return 65536; case PIPE_SHADER_CAP_MAX_CONST_BUFFERS: - return MIN2(screen->info.props.limits.maxPerStageDescriptorUniformBuffers, INT_MAX); + return MIN2(screen->info.props.limits.maxPerStageDescriptorUniformBuffers, + PIPE_MAX_CONSTANT_BUFFERS); case PIPE_SHADER_CAP_MAX_TEMPS: return INT_MAX;