mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
libs/vkd3d: Implement d3d12_command_list_RSSetScissorRects().
This commit is contained in:
parent
c7f6dc53b3
commit
42c1e0c0fb
@ -809,8 +809,31 @@ static void STDMETHODCALLTYPE d3d12_command_list_RSSetViewports(ID3D12GraphicsCo
|
|||||||
static void STDMETHODCALLTYPE d3d12_command_list_RSSetScissorRects(ID3D12GraphicsCommandList *iface,
|
static void STDMETHODCALLTYPE d3d12_command_list_RSSetScissorRects(ID3D12GraphicsCommandList *iface,
|
||||||
UINT rect_count, const D3D12_RECT *rects)
|
UINT rect_count, const D3D12_RECT *rects)
|
||||||
{
|
{
|
||||||
FIXME("iface %p, rect_count %u, rects %p stub!\n",
|
struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList(iface);
|
||||||
iface, rect_count, rects);
|
const struct vkd3d_vk_device_procs *vk_procs;
|
||||||
|
struct VkRect2D *vk_rects;
|
||||||
|
unsigned int i;
|
||||||
|
|
||||||
|
TRACE("iface %p, rect_count %u, rects %p.\n", iface, rect_count, rects);
|
||||||
|
|
||||||
|
if (!(vk_rects = vkd3d_calloc(rect_count, sizeof(*vk_rects))))
|
||||||
|
{
|
||||||
|
ERR("Failed to allocate Vulkan scissor rects.\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (i = 0; i < rect_count; ++i)
|
||||||
|
{
|
||||||
|
vk_rects[i].offset.x = rects[i].left;
|
||||||
|
vk_rects[i].offset.y = rects[i].top;
|
||||||
|
vk_rects[i].extent.width = rects[i].right - rects[i].left;
|
||||||
|
vk_rects[i].extent.height = rects[i].bottom - rects[i].top;
|
||||||
|
}
|
||||||
|
|
||||||
|
vk_procs = &list->device->vk_procs;
|
||||||
|
VK_CALL(vkCmdSetScissor(list->vk_command_buffer, 0, rect_count, vk_rects));
|
||||||
|
|
||||||
|
free(vk_rects);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void STDMETHODCALLTYPE d3d12_command_list_OMSetBlendFactor(ID3D12GraphicsCommandList *iface,
|
static void STDMETHODCALLTYPE d3d12_command_list_OMSetBlendFactor(ID3D12GraphicsCommandList *iface,
|
||||||
|
Loading…
Reference in New Issue
Block a user