opengl: Support NV12 textures on GPUs with only 2 texture units
parent
2fcd8f889c
commit
09b6956dcc
|
@ -1919,6 +1919,10 @@ GL_CreateRenderer(SDL_Window * window, Uint32 flags)
|
|||
if (data->shaders && data->num_texture_units >= 3) {
|
||||
renderer->info.texture_formats[renderer->info.num_texture_formats++] = SDL_PIXELFORMAT_YV12;
|
||||
renderer->info.texture_formats[renderer->info.num_texture_formats++] = SDL_PIXELFORMAT_IYUV;
|
||||
}
|
||||
|
||||
/* We support NV12 textures using 2 textures and a shader */
|
||||
if (data->shaders && data->num_texture_units >= 2) {
|
||||
renderer->info.texture_formats[renderer->info.num_texture_formats++] = SDL_PIXELFORMAT_NV12;
|
||||
renderer->info.texture_formats[renderer->info.num_texture_formats++] = SDL_PIXELFORMAT_NV21;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue