Module: Mesa
Branch: main
Commit: 4041be0f6f14192ecc48f68e2d171e289f755cb8
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=4041be0f6f14192ecc48f68e2d171e289f755cb8

Author: Samuel Pitoiset <[email protected]>
Date:   Tue Jan 10 10:48:01 2023 +0100

radv: enable compiling PS epilogs on-demand for dynamic color blend equations

Signed-off-by: Samuel Pitoiset <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20281>

---

 src/amd/vulkan/radv_cmd_buffer.c | 3 ++-
 src/amd/vulkan/radv_device.c     | 3 ++-
 src/amd/vulkan/radv_pipeline.c   | 3 ++-
 3 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c
index 4ac63915b33..8753b2a0ed3 100644
--- a/src/amd/vulkan/radv_cmd_buffer.c
+++ b/src/amd/vulkan/radv_cmd_buffer.c
@@ -8683,7 +8683,8 @@ radv_emit_all_graphics_states(struct radv_cmd_buffer 
*cmd_buffer, const struct r
       } else if ((cmd_buffer->state.emitted_graphics_pipeline != 
cmd_buffer->state.graphics_pipeline ||
                  (cmd_buffer->state.dirty & 
(RADV_CMD_DIRTY_DYNAMIC_COLOR_WRITE_MASK |
                                              
RADV_CMD_DIRTY_DYNAMIC_COLOR_BLEND_ENABLE |
-                                             
RADV_CMD_DIRTY_DYNAMIC_ALPHA_TO_COVERAGE_ENABLE)))) {
+                                             
RADV_CMD_DIRTY_DYNAMIC_ALPHA_TO_COVERAGE_ENABLE |
+                                             
RADV_CMD_DIRTY_DYNAMIC_COLOR_BLEND_EQUATION)))) {
          ps_epilog = lookup_ps_epilog(cmd_buffer);
          if (!ps_epilog) {
             vk_command_buffer_set_error(&cmd_buffer->vk, 
VK_ERROR_OUT_OF_HOST_MEMORY);
diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c
index dd2bb5d4aed..09785ec289c 100644
--- a/src/amd/vulkan/radv_device.c
+++ b/src/amd/vulkan/radv_device.c
@@ -3805,7 +3805,8 @@ radv_CreateDevice(VkPhysicalDevice physicalDevice, const 
VkDeviceCreateInfo *pCr
          const VkPhysicalDeviceExtendedDynamicState3FeaturesEXT *features = 
(const void *)ext;
          if (features->extendedDynamicState3ColorBlendEnable ||
              features->extendedDynamicState3ColorWriteMask ||
-             features->extendedDynamicState3AlphaToCoverageEnable)
+             features->extendedDynamicState3AlphaToCoverageEnable ||
+             features->extendedDynamicState3ColorBlendEquation)
             ps_epilogs = true;
          break;
       }
diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c
index 72f9daa4a5c..ae9023d8f65 100644
--- a/src/amd/vulkan/radv_pipeline.c
+++ b/src/amd/vulkan/radv_pipeline.c
@@ -2090,7 +2090,8 @@ radv_pipeline_has_dynamic_ps_epilog(const struct 
radv_graphics_pipeline *pipelin
    /* These dynamic states need to compile PS epilogs on-demand. */
    return pipeline->dynamic_states & (RADV_DYNAMIC_COLOR_BLEND_ENABLE |
                                       RADV_DYNAMIC_COLOR_WRITE_MASK |
-                                      RADV_DYNAMIC_ALPHA_TO_COVERAGE_ENABLE);
+                                      RADV_DYNAMIC_ALPHA_TO_COVERAGE_ENABLE |
+                                      RADV_DYNAMIC_COLOR_BLEND_EQUATION);
 }
 
 struct radv_pipeline_key

Reply via email to