diff --git a/docs/features.txt b/docs/features.txt index 273f0a6238e..3dbbf2c2271 100644 --- a/docs/features.txt +++ b/docs/features.txt @@ -331,7 +331,7 @@ Khronos, ARB, and OES extensions that are not part of any OpenGL or OpenGL ES ve GL_EXT_sRGB_write_control DONE (all drivers that support GLES 3.0+) GL_EXT_texture_norm16 DONE (freedreno, i965, r600, radeonsi, nvc0i, softpipe, zink) GL_EXT_texture_sRGB_R8 DONE (all drivers that support GLES 3.0+) - GL_KHR_blend_equation_advanced_coherent DONE (i965/gen9+, panfrost) + GL_KHR_blend_equation_advanced_coherent DONE (i965/gen9+, panfrost, zink) GL_KHR_texture_compression_astc_hdr DONE (core only) GL_KHR_texture_compression_astc_sliced_3d DONE (i965/gen9+, r600, radeonsi, panfrost, softpipe, v3d, zink, lima) GL_OES_depth_texture_cube_map DONE (all drivers that support GLSL 1.30+) diff --git a/docs/relnotes/new_features.txt b/docs/relnotes/new_features.txt index 1cf2e14b705..04b079fe560 100644 --- a/docs/relnotes/new_features.txt +++ b/docs/relnotes/new_features.txt @@ -3,3 +3,4 @@ VK_KHR_shader_clock on lavapipe Mesa-DB, the new single file cache type VK_EXT_attachment_feedback_loop_layout on RADV VK_KHR_global_priority on RADV +GL_KHR_blend_equation_advanced_coherent on zink diff --git a/src/gallium/drivers/zink/zink_device_info.py b/src/gallium/drivers/zink/zink_device_info.py index 4eb084dc854..0c2c19e779b 100644 --- a/src/gallium/drivers/zink/zink_device_info.py +++ b/src/gallium/drivers/zink/zink_device_info.py @@ -206,6 +206,10 @@ EXTENSIONS = [ features=True, conditions=["$feats.scalarBlockLayout"]), Extension("VK_KHR_swapchain"), + Extension("VK_EXT_rasterization_order_attachment_access", + alias="rast_order_access", + features=True, + conditions=["$feats.rasterizationOrderColorAttachmentAccess"]), Extension("VK_KHR_shader_float16_int8", alias="shader_float16_int8", features=True), diff --git a/src/gallium/drivers/zink/zink_pipeline.c b/src/gallium/drivers/zink/zink_pipeline.c index 1b515553806..fed90be3be2 100644 --- a/src/gallium/drivers/zink/zink_pipeline.c +++ b/src/gallium/drivers/zink/zink_pipeline.c @@ -117,6 +117,9 @@ zink_create_gfx_pipeline(struct zink_screen *screen, blend_state.logicOpEnable = state->blend_state->logicop_enable; blend_state.logicOp = state->blend_state->logicop_func; } + if (screen->info.have_EXT_rasterization_order_attachment_access && + prog->shaders[MESA_SHADER_FRAGMENT]->nir->info.fs.uses_fbfetch_output) + blend_state.flags |= VK_PIPELINE_COLOR_BLEND_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_BIT_EXT; VkPipelineMultisampleStateCreateInfo ms_state = {0}; ms_state.sType = VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO; diff --git a/src/gallium/drivers/zink/zink_render_pass.c b/src/gallium/drivers/zink/zink_render_pass.c index 359a4e4cf5a..5c5e481d7f1 100644 --- a/src/gallium/drivers/zink/zink_render_pass.c +++ b/src/gallium/drivers/zink/zink_render_pass.c @@ -193,6 +193,8 @@ create_render_pass2(struct zink_screen *screen, struct zink_render_pass_state *s }; VkSubpassDescription2 subpass = {0}; + if (pstate->fbfetch && screen->info.have_EXT_rasterization_order_attachment_access) + subpass.flags |= VK_SUBPASS_DESCRIPTION_RASTERIZATION_ORDER_ATTACHMENT_COLOR_ACCESS_BIT_EXT; VkSubpassDescriptionDepthStencilResolve zsresolve; subpass.sType = VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION_2; subpass.pipelineBindPoint = VK_PIPELINE_BIND_POINT_GRAPHICS; diff --git a/src/gallium/drivers/zink/zink_screen.c b/src/gallium/drivers/zink/zink_screen.c index ef741692a47..b471460f833 100644 --- a/src/gallium/drivers/zink/zink_screen.c +++ b/src/gallium/drivers/zink/zink_screen.c @@ -399,6 +399,8 @@ zink_get_param(struct pipe_screen *pscreen, enum pipe_cap param) case PIPE_CAP_FBFETCH: return 1; + case PIPE_CAP_FBFETCH_COHERENT: + return screen->info.have_EXT_rasterization_order_attachment_access; case PIPE_CAP_MEMOBJ: return screen->instance_info.have_KHR_external_memory_capabilities && (screen->info.have_KHR_external_memory_fd || screen->info.have_KHR_external_memory_win32);