[PATCH 1/2] d3d11: Report D3D11_FORMAT_SUPPORT_IA_VERTEX_BUFFER.

Zebediah Figura zfigura at codeweavers.com
Fri Dec 10 11:18:46 CST 2021


On 12/10/21 03:16, Henri Verbeet wrote:
> On Thu, 9 Dec 2021 at 19:57, Zebediah Figura <zfigura at codeweavers.com> wrote:
>> @@ -3794,7 +3795,11 @@ static HRESULT STDMETHODCALLTYPE d3d11_device_CheckFormatSupport(ID3D11Device2 *
>>       wined3d_mutex_unlock();
>>
>>       if (feature_level < D3D_FEATURE_LEVEL_10_0)
>> +    {
>>           *format_support &= ~D3D11_FORMAT_SUPPORT_BUFFER;
>> +        if (format == DXGI_FORMAT_R8G8_UINT || format == DXGI_FORMAT_R16_FLOAT)
>> +            *format_support &= ~D3D11_FORMAT_SUPPORT_IA_VERTEX_BUFFER;
>> +    }
>>
> That's an awfully specific set of formats... 

They're the formats that the tests check for :-/

I'll admit I'm really unsure what to do about that kind of thing. My gut 
says that applications seem to be so picky about what is and isn't 
supported that we should be proactively checking. But at the same time, 
being honest about what formats we support also sounds like a good 
thing, and finding out what formats really aren't supported, 
consistently, across drivers, seems hard to impossible.

(Nor is there any apparent pattern about what is and isn't supported 
before 10.0, such that we could say e.g. "all int formats are forbidden".)

> More broadly, if those
> formats can't/shouldn't be used for vertex attributes
> ("D3D11_FORMAT_SUPPORT_IA_VERTEX_BUFFER" doesn't seem like a great
> name...), we shouldn't be setting WINED3DFMT_FLAG_VERTEX_ATTRIBUTE for
> them. In particular, the format flag is what we'll use to validate
> vertex declarations / input layouts, and we'd like the reported
> capabilities to be consistent with what actually works.

Ah, of course.

> 
>> @@ -34163,6 +34164,10 @@ START_TEST(d3d11)
>>
>>       print_adapter_info();
>>
>> +    queue_for_each_feature_level(test_format_support);
>> +    run_queued_tests();
>> +    return;
>> +
> That's going to skip quite a few tests...

Oops ;-)



More information about the wine-devel mailing list