radv: save/restore all viewports/scissors for meta operations
This is needed since we don't update the number of viewports/scissors
when they are set dynamically (according to the spec). In the following
scenario:
* vkCmdSetViewport()
* vkCmdClearColorImage() (or any other meta operations)
The viewports/scissors weren't saved correctly because no pipeline
was bound before, and thus the number of viewports/scissors were 0.
This fixes a regression with:
dEQP-VK.draw.negative_viewport_height.front_ccw_cull_back
Fixes: 60878dd00c ("radv: do not update the number of viewports in vkCmdSetViewport()")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
diff --git a/src/amd/vulkan/radv_meta.h b/src/amd/vulkan/radv_meta.h
index 5d28cc5..c7c9a6b 100644
--- a/src/amd/vulkan/radv_meta.h
+++ b/src/amd/vulkan/radv_meta.h
@@ -36,14 +36,10 @@
#define RADV_META_VERTEX_BINDING_COUNT 2
struct radv_meta_saved_state {
- /**
- * Bitmask of (1 << VK_DYNAMIC_STATE_*). Defines the set of saved dynamic
- * state.
- */
- uint32_t dynamic_mask;
- struct radv_dynamic_state dynamic;
struct radv_descriptor_set *old_descriptor_set0;
struct radv_pipeline *old_pipeline;
+ struct radv_viewport_state viewport;
+ struct radv_scissor_state scissor;
char push_constants[128];
};