From 105ddb028ec150d2521ddde4901730e8ce35b677 Mon Sep 17 00:00:00 2001 From: David Rosca Date: Thu, 26 Mar 2026 11:08:10 +0100 Subject: [PATCH] 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 Part-of: --- src/gallium/auxiliary/vl/vl_video_buffer.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/src/gallium/auxiliary/vl/vl_video_buffer.c b/src/gallium/auxiliary/vl/vl_video_buffer.c index 85dc4394140..0e808b6499f 100644 --- a/src/gallium/auxiliary/vl/vl_video_buffer.c +++ b/src/gallium/auxiliary/vl/vl_video_buffer.c @@ -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;