mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-01-28 13:05:02 -08:00
libs/vkd3d: Implement d3d12_command_list_OMSetRenderTargets().
This commit is contained in:
parent
7add62e552
commit
74fe2ec411
@ -1458,10 +1458,36 @@ static void STDMETHODCALLTYPE d3d12_command_list_OMSetRenderTargets(ID3D12Graphi
|
||||
UINT render_target_descriptor_count, const D3D12_CPU_DESCRIPTOR_HANDLE *render_target_descriptors,
|
||||
BOOL single_descriptor_handle, const D3D12_CPU_DESCRIPTOR_HANDLE *depth_stencil_descriptor)
|
||||
{
|
||||
FIXME("iface %p, render_target_descriptor_count %u, render_target_descriptors %p, "
|
||||
"single_descriptor_handle %#x, depth_stencil_descriptor %p stub!\n",
|
||||
struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList(iface);
|
||||
unsigned int i;
|
||||
|
||||
TRACE("iface %p, render_target_descriptor_count %u, render_target_descriptors %p, "
|
||||
"single_descriptor_handle %#x, depth_stencil_descriptor %p.\n",
|
||||
iface, render_target_descriptor_count, render_target_descriptors,
|
||||
single_descriptor_handle, depth_stencil_descriptor);
|
||||
|
||||
if (depth_stencil_descriptor)
|
||||
FIXME("Ignoring depth/stencil descriptor %p.\n", depth_stencil_descriptor);
|
||||
|
||||
if (render_target_descriptor_count > ARRAY_SIZE(list->views))
|
||||
{
|
||||
WARN("Descriptor count %u > %zu, ignoring extra descriptors.\n",
|
||||
render_target_descriptor_count, ARRAY_SIZE(list->views));
|
||||
render_target_descriptor_count = ARRAY_SIZE(list->views);
|
||||
}
|
||||
|
||||
list->fb_width = 0;
|
||||
list->fb_height = 0;
|
||||
for (i = 0; i < render_target_descriptor_count; ++i)
|
||||
{
|
||||
const struct d3d12_rtv_desc *rtv_desc = (const struct d3d12_rtv_desc *)render_target_descriptors[i].ptr;
|
||||
|
||||
list->views[i] = rtv_desc->vk_view;
|
||||
if (rtv_desc->width > list->fb_width)
|
||||
list->fb_width = rtv_desc->width;
|
||||
if (rtv_desc->height > list->fb_height)
|
||||
list->fb_height = rtv_desc->height;
|
||||
}
|
||||
}
|
||||
|
||||
static void STDMETHODCALLTYPE d3d12_command_list_ClearDepthStencilView(ID3D12GraphicsCommandList *iface,
|
||||
@ -1769,6 +1795,10 @@ static HRESULT d3d12_command_list_init(struct d3d12_command_list *list, struct d
|
||||
list->ia_desc.topology = VK_PRIMITIVE_TOPOLOGY_POINT_LIST;
|
||||
list->ia_desc.primitiveRestartEnable = VK_FALSE;
|
||||
|
||||
memset(list->views, 0, sizeof(list->views));
|
||||
list->fb_width = 0;
|
||||
list->fb_height = 0;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
@ -232,6 +232,10 @@ struct d3d12_command_list
|
||||
uint32_t strides[D3D12_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT];
|
||||
struct VkPipelineInputAssemblyStateCreateInfo ia_desc;
|
||||
|
||||
VkImageView views[D3D12_SIMULTANEOUS_RENDER_TARGET_COUNT];
|
||||
unsigned int fb_width;
|
||||
unsigned int fb_height;
|
||||
|
||||
struct d3d12_command_allocator *allocator;
|
||||
struct d3d12_device *device;
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user