mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
vkd3d: Add DXGI_FORMAT_UNKNOWN to the array of vkd3d_format objects.
This results in a valid format instead of NULL being returned for buffers and any other case where DXGI_FORMAT_UNKNOWN is specified. In some cases invalid use of a buffer or DXGI_FORMAT_UNKNOWN will not result in E_INVALIDARG, and would need to be tested explicitly if proven to be an issue. Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
committed by
Alexandre Julliard
parent
b93edeccfd
commit
ecb854c6c1
@@ -2328,6 +2328,8 @@ static HRESULT compute_input_layout_offsets(const struct d3d12_device *device,
|
||||
return E_INVALIDARG;
|
||||
}
|
||||
|
||||
/* TODO: DXGI_FORMAT_UNKNOWN will return a format with byte_count == 1,
|
||||
* which may not match driver behaviour (return E_INVALIDARG?). */
|
||||
if (!(format = vkd3d_get_format(device, e->Format, false)))
|
||||
{
|
||||
WARN("Invalid input element format %#x.\n", e->Format);
|
||||
@@ -2816,6 +2818,8 @@ static HRESULT d3d12_pipeline_state_init_graphics(struct d3d12_pipeline_state *s
|
||||
const D3D12_INPUT_ELEMENT_DESC *e = &desc->InputLayout.pInputElementDescs[i];
|
||||
const struct vkd3d_shader_signature_element *signature_element;
|
||||
|
||||
/* TODO: DXGI_FORMAT_UNKNOWN will succeed here, which may not match
|
||||
* driver behaviour (return E_INVALIDARG?). */
|
||||
if (!(format = vkd3d_get_format(device, e->Format, false)))
|
||||
{
|
||||
WARN("Invalid input element format %#x.\n", e->Format);
|
||||
|
Reference in New Issue
Block a user