mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 06:58:05 +02:00
vl: Don't check npot textures support when creating buffers
This is the only place where PIPE_VIDEO_CAP_NPOT_TEXTURES is used, but all video drivers supports npot textures. Reviewed-by: Ruijing Dong <ruijing.dong@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40644>
This commit is contained in:
parent
37c6144e8b
commit
105ddb028e
1 changed files with 2 additions and 13 deletions
|
|
@ -390,26 +390,15 @@ vl_video_buffer_create(struct pipe_context *pipe,
|
|||
{
|
||||
enum pipe_format resource_formats[VL_NUM_COMPONENTS];
|
||||
struct pipe_video_buffer templat, *result;
|
||||
bool pot_buffers;
|
||||
|
||||
assert(pipe);
|
||||
assert(tmpl->width > 0 && tmpl->height > 0);
|
||||
|
||||
pot_buffers = !pipe->screen->get_video_param
|
||||
(
|
||||
pipe->screen,
|
||||
PIPE_VIDEO_PROFILE_UNKNOWN,
|
||||
PIPE_VIDEO_ENTRYPOINT_UNKNOWN,
|
||||
PIPE_VIDEO_CAP_NPOT_TEXTURES
|
||||
);
|
||||
|
||||
vl_get_video_buffer_formats(pipe->screen, tmpl->buffer_format, resource_formats);
|
||||
|
||||
templat = *tmpl;
|
||||
templat.width = pot_buffers ? util_next_power_of_two(tmpl->width)
|
||||
: align(tmpl->width, VL_MACROBLOCK_WIDTH);
|
||||
templat.height = pot_buffers ? util_next_power_of_two(tmpl->height)
|
||||
: align(tmpl->height, VL_MACROBLOCK_HEIGHT);
|
||||
templat.width = align(tmpl->width, VL_MACROBLOCK_WIDTH);
|
||||
templat.height = align(tmpl->height, VL_MACROBLOCK_HEIGHT);
|
||||
|
||||
if (tmpl->interlaced)
|
||||
templat.height /= 2;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue