[v3 PATCH 3/3] wined3d: Use EXT_framebuffer_multisample_blit_scaled extension.
gofmanp at gmail.com
Wed Mar 11 08:00:37 CDT 2020
On 3/11/20 15:23, Henri Verbeet wrote:
> On Tue, 10 Mar 2020 at 15:02, Paul Gofman <gofmanp at gmail.com> wrote:
>> @@ -5162,6 +5164,8 @@ static void wined3d_adapter_gl_init_d3d_info(struct wined3d_adapter_gl *adapter_
>> d3d_info->srgb_write_control = !!gl_info->supported[ARB_FRAMEBUFFER_SRGB];
>> d3d_info->clip_control = !!gl_info->supported[ARB_CLIP_CONTROL];
>> d3d_info->full_ffp_varyings = !!(shader_caps.wined3d_caps & WINED3D_SHADER_CAP_FULL_FFP_VARYINGS);
>> + d3d_info->scaled_resolve = gl_info->supported[EXT_FRAMEBUFFER_MULTISAMPLE_BLIT_SCALED]
>> + || !gl_info->supported[ARB_TEXTURE_MULTISAMPLE];
> Is the ARB_TEXTURE_MULTISAMPLE check correct?
The idea was that if ARB_TEXTURE_MULTISAMPLE is not supported we should
not getting multisampled source texture while
wined3d_texture_is_multisample_location() from previous patch may say
otherwise in this case (as you noted previously). But it indeed looks
much more straightforward to just improve
>> @@ -2630,7 +2635,8 @@ HRESULT texture2d_blt(struct wined3d_texture *dst_texture, unsigned int dst_sub_
>> if (wined3d_texture_is_multisample_location(dst_texture, dst_location))
>> dst_location = WINED3D_LOCATION_RB_RESOLVED;
>> - if (wined3d_texture_is_multisample_location(src_texture, src_location))
>> + if ((!context->d3d_info->scaled_resolve || blit_op != WINED3D_BLIT_OP_COLOR_BLIT || convert)
>> + && wined3d_texture_is_multisample_location(src_texture, src_location))
>> src_location = WINED3D_LOCATION_RB_RESOLVED;
> If scaled resolves are supported, we don't need to modify
> "dst_location" either, right?
No, we have to. Scaled resolve allows to scale from multisampled
texture, but if destination is multisampled it always fails for me.
There is explicit check for zero samples count on destination I spotted
in Mesa code, and it seems to fail the same way on Nvidia.
More information about the wine-devel