mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-29 21:21:12 +00:00
d3d12overlaycompositor: Remove unused parameter
Don't need to check fence value of overlay buffer since window uses global direct command queue Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7013>
This commit is contained in:
parent
f91be03550
commit
c00c36e33b
3 changed files with 6 additions and 21 deletions
|
@ -167,7 +167,7 @@ gst_d3d12_overlay_rect_free (GstD3D12OverlayRect * rect)
|
|||
|
||||
static GstD3D12OverlayRect *
|
||||
gst_d3d12_overlay_rect_new (GstD3D12OverlayCompositor * self,
|
||||
GstVideoOverlayRectangle * overlay_rect, guint64 & fence_val)
|
||||
GstVideoOverlayRectangle * overlay_rect)
|
||||
{
|
||||
auto priv = self->priv;
|
||||
gint x, y;
|
||||
|
@ -178,8 +178,6 @@ gst_d3d12_overlay_rect_new (GstD3D12OverlayCompositor * self,
|
|||
GstVideoOverlayFormatFlags flags;
|
||||
gboolean premul_alpha = FALSE;
|
||||
|
||||
fence_val = 0;
|
||||
|
||||
if (!gst_video_overlay_rectangle_get_render_rectangle (overlay_rect, &x, &y,
|
||||
&width, &height)) {
|
||||
GST_ERROR_OBJECT (self, "Failed to get render rectangle");
|
||||
|
@ -212,7 +210,6 @@ gst_d3d12_overlay_rect_new (GstD3D12OverlayCompositor * self,
|
|||
gst_d3d12_memory_get_shader_resource_view_heap (dmem)) {
|
||||
texture = gst_d3d12_memory_get_resource_handle (dmem);
|
||||
is_d3d12 = true;
|
||||
fence_val = dmem->fence_value;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -651,7 +648,7 @@ gst_d3d12_overlay_compositor_foreach_meta (GstBuffer * buffer, GstMeta ** meta,
|
|||
|
||||
gboolean
|
||||
gst_d3d12_overlay_compositor_upload (GstD3D12OverlayCompositor * compositor,
|
||||
GstBuffer * buf, guint64 * fence_val)
|
||||
GstBuffer * buf)
|
||||
{
|
||||
g_return_val_if_fail (compositor != nullptr, FALSE);
|
||||
g_return_val_if_fail (GST_IS_BUFFER (buf), FALSE);
|
||||
|
@ -659,8 +656,6 @@ gst_d3d12_overlay_compositor_upload (GstD3D12OverlayCompositor * compositor,
|
|||
auto priv = compositor->priv;
|
||||
priv->rects_to_upload.clear ();
|
||||
|
||||
*fence_val = 0;
|
||||
|
||||
gst_buffer_foreach_meta (buf,
|
||||
(GstBufferForeachMetaFunc) gst_d3d12_overlay_compositor_foreach_meta,
|
||||
compositor);
|
||||
|
@ -675,7 +670,6 @@ gst_d3d12_overlay_compositor_upload (GstD3D12OverlayCompositor * compositor,
|
|||
GST_LOG_OBJECT (compositor, "Found %" G_GSIZE_FORMAT
|
||||
" overlay rectangles", priv->rects_to_upload.size ());
|
||||
|
||||
guint64 max_fence_val = 0;
|
||||
for (size_t i = 0; i < priv->rects_to_upload.size (); i++) {
|
||||
GList *iter;
|
||||
bool found = false;
|
||||
|
@ -688,14 +682,10 @@ gst_d3d12_overlay_compositor_upload (GstD3D12OverlayCompositor * compositor,
|
|||
}
|
||||
|
||||
if (!found) {
|
||||
guint64 cur_fence_val = 0;
|
||||
auto new_rect = gst_d3d12_overlay_rect_new (compositor,
|
||||
priv->rects_to_upload[i], cur_fence_val);
|
||||
if (new_rect) {
|
||||
priv->rects_to_upload[i]);
|
||||
if (new_rect)
|
||||
priv->overlays = g_list_append (priv->overlays, new_rect);
|
||||
if (max_fence_val < cur_fence_val)
|
||||
max_fence_val = cur_fence_val;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -716,8 +706,6 @@ gst_d3d12_overlay_compositor_upload (GstD3D12OverlayCompositor * compositor,
|
|||
}
|
||||
}
|
||||
|
||||
*fence_val = max_fence_val;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
|
@ -35,8 +35,7 @@ GstD3D12OverlayCompositor * gst_d3d12_overlay_compositor_new (GstD3D12Device *
|
|||
const GstVideoInfo * info);
|
||||
|
||||
gboolean gst_d3d12_overlay_compositor_upload (GstD3D12OverlayCompositor * compositor,
|
||||
GstBuffer * buf,
|
||||
guint64 * fence_val);
|
||||
GstBuffer * buf);
|
||||
|
||||
gboolean gst_d3d12_overlay_compositor_update_viewport (GstD3D12OverlayCompositor * compositor,
|
||||
GstVideoRectangle * viewport);
|
||||
|
|
|
@ -1668,9 +1668,7 @@ gst_d3d12_window_set_buffer (GstD3D12Window * window, GstBuffer * buffer)
|
|||
&priv->output_rect);
|
||||
}
|
||||
|
||||
guint64 overlay_fence_val = 0;
|
||||
gst_d3d12_overlay_compositor_upload (priv->ctx->comp, priv->ctx->cached_buf,
|
||||
&overlay_fence_val);
|
||||
gst_d3d12_overlay_compositor_upload (priv->ctx->comp, priv->ctx->cached_buf);
|
||||
|
||||
GstD3D12CommandAllocator *gst_ca;
|
||||
if (!gst_d3d12_command_allocator_pool_acquire (priv->ctx->ca_pool, &gst_ca)) {
|
||||
|
|
Loading…
Reference in a new issue