summaryrefslogtreecommitdiffstats
path: root/src/amd/vulkan/radv_private.h
diff options
context:
space:
mode:
authorSamuel Pitoiset <[email protected]>2017-09-25 14:02:49 +0200
committerSamuel Pitoiset <[email protected]>2017-09-25 20:31:55 +0200
commit1cf508b73181ec0b4406bdfa10662a49e690d774 (patch)
tree540ac04673f603980b6a9b817554372b47cec681 /src/amd/vulkan/radv_private.h
parent0509b27b9db8cd4c4cc049f192ade4fb23b26660 (diff)
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 <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src/amd/vulkan/radv_private.h')
-rw-r--r--src/amd/vulkan/radv_private.h20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/amd/vulkan/radv_private.h b/src/amd/vulkan/radv_private.h
index 79ac295a0fd..c23e8cf4995 100644
--- a/src/amd/vulkan/radv_private.h
+++ b/src/amd/vulkan/radv_private.h
@@ -700,16 +700,20 @@ struct radv_vertex_binding {
VkDeviceSize offset;
};
+struct radv_viewport_state {
+ uint32_t count;
+ VkViewport viewports[MAX_VIEWPORTS];
+};
+
+struct radv_scissor_state {
+ uint32_t count;
+ VkRect2D scissors[MAX_SCISSORS];
+};
+
struct radv_dynamic_state {
- struct {
- uint32_t count;
- VkViewport viewports[MAX_VIEWPORTS];
- } viewport;
+ struct radv_viewport_state viewport;
- struct {
- uint32_t count;
- VkRect2D scissors[MAX_SCISSORS];
- } scissor;
+ struct radv_scissor_state scissor;
float line_width;