mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 02:38:04 +02:00
radv: add some assertions in vkCmdSetViewport()
To check some valid usage requirements. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
parent
e5b6cdbf45
commit
2ad1f20cd0
1 changed files with 4 additions and 1 deletions
|
|
@ -2497,8 +2497,11 @@ void radv_CmdSetViewport(
|
|||
const VkViewport* pViewports)
|
||||
{
|
||||
RADV_FROM_HANDLE(radv_cmd_buffer, cmd_buffer, commandBuffer);
|
||||
|
||||
const uint32_t total_count = firstViewport + viewportCount;
|
||||
|
||||
assert(firstViewport < MAX_VIEWPORTS);
|
||||
assert(total_count >= 1 && total_count <= MAX_VIEWPORTS);
|
||||
|
||||
if (cmd_buffer->state.dynamic.viewport.count < total_count)
|
||||
cmd_buffer->state.dynamic.viewport.count = total_count;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue