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

Author: Samuel Pitoiset <[email protected]>
Date:   Wed Jan  4 14:57:34 2023 +0100

radv: initialize blend state after compiling shaders

This function used to compute part of the graphics key but everything
has been moved.

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

---

 src/amd/vulkan/radv_pipeline.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c
index e4b7f3773bb..8058fc97b5d 100644
--- a/src/amd/vulkan/radv_pipeline.c
+++ b/src/amd/vulkan/radv_pipeline.c
@@ -5214,8 +5214,6 @@ radv_graphics_pipeline_init(struct radv_graphics_pipeline 
*pipeline, struct radv
 
    struct radv_pipeline_key key = 
radv_generate_graphics_pipeline_key(pipeline, pCreateInfo, &state);
 
-   struct radv_blend_state blend = radv_pipeline_init_blend_state(pipeline, 
&state, &key);
-
    result = radv_create_shaders(&pipeline->base, &pipeline_layout, device, 
cache, &key, pCreateInfo->pStages,
                                 pCreateInfo->stageCount, pCreateInfo->flags, 
NULL,
                                 creation_feedback, NULL, NULL, 
&pipeline->last_vgt_api_stage);
@@ -5238,6 +5236,8 @@ radv_graphics_pipeline_init(struct radv_graphics_pipeline 
*pipeline, struct radv
    if (device->physical_device->rad_info.gfx_level >= GFX10_3)
       gfx103_pipeline_init_vrs_state(pipeline, &state);
 
+   struct radv_blend_state blend = radv_pipeline_init_blend_state(pipeline, 
&state, &key);
+
    /* Copy the non-compacted SPI_SHADER_COL_FORMAT which is used to emit 
RBPLUS state. */
    pipeline->col_format_non_compacted = blend.spi_shader_col_format;
 

Reply via email to