mirror of
https://github.com/WinampDesktop/winamp.git
synced 2025-06-18 19:45:47 -04:00
HostDisplay: Clamp scissor rect for cursor
Scissor with x/y < 0 is invalid. To you know who you are, stop copying these changes and putting your name on it, or respect the copyright declared in the files. You're violating both copyright as well as the license by not attributing.
This commit is contained in:
@ -727,7 +727,7 @@ void D3D12HostDisplay::RenderDisplay(ID3D12GraphicsCommandList* cmdlist, s32 lef
|
||||
cmdlist->SetGraphicsRootDescriptorTable(1, texture->GetSRVDescriptor());
|
||||
cmdlist->SetGraphicsRootDescriptorTable(2, linear_filter ? m_linear_sampler : m_point_sampler);
|
||||
|
||||
D3D12::SetViewportAndScissor(cmdlist, left, top, width, height);
|
||||
D3D12::SetViewportAndClampScissor(cmdlist, left, top, width, height);
|
||||
|
||||
cmdlist->IASetPrimitiveTopology(D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST);
|
||||
cmdlist->DrawInstanced(3, 1, 0, 0);
|
||||
@ -753,7 +753,7 @@ void D3D12HostDisplay::RenderSoftwareCursor(ID3D12GraphicsCommandList* cmdlist,
|
||||
cmdlist->SetGraphicsRootDescriptorTable(1, static_cast<D3D12::Texture*>(texture_handle)->GetSRVDescriptor());
|
||||
cmdlist->SetGraphicsRootDescriptorTable(2, m_linear_sampler);
|
||||
|
||||
D3D12::SetViewportAndScissor(cmdlist, left, top, width, height);
|
||||
D3D12::SetViewportAndClampScissor(cmdlist, left, top, width, height);
|
||||
|
||||
cmdlist->IASetPrimitiveTopology(D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST);
|
||||
cmdlist->DrawInstanced(3, 1, 0, 0);
|
||||
|
@ -851,7 +851,7 @@ void VulkanHostDisplay::RenderDisplay(s32 left, s32 top, s32 width, s32 height,
|
||||
vkCmdBindPipeline(cmdbuffer, VK_PIPELINE_BIND_POINT_GRAPHICS, m_display_pipeline);
|
||||
vkCmdPushConstants(cmdbuffer, m_pipeline_layout, VK_SHADER_STAGE_VERTEX_BIT, 0, sizeof(pc), &pc);
|
||||
vkCmdBindDescriptorSets(cmdbuffer, VK_PIPELINE_BIND_POINT_GRAPHICS, m_pipeline_layout, 0, 1, &ds, 0, nullptr);
|
||||
Vulkan::Util::SetViewportAndScissor(cmdbuffer, left, top, width, height);
|
||||
Vulkan::Util::SetViewportAndClampScissor(cmdbuffer, left, top, width, height);
|
||||
vkCmdDraw(cmdbuffer, 3, 1, 0, 0);
|
||||
}
|
||||
|
||||
@ -895,7 +895,7 @@ void VulkanHostDisplay::RenderSoftwareCursor(s32 left, s32 top, s32 width, s32 h
|
||||
vkCmdBindPipeline(cmdbuffer, VK_PIPELINE_BIND_POINT_GRAPHICS, m_cursor_pipeline);
|
||||
vkCmdPushConstants(cmdbuffer, m_pipeline_layout, VK_SHADER_STAGE_VERTEX_BIT, 0, sizeof(pc), &pc);
|
||||
vkCmdBindDescriptorSets(cmdbuffer, VK_PIPELINE_BIND_POINT_GRAPHICS, m_pipeline_layout, 0, 1, &ds, 0, nullptr);
|
||||
Vulkan::Util::SetViewportAndScissor(cmdbuffer, left, top, width, height);
|
||||
Vulkan::Util::SetViewportAndClampScissor(cmdbuffer, left, top, width, height);
|
||||
vkCmdDraw(cmdbuffer, 3, 1, 0, 0);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user