vkr: add VK_EXT_line_rasterization support

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/virgl/virglrenderer/-/merge_requests/721>
macos/master
Yiwei Zhang 3 years ago committed by Marge Bot
parent 5180163393
commit ac9d7987d7
  1. 13
      src/venus/vkr_command_buffer.c
  2. 1
      src/venus/vkr_common.c
  3. 3
      src/venus/vkr_device.c
  4. 2
      src/venus/vkr_device.h

@ -578,6 +578,17 @@ vkr_dispatch_vkCmdDrawIndexedIndirectCount(
args->countBufferOffset, args->maxDrawCount, args->stride); args->countBufferOffset, args->maxDrawCount, args->stride);
} }
static void
vkr_dispatch_vkCmdSetLineStippleEXT(UNUSED struct vn_dispatch_context *dispatch,
struct vn_command_vkCmdSetLineStippleEXT *args)
{
struct vkr_command_buffer *cmd = vkr_command_buffer_from_handle(args->commandBuffer);
vn_replace_vkCmdSetLineStippleEXT_args_handle(args);
cmd->device->cmd_set_line_stipple(args->commandBuffer, args->lineStippleFactor,
args->lineStipplePattern);
}
static void static void
vkr_dispatch_vkCmdBindTransformFeedbackBuffersEXT( vkr_dispatch_vkCmdBindTransformFeedbackBuffersEXT(
UNUSED struct vn_dispatch_context *dispatch, UNUSED struct vn_dispatch_context *dispatch,
@ -856,6 +867,8 @@ vkr_context_init_command_buffer_dispatch(struct vkr_context *ctx)
dispatch->dispatch_vkCmdDrawIndexedIndirectCount = dispatch->dispatch_vkCmdDrawIndexedIndirectCount =
vkr_dispatch_vkCmdDrawIndexedIndirectCount; vkr_dispatch_vkCmdDrawIndexedIndirectCount;
dispatch->dispatch_vkCmdSetLineStippleEXT = vkr_dispatch_vkCmdSetLineStippleEXT;
dispatch->dispatch_vkCmdBindTransformFeedbackBuffersEXT = dispatch->dispatch_vkCmdBindTransformFeedbackBuffersEXT =
vkr_dispatch_vkCmdBindTransformFeedbackBuffersEXT; vkr_dispatch_vkCmdBindTransformFeedbackBuffersEXT;
dispatch->dispatch_vkCmdBeginTransformFeedbackEXT = dispatch->dispatch_vkCmdBeginTransformFeedbackEXT =

@ -96,6 +96,7 @@ static const struct vn_info_extension_table vkr_extension_table = {
.EXT_custom_border_color = true, .EXT_custom_border_color = true,
.EXT_external_memory_dma_buf = true, .EXT_external_memory_dma_buf = true,
.EXT_image_drm_format_modifier = true, .EXT_image_drm_format_modifier = true,
.EXT_line_rasterization = true,
.EXT_queue_family_foreign = true, .EXT_queue_family_foreign = true,
.EXT_transform_feedback = true, .EXT_transform_feedback = true,
}; };

@ -185,6 +185,9 @@ vkr_device_init_entry_points(struct vkr_device *dev, uint32_t api_version)
handle, "vkCmdSetViewportWithCountEXT"); handle, "vkCmdSetViewportWithCountEXT");
} }
dev->cmd_set_line_stipple =
(PFN_vkCmdSetLineStippleEXT)vkGetDeviceProcAddr(handle, "vkCmdSetLineStippleEXT");
dev->cmd_bind_transform_feedback_buffers = dev->cmd_bind_transform_feedback_buffers =
(PFN_vkCmdBindTransformFeedbackBuffersEXT)vkGetDeviceProcAddr( (PFN_vkCmdBindTransformFeedbackBuffersEXT)vkGetDeviceProcAddr(
handle, "vkCmdBindTransformFeedbackBuffersEXT"); handle, "vkCmdBindTransformFeedbackBuffersEXT");

@ -44,6 +44,8 @@ struct vkr_device {
PFN_vkCmdSetStencilTestEnable cmd_set_stencil_test_enable; PFN_vkCmdSetStencilTestEnable cmd_set_stencil_test_enable;
PFN_vkCmdSetViewportWithCount cmd_set_viewport_with_count; PFN_vkCmdSetViewportWithCount cmd_set_viewport_with_count;
PFN_vkCmdSetLineStippleEXT cmd_set_line_stipple;
PFN_vkCmdBindTransformFeedbackBuffersEXT cmd_bind_transform_feedback_buffers; PFN_vkCmdBindTransformFeedbackBuffersEXT cmd_bind_transform_feedback_buffers;
PFN_vkCmdBeginTransformFeedbackEXT cmd_begin_transform_feedback; PFN_vkCmdBeginTransformFeedbackEXT cmd_begin_transform_feedback;
PFN_vkCmdEndTransformFeedbackEXT cmd_end_transform_feedback; PFN_vkCmdEndTransformFeedbackEXT cmd_end_transform_feedback;

Loading…
Cancel
Save