[PATCH vkd3d 1/4] vkd3d: Disable EXT_descriptor_indexing and report SM5.0.

Zebediah Figura (she/her) zfigura at codeweavers.com
Mon May 31 17:05:39 CDT 2021


On 5/26/21 3:04 AM, Conor McCarthy wrote:
> Descriptor indexing is not used and SM5.1 is mostly not supported.
> Allows new SM5.1 tests to be skipped.
> 
> Signed-off-by: Conor McCarthy <cmccarthy at codeweavers.com>
> ---
>   libs/vkd3d/device.c | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/libs/vkd3d/device.c b/libs/vkd3d/device.c
> index a63fc92b..877512e3 100644
> --- a/libs/vkd3d/device.c
> +++ b/libs/vkd3d/device.c
> @@ -1423,6 +1423,7 @@ static HRESULT vkd3d_init_device_caps(struct d3d12_device *device,
>           vulkan_info->EXT_shader_demote_to_helper_invocation = false;
>       if (!physical_device_info->texel_buffer_alignment_features.texelBufferAlignment)
>           vulkan_info->EXT_texel_buffer_alignment = false;
> +    vulkan_info->EXT_descriptor_indexing = false;
>   
>       vulkan_info->texel_buffer_alignment_properties = physical_device_info->texel_buffer_alignment_properties;
>   

I get the impression we usually don't disable reported capabilities just 
because we don't actually support them, indeed, we tend to err in the 
opposite direction, and lie that we can support more than we actually 
can—because applications trust us too much ;-)

Hence this strikes me as a good idea at least only if it doesn't break 
more applications than it fixes.

Regarding the tests—IIRC vkd3d-shader currently fails to compile the 
shader if it uses descriptor arrays; can't we just call 
create_compute_pipeline_state() in a todo block, and skip the rest of 
the tests if it fails?

> @@ -2728,7 +2729,8 @@ static HRESULT STDMETHODCALLTYPE d3d12_device_CheckFeatureSupport(ID3D12Device *
>   
>               TRACE("Request shader model %#x.\n", data->HighestShaderModel);
>   
> -            data->HighestShaderModel = D3D_SHADER_MODEL_5_1;
> +            data->HighestShaderModel = device->vk_info.EXT_descriptor_indexing
> +                    ? D3D_SHADER_MODEL_5_1 : D3D_SHADER_MODEL_5_0;
>   
>               TRACE("Shader model %#x.\n", data->HighestShaderModel);
>               return S_OK;
> 

This, on the other hand, strikes me as a separate change, and something 
we want regardless.



More information about the wine-devel mailing list