mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-01-28 13:05:02 -08:00
vkd3d: Enable transform feedback for pipeline states with stream output.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
1aae46fb2f
commit
1e4f8e39c9
@ -1304,6 +1304,13 @@ static void d3d12_command_list_end_current_render_pass(struct d3d12_command_list
|
||||
{
|
||||
const struct vkd3d_vk_device_procs *vk_procs = &list->device->vk_procs;
|
||||
|
||||
if (list->xfb_enabled)
|
||||
{
|
||||
VK_CALL(vkCmdEndTransformFeedbackEXT(list->vk_command_buffer, 0, ARRAY_SIZE(list->so_counter_buffers),
|
||||
list->so_counter_buffers, list->so_counter_buffer_offsets));
|
||||
list->xfb_enabled = false;
|
||||
}
|
||||
|
||||
if (list->current_render_pass)
|
||||
VK_CALL(vkCmdEndRenderPass(list->vk_command_buffer));
|
||||
|
||||
@ -1746,6 +1753,8 @@ static void d3d12_command_list_reset_state(struct d3d12_command_list *list,
|
||||
list->fb_height = 0;
|
||||
list->fb_layer_count = 0;
|
||||
|
||||
list->xfb_enabled = false;
|
||||
|
||||
list->current_framebuffer = VK_NULL_HANDLE;
|
||||
list->current_pipeline = VK_NULL_HANDLE;
|
||||
list->current_render_pass = VK_NULL_HANDLE;
|
||||
@ -2252,6 +2261,7 @@ static void d3d12_command_list_update_descriptors(struct d3d12_command_list *lis
|
||||
static bool d3d12_command_list_begin_render_pass(struct d3d12_command_list *list)
|
||||
{
|
||||
const struct vkd3d_vk_device_procs *vk_procs = &list->device->vk_procs;
|
||||
struct d3d12_graphics_pipeline_state *graphics;
|
||||
struct VkRenderPassBeginInfo begin_desc;
|
||||
VkRenderPass vk_render_pass;
|
||||
|
||||
@ -2287,6 +2297,15 @@ static bool d3d12_command_list_begin_render_pass(struct d3d12_command_list *list
|
||||
|
||||
list->current_render_pass = vk_render_pass;
|
||||
|
||||
graphics = &list->state->u.graphics;
|
||||
if (graphics->xfb_enabled)
|
||||
{
|
||||
VK_CALL(vkCmdBeginTransformFeedbackEXT(list->vk_command_buffer, 0, ARRAY_SIZE(list->so_counter_buffers),
|
||||
list->so_counter_buffers, list->so_counter_buffer_offsets));
|
||||
|
||||
list->xfb_enabled = true;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -2165,6 +2165,7 @@ static HRESULT d3d12_pipeline_state_init_graphics(struct d3d12_pipeline_state *s
|
||||
}
|
||||
}
|
||||
|
||||
graphics->xfb_enabled = false;
|
||||
if (so_desc->NumEntries)
|
||||
{
|
||||
if (!vk_info->EXT_transform_feedback)
|
||||
@ -2174,6 +2175,8 @@ static HRESULT d3d12_pipeline_state_init_graphics(struct d3d12_pipeline_state *s
|
||||
goto fail;
|
||||
}
|
||||
|
||||
graphics->xfb_enabled = true;
|
||||
|
||||
xfb_info.type = VKD3D_SHADER_STRUCTURE_TYPE_TRANSFORM_FEEDBACK_INFO;
|
||||
xfb_info.next = NULL;
|
||||
|
||||
|
@ -620,6 +620,8 @@ struct d3d12_graphics_pipeline_state
|
||||
const struct d3d12_root_signature *root_signature;
|
||||
|
||||
struct list compiled_pipelines;
|
||||
|
||||
bool xfb_enabled;
|
||||
};
|
||||
|
||||
struct d3d12_compute_pipeline_state
|
||||
@ -788,6 +790,8 @@ struct d3d12_command_list
|
||||
unsigned int fb_height;
|
||||
unsigned int fb_layer_count;
|
||||
|
||||
bool xfb_enabled;
|
||||
|
||||
VkFramebuffer current_framebuffer;
|
||||
VkPipeline current_pipeline;
|
||||
VkRenderPass current_render_pass;
|
||||
|
Loading…
x
Reference in New Issue
Block a user