mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 02:48:06 +02:00
panvk: Clamp blend constants before copying them to the cmdbuf state
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12762>
This commit is contained in:
parent
8182f7a981
commit
2c4b8f9168
1 changed files with 3 additions and 2 deletions
|
|
@ -208,8 +208,9 @@ panvk_CmdSetBlendConstants(VkCommandBuffer commandBuffer,
|
|||
{
|
||||
VK_FROM_HANDLE(panvk_cmd_buffer, cmdbuf, commandBuffer);
|
||||
|
||||
memcpy(cmdbuf->state.blend.constants, blendConstants,
|
||||
sizeof(cmdbuf->state.blend.constants));
|
||||
for (unsigned i = 0; i < 4; i++)
|
||||
cmdbuf->state.blend.constants[i] = CLAMP(blendConstants[i], 0.0f, 1.0f);
|
||||
|
||||
cmdbuf->state.dirty |= PANVK_DYNAMIC_BLEND_CONSTANTS;
|
||||
cmdbuf->state.fs_rsd = 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue