st/nine: Catch redundant scissor and viewport settings
The redundancy check is done in the nine_context function, rather than the device function, in order to also filter calls from SetRenderTarget and Reset*. Signed-off-by: Axel Davy <davyaxel0@gmail.com> Acked-by: Timur Kristóf <timur.kristof@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10160>
This commit is contained in:
parent
e0caa05d42
commit
a1bb1b9b07
|
@ -1892,6 +1892,9 @@ CSMT_ITEM_NO_WAIT(nine_context_set_viewport,
|
|||
{
|
||||
struct nine_context *context = &device->context;
|
||||
|
||||
if (!memcmp(viewport, &context->viewport, sizeof(context->viewport)))
|
||||
return;
|
||||
|
||||
context->viewport = *viewport;
|
||||
context->changed.group |= NINE_STATE_VIEWPORT;
|
||||
}
|
||||
|
@ -1901,6 +1904,9 @@ CSMT_ITEM_NO_WAIT(nine_context_set_scissor,
|
|||
{
|
||||
struct nine_context *context = &device->context;
|
||||
|
||||
if (!memcmp(scissor, &context->scissor, sizeof(context->scissor)))
|
||||
return;
|
||||
|
||||
context->scissor = *scissor;
|
||||
context->changed.group |= NINE_STATE_SCISSOR;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue