radv: enable compiling PS epilogs on-demand for dynamic color blend equations
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Tue, 10 Jan 2023 09:48:01 +0000 (10:48 +0100)
committerMarge Bot <emma+marge@anholt.net>
Fri, 20 Jan 2023 11:55:07 +0000 (11:55 +0000)
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20281>

src/amd/vulkan/radv_cmd_buffer.c
src/amd/vulkan/radv_device.c
src/amd/vulkan/radv_pipeline.c

index 4ac6391..8753b2a 100644 (file)
@@ -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);
index dd2bb5d..09785ec 100644 (file)
@@ -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;
       }
index 72f9daa..ae9023d 100644 (file)
@@ -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