mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
vkd3d: Accept 0xffffffff as cube count for SRVs.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
bec3430d88
commit
090177b95f
@ -1667,7 +1667,9 @@ void d3d12_desc_create_srv(struct d3d12_desc *descriptor,
|
||||
vkd3d_desc.miplevel_idx = desc->u.TextureCubeArray.MostDetailedMip;
|
||||
vkd3d_desc.miplevel_count = desc->u.TextureCubeArray.MipLevels;
|
||||
vkd3d_desc.layer_idx = desc->u.TextureCubeArray.First2DArrayFace;
|
||||
vkd3d_desc.layer_count = 6 * desc->u.TextureCubeArray.NumCubes;
|
||||
vkd3d_desc.layer_count = desc->u.TextureCubeArray.NumCubes;
|
||||
if (vkd3d_desc.layer_count != VK_REMAINING_ARRAY_LAYERS)
|
||||
vkd3d_desc.layer_count *= 6;
|
||||
if (desc->u.TextureCubeArray.ResourceMinLODClamp)
|
||||
FIXME("Unhandled min LOD clamp %.8e.\n", desc->u.TextureCubeArray.ResourceMinLODClamp);
|
||||
break;
|
||||
|
@ -10845,16 +10845,20 @@ static void test_cube_maps(void)
|
||||
const D3D12_SHADER_BYTECODE *ps;
|
||||
unsigned int miplevel_count;
|
||||
unsigned int array_size;
|
||||
unsigned int cube_count;
|
||||
}
|
||||
ps_tests[] =
|
||||
{
|
||||
{&ps_cube, 1, 6},
|
||||
{&ps_cube, 2, 6},
|
||||
{&ps_cube, 3, 6},
|
||||
{&ps_cube, 1, 6, 1},
|
||||
{&ps_cube, 2, 6, 1},
|
||||
{&ps_cube, 3, 6, 1},
|
||||
{&ps_cube, 3, 6, ~0u},
|
||||
|
||||
{&ps_cube_array, 1, 12},
|
||||
{&ps_cube_array, 2, 12},
|
||||
{&ps_cube_array, 3, 12},
|
||||
{&ps_cube_array, 1, 12, 2},
|
||||
{&ps_cube_array, 1, 12, ~0u},
|
||||
{&ps_cube_array, 2, 12, 2},
|
||||
{&ps_cube_array, 3, 12, 2},
|
||||
{&ps_cube_array, 3, 12, ~0u},
|
||||
};
|
||||
|
||||
memset(&desc, 0, sizeof(desc));
|
||||
@ -10913,7 +10917,7 @@ static void test_cube_maps(void)
|
||||
srv_desc.TextureCubeArray.MostDetailedMip = 0;
|
||||
srv_desc.TextureCubeArray.MipLevels = test->miplevel_count;
|
||||
srv_desc.TextureCubeArray.First2DArrayFace = 0;
|
||||
srv_desc.TextureCubeArray.NumCubes = test->array_size / 6;
|
||||
srv_desc.TextureCubeArray.NumCubes = test->cube_count;
|
||||
srv_desc.TextureCubeArray.ResourceMinLODClamp = 0.0f;
|
||||
}
|
||||
ID3D12Device_CreateShaderResourceView(context.device, texture, &srv_desc, cpu_handle);
|
||||
|
Loading…
x
Reference in New Issue
Block a user