summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2019-09-18 20:48:15 -0400
committerMarek Olšák <[email protected]>2019-10-09 17:06:54 -0400
commit35680bfea1d0e2fe8ee4504cf1e4ae4aa747b766 (patch)
tree921e0d45fc8b258329fa460f70ba3e0adcc63c1b /src/gallium/drivers
parenta122e708580627f10df00ab9ac3103c398f11a53 (diff)
vl: use u_format in vl_video_buffer_formats
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/r600/r600_uvd.c6
-rw-r--r--src/gallium/drivers/radeonsi/si_uvd.c6
2 files changed, 4 insertions, 8 deletions
diff --git a/src/gallium/drivers/r600/r600_uvd.c b/src/gallium/drivers/r600/r600_uvd.c
index ca4248aed69..2e7d7ee4d40 100644
--- a/src/gallium/drivers/r600/r600_uvd.c
+++ b/src/gallium/drivers/r600/r600_uvd.c
@@ -62,7 +62,7 @@ struct pipe_video_buffer *r600_video_buffer_create(struct pipe_context *pipe,
struct r600_texture *resources[VL_NUM_COMPONENTS] = {};
struct radeon_surf* surfaces[VL_NUM_COMPONENTS] = {};
struct pb_buffer **pbs[VL_NUM_COMPONENTS] = {};
- const enum pipe_format *resource_formats;
+ enum pipe_format resource_formats[3];
struct pipe_video_buffer template;
struct pipe_resource templ;
unsigned i, array_size;
@@ -70,9 +70,7 @@ struct pipe_video_buffer *r600_video_buffer_create(struct pipe_context *pipe,
assert(pipe);
/* first create the needed resources as "normal" textures */
- resource_formats = vl_video_buffer_formats(pipe->screen, tmpl->buffer_format);
- if (!resource_formats)
- return NULL;
+ vl_get_video_buffer_formats(pipe->screen, tmpl->buffer_format, resource_formats);
array_size = tmpl->interlaced ? 2 : 1;
template = *tmpl;
diff --git a/src/gallium/drivers/radeonsi/si_uvd.c b/src/gallium/drivers/radeonsi/si_uvd.c
index 19d1b09f1c1..1469b6ac7f1 100644
--- a/src/gallium/drivers/radeonsi/si_uvd.c
+++ b/src/gallium/drivers/radeonsi/si_uvd.c
@@ -44,7 +44,7 @@ struct pipe_video_buffer *si_video_buffer_create(struct pipe_context *pipe,
struct si_texture *resources[VL_NUM_COMPONENTS] = {};
struct radeon_surf *surfaces[VL_NUM_COMPONENTS] = {};
struct pb_buffer **pbs[VL_NUM_COMPONENTS] = {};
- const enum pipe_format *resource_formats;
+ enum pipe_format resource_formats[VL_NUM_COMPONENTS];
struct pipe_video_buffer vidtemplate;
struct pipe_resource templ;
unsigned i, array_size;
@@ -52,9 +52,7 @@ struct pipe_video_buffer *si_video_buffer_create(struct pipe_context *pipe,
assert(pipe);
/* first create the needed resources as "normal" textures */
- resource_formats = vl_video_buffer_formats(pipe->screen, tmpl->buffer_format);
- if (!resource_formats)
- return NULL;
+ vl_get_video_buffer_formats(pipe->screen, tmpl->buffer_format, resource_formats);
array_size = tmpl->interlaced ? 2 : 1;
vidtemplate = *tmpl;