mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2024-11-22 03:55:11 +00:00
don't use small resource alignment for large textures
thanks to Emil for this one see https://docs.microsoft.com/en-us/windows/win32/api/d3d12/ns-d3d12-d3d12_resource_desc#alignment for an explanation
This commit is contained in:
parent
208bfdcbf3
commit
fd05cd3adb
1 changed files with 2 additions and 1 deletions
|
@ -423,7 +423,8 @@ static void gfx_d3d12_upload_texture(uint8_t *rgba32_buf, int width, int height)
|
|||
texture_desc.SampleDesc.Count = 1;
|
||||
texture_desc.SampleDesc.Quality = 0;
|
||||
texture_desc.Dimension = D3D12_RESOURCE_DIMENSION_TEXTURE2D;
|
||||
texture_desc.Alignment = D3D12_SMALL_RESOURCE_PLACEMENT_ALIGNMENT;
|
||||
texture_desc.Alignment = ((width + 31) / 32) * ((height + 31) / 32) > 16 ?
|
||||
0 : D3D12_SMALL_RESOURCE_PLACEMENT_ALIGNMENT;
|
||||
|
||||
D3D12_RESOURCE_ALLOCATION_INFO alloc_info = get_resource_allocation_info(&texture_desc);
|
||||
|
||||
|
|
Loading…
Reference in a new issue