mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 17:30:12 +01:00
d3d12: Support d3d12_video_buffer_creation_mode::place_on_resource in d3d12_video_buffer_from_handle
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com> Reviewed-by: Yubo Xie <yuboxie@microsoft.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38144>
This commit is contained in:
parent
e55b2b5064
commit
484eeb762e
1 changed files with 6 additions and 0 deletions
|
|
@ -160,6 +160,12 @@ d3d12_video_buffer_from_handle(struct pipe_context *pipe,
|
|||
struct winsys_handle *handle,
|
||||
unsigned usage)
|
||||
{
|
||||
if (handle && handle->type == WINSYS_HANDLE_TYPE_D3D12_RES && handle->modifier == 2) // modifier==2 means "place on resource"
|
||||
{
|
||||
struct pipe_resource* resource = (struct pipe_resource*) handle->com_obj;
|
||||
return d3d12_video_buffer_create_impl(pipe, tmpl, resource, d3d12_video_buffer_creation_mode::place_on_resource, NULL, 0);
|
||||
}
|
||||
|
||||
struct pipe_video_buffer updated_template = {};
|
||||
if ((handle->format == PIPE_FORMAT_NONE) || (tmpl == nullptr) || (tmpl->buffer_format == PIPE_FORMAT_NONE) ||
|
||||
(tmpl->width == 0) || (tmpl->height == 0)) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue