File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -706,7 +706,8 @@ HRESULT CursorDrawer2::_InitializeCursorTexture(_CursorInfo& cursorInfo) noexcep
706706 CD3DX12_HEAP_PROPERTIES heapProperties (D3D12_HEAP_TYPE_UPLOAD);
707707
708708 CD3DX12_RESOURCE_DESC texDesc = CD3DX12_RESOURCE_DESC::Tex2D (
709- cursorInfo.type == _CursorType::Monochrome ? DXGI_FORMAT_R8_UNORM : DXGI_FORMAT_R16G16B16A16_FLOAT,
709+ cursorInfo.type == _CursorType::Color ? DXGI_FORMAT_R16G16B16A16_FLOAT :
710+ (cursorInfo.type == _CursorType::Monochrome ? DXGI_FORMAT_R8_UNORM : DXGI_FORMAT_R8G8B8A8_UNORM),
710711 cursorInfo.originSize .width , cursorInfo.originSize .height , 1 , 1 );
711712
712713 D3D12_PLACED_SUBRESOURCE_FOOTPRINT textureLayout;
@@ -716,7 +717,7 @@ HRESULT CursorDrawer2::_InitializeCursorTexture(_CursorInfo& cursorInfo) noexcep
716717 &textureLayout, nullptr , &textureRowSizeInBytes, &textureSize);
717718
718719 assert (textureRowSizeInBytes == cursorInfo.originSize .width *
719- (cursorInfo.type == _CursorType::Monochrome ? 1 : 8 ));
720+ (cursorInfo.type == _CursorType::Color ? 8 : (cursorInfo. type == _CursorType:: Monochrome ? 1 : 4 ) ));
720721
721722 CD3DX12_RESOURCE_DESC bufferDesc = CD3DX12_RESOURCE_DESC::Buffer (textureSize);
722723
You can’t perform that action at this time.
0 commit comments