diff --git a/src/gallium/drivers/zink/ci/zink-lvp-fails.txt b/src/gallium/drivers/zink/ci/zink-lvp-fails.txt index 91c0cd59e0f..4700f830ef5 100644 --- a/src/gallium/drivers/zink/ci/zink-lvp-fails.txt +++ b/src/gallium/drivers/zink/ci/zink-lvp-fails.txt @@ -136,8 +136,6 @@ spec@arb_sample_shading@samplemask 4 all@noms mask_in_one,Fail spec@arb_sample_shading@samplemask 4 all@noms partition,Fail spec@arb_sample_shading@samplemask 4 all@sample mask_in_one,Fail spec@arb_shader_texture_lod@execution@arb_shader_texture_lod-texgrad,Fail -spec@arb_texture_float@fbo-blending-formats,Fail -spec@arb_texture_float@fbo-blending-formats@GL_RGB32F,Fail spec@egl 1.4@eglterminate then unbind context,Fail spec@egl_khr_gl_image@egl_khr_gl_renderbuffer_image-clear-shared-image gl_depth_component24,Fail @@ -160,10 +158,6 @@ spec@ext_framebuffer_multisample@interpolation 4 centroid-disabled,Fail spec@ext_framebuffer_multisample@interpolation 4 centroid-edges,Fail spec@ext_framebuffer_multisample@interpolation 4 non-centroid-deriv-disabled,Fail spec@ext_framebuffer_multisample@interpolation 4 non-centroid-disabled,Fail -spec@ext_framebuffer_object@fbo-blending-formats,Fail -spec@ext_framebuffer_object@fbo-blending-formats@GL_LUMINANCE12,Fail -spec@ext_framebuffer_object@fbo-blending-formats@GL_LUMINANCE16,Fail -spec@ext_framebuffer_object@fbo-blending-formats@GL_RGB10,Fail spec@ext_image_dma_buf_import@ext_image_dma_buf_import-intel_external_sampler_only,Fail spec@ext_image_dma_buf_import@ext_image_dma_buf_import-invalid_attributes,Fail spec@ext_image_dma_buf_import@ext_image_dma_buf_import-invalid_hints,Fail diff --git a/src/gallium/drivers/zink/ci/zink-radv-fails.txt b/src/gallium/drivers/zink/ci/zink-radv-fails.txt index 69f6b80d4f9..ede8f3666eb 100644 --- a/src/gallium/drivers/zink/ci/zink-radv-fails.txt +++ b/src/gallium/drivers/zink/ci/zink-radv-fails.txt @@ -239,12 +239,6 @@ spec@arb_shader_texture_lod@execution@glsl-fs-shadow2dgradarb-cumulative,Fail spec@arb_shading_language_packing@execution@built-in-functions@fs-packhalf2x16,Fail spec@arb_shading_language_packing@execution@built-in-functions@vs-packhalf2x16,Fail spec@arb_tessellation_shader@arb_tessellation_shader-tes-gs-max-output -small -scan 1 50,Crash -spec@arb_texture_float@fbo-blending-formats,Fail -spec@arb_texture_float@fbo-blending-formats@GL_INTENSITY16F_ARB,Fail -spec@arb_texture_float@fbo-blending-formats@GL_INTENSITY32F_ARB,Fail -spec@arb_texture_float@fbo-blending-formats@GL_LUMINANCE16F_ARB,Fail -spec@arb_texture_float@fbo-blending-formats@GL_LUMINANCE32F_ARB,Fail -spec@arb_texture_float@fbo-blending-formats@GL_RGB32F,Fail spec@arb_texture_float@multisample-formats 2 gl_arb_texture_float,Fail spec@arb_texture_float@multisample-formats 4 gl_arb_texture_float,Fail spec@arb_texture_float@multisample-formats 6 gl_arb_texture_float,Fail @@ -297,15 +291,6 @@ spec@ext_framebuffer_multisample@sample-alpha-to-one 2,Fail spec@ext_framebuffer_multisample@sample-alpha-to-one 4,Fail spec@ext_framebuffer_multisample@sample-alpha-to-one 6,Fail spec@ext_framebuffer_multisample@sample-alpha-to-one 8,Fail -spec@ext_framebuffer_object@fbo-blending-formats,Fail -spec@ext_framebuffer_object@fbo-blending-formats@GL_INTENSITY12,Fail -spec@ext_framebuffer_object@fbo-blending-formats@GL_INTENSITY16,Fail -spec@ext_framebuffer_object@fbo-blending-formats@GL_INTENSITY4,Fail -spec@ext_framebuffer_object@fbo-blending-formats@GL_INTENSITY8,Fail -spec@ext_framebuffer_object@fbo-blending-formats@GL_INTENSITY,Fail -spec@ext_framebuffer_object@fbo-blending-formats@GL_LUMINANCE12,Fail -spec@ext_framebuffer_object@fbo-blending-formats@GL_LUMINANCE16,Fail -spec@ext_framebuffer_object@fbo-blending-formats@GL_RGB10,Fail spec@ext_image_dma_buf_import@ext_image_dma_buf_import-export,Fail spec@ext_image_dma_buf_import@ext_image_dma_buf_import-sample_nv12,Fail spec@ext_image_dma_buf_import@ext_image_dma_buf_import-sample_p010,Fail @@ -325,13 +310,6 @@ spec@ext_texture_array@glsl-fs-shadow2darray-03,Fail spec@ext_texture_array@glsl-fs-shadow2darray-07,Fail spec@ext_texture_array@glsl-fs-shadow2darray-08,Fail spec@ext_texture_array@glsl-fs-shadow2darray,Fail -spec@ext_texture_snorm@fbo-blending-formats,Fail -spec@ext_texture_snorm@fbo-blending-formats@GL_INTENSITY16_SNORM,Fail -spec@ext_texture_snorm@fbo-blending-formats@GL_INTENSITY8_SNORM,Fail -spec@ext_texture_snorm@fbo-blending-formats@GL_INTENSITY_SNORM,Fail -spec@ext_texture_snorm@fbo-blending-formats@GL_LUMINANCE16_SNORM,Fail -spec@ext_texture_snorm@fbo-blending-formats@GL_LUMINANCE8_SNORM,Fail -spec@ext_texture_snorm@fbo-blending-formats@GL_LUMINANCE_SNORM,Fail spec@ext_texture_swizzle@depth_texture_mode_and_swizzle,Fail spec@glsl-1.10@execution@glsl-fs-inline-explosion,Crash spec@glsl-1.10@execution@glsl-vs-inline-explosion,Crash diff --git a/src/gallium/drivers/zink/zink_context.c b/src/gallium/drivers/zink/zink_context.c index ecfef2296dd..a02d53fe51f 100644 --- a/src/gallium/drivers/zink/zink_context.c +++ b/src/gallium/drivers/zink/zink_context.c @@ -2883,8 +2883,6 @@ zink_set_framebuffer_state(struct pipe_context *pctx, util_copy_framebuffer_state(&ctx->fb_state, state); zink_update_fbfetch(ctx); - unsigned prev_void_alpha_attachments = ctx->gfx_pipeline_state.void_alpha_attachments; - ctx->gfx_pipeline_state.void_alpha_attachments = 0; ctx->transient_attachments = 0; ctx->fb_layer_mismatch = 0; @@ -2926,14 +2924,11 @@ zink_set_framebuffer_state(struct pipe_context *pctx, } res->fb_binds++; if (util_format_has_alpha1(psurf->format)) { - ctx->gfx_pipeline_state.void_alpha_attachments |= BITFIELD_BIT(i); if (!res->valid) ctx->void_clears |= (PIPE_CLEAR_COLOR0 << i); } } } - if (ctx->gfx_pipeline_state.void_alpha_attachments != prev_void_alpha_attachments) - ctx->gfx_pipeline_state.dirty = true; unsigned depth_bias_scale_factor = ctx->depth_bias_scale_factor; if (ctx->fb_state.zsbuf) { struct pipe_surface *psurf = ctx->fb_state.zsbuf; diff --git a/src/gallium/drivers/zink/zink_pipeline.c b/src/gallium/drivers/zink/zink_pipeline.c index ba3d905c800..1b515553806 100644 --- a/src/gallium/drivers/zink/zink_pipeline.c +++ b/src/gallium/drivers/zink/zink_pipeline.c @@ -104,7 +104,6 @@ zink_create_gfx_pipeline(struct zink_screen *screen, } } - VkPipelineColorBlendAttachmentState blend_att[PIPE_MAX_COLOR_BUFS]; VkPipelineColorBlendStateCreateInfo blend_state = {0}; blend_state.sType = VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO; if (state->blend_state) { @@ -113,18 +112,7 @@ zink_create_gfx_pipeline(struct zink_screen *screen, state->rendering_info.colorAttachmentCount; if (state->render_pass && state->render_pass->state.have_zsbuf) num_attachments--; - if (state->void_alpha_attachments) { - for (unsigned i = 0; i < num_attachments; i++) { - blend_att[i] = state->blend_state->attachments[i]; - if (state->void_alpha_attachments & BITFIELD_BIT(i)) { - blend_att[i].dstAlphaBlendFactor = VK_BLEND_FACTOR_ZERO; - blend_att[i].srcColorBlendFactor = clamp_void_blend_factor(blend_att[i].srcColorBlendFactor); - blend_att[i].dstColorBlendFactor = clamp_void_blend_factor(blend_att[i].dstColorBlendFactor); - } - } - blend_state.pAttachments = blend_att; - } else - blend_state.pAttachments = state->blend_state->attachments; + blend_state.pAttachments = state->blend_state->attachments; blend_state.attachmentCount = num_attachments; blend_state.logicOpEnable = state->blend_state->logicop_enable; blend_state.logicOp = state->blend_state->logicop_func; @@ -436,23 +424,11 @@ zink_create_gfx_pipeline_output(struct zink_screen *screen, struct zink_gfx_pipe VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_OUTPUT_INTERFACE_BIT_EXT, }; - VkPipelineColorBlendAttachmentState blend_att[PIPE_MAX_COLOR_BUFS]; VkPipelineColorBlendStateCreateInfo blend_state = {0}; blend_state.sType = VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO; if (state->blend_state) { unsigned num_attachments = state->rendering_info.colorAttachmentCount; - if (state->void_alpha_attachments) { - for (unsigned i = 0; i < num_attachments; i++) { - blend_att[i] = state->blend_state->attachments[i]; - if (state->void_alpha_attachments & BITFIELD_BIT(i)) { - blend_att[i].dstAlphaBlendFactor = VK_BLEND_FACTOR_ZERO; - blend_att[i].srcColorBlendFactor = clamp_void_blend_factor(blend_att[i].srcColorBlendFactor); - blend_att[i].dstColorBlendFactor = clamp_void_blend_factor(blend_att[i].dstColorBlendFactor); - } - } - blend_state.pAttachments = blend_att; - } else - blend_state.pAttachments = state->blend_state->attachments; + blend_state.pAttachments = state->blend_state->attachments; blend_state.attachmentCount = num_attachments; blend_state.logicOpEnable = state->blend_state->logicop_enable; blend_state.logicOp = state->blend_state->logicop_func; diff --git a/src/gallium/drivers/zink/zink_screen.c b/src/gallium/drivers/zink/zink_screen.c index cc793850822..ef741692a47 100644 --- a/src/gallium/drivers/zink/zink_screen.c +++ b/src/gallium/drivers/zink/zink_screen.c @@ -436,6 +436,7 @@ zink_get_param(struct pipe_screen *pscreen, enum pipe_cap param) case PIPE_CAP_SEAMLESS_CUBE_MAP_PER_TEXTURE: case PIPE_CAP_LOAD_CONSTBUF: case PIPE_CAP_MULTISAMPLE_Z_RESOLVE: + case PIPE_CAP_RGB_OVERRIDE_DST_ALPHA_BLEND: return 1; case PIPE_CAP_DRAW_VERTEX_STATE: diff --git a/src/gallium/drivers/zink/zink_types.h b/src/gallium/drivers/zink/zink_types.h index 957e937acdb..069ebdc4204 100644 --- a/src/gallium/drivers/zink/zink_types.h +++ b/src/gallium/drivers/zink/zink_types.h @@ -629,8 +629,7 @@ struct zink_gfx_pipeline_state { uint32_t _pad1 : 6; uint32_t force_persample_interp:1; //duplicated for gpl hashing /* order matches zink_gfx_output_key: uint16_t offset */ - uint32_t rast_samples:8; //2 extra bits - uint32_t void_alpha_attachments:PIPE_MAX_COLOR_BUFS; + uint32_t rast_samples:16; //10 extra bits VkSampleMask sample_mask; unsigned rp_state; uint32_t blend_id; @@ -769,8 +768,7 @@ struct zink_gfx_input_key { struct zink_gfx_output_key { uint32_t _pad:15; uint32_t force_persample_interp:1; - uint32_t rast_samples:8; - uint32_t void_alpha_attachments:PIPE_MAX_COLOR_BUFS; + uint32_t rast_samples:16; VkSampleMask sample_mask; unsigned rp_state;