mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-09-17 02:32:04 +00:00
The simple shader is only for HDR10 RGB textures
The use case for this is 2D render target overlays on HDR10 output. In this case we've already done the conversion to the output colorspace and we just want to get the pixels on the screen as fast as possible. Video frames still need YUV conversion, so they shouldn't go through this output path.
This commit is contained in:
@@ -2283,7 +2283,8 @@ static D3D11_Shader SelectShader(SDL_Renderer *renderer, const D3D11_PixelShader
|
||||
{
|
||||
if (shader_constants) {
|
||||
if (renderer->current_colorspace == SDL_COLORSPACE_HDR10) {
|
||||
if (shader_constants->input_type == INPUTTYPE_HDR10 &&
|
||||
if (shader_constants->texture_type == TEXTURETYPE_RGB &&
|
||||
shader_constants->input_type == INPUTTYPE_HDR10 &&
|
||||
!PQShaderScalesInput(shader_constants)) {
|
||||
// Do a simple 1-1 copy
|
||||
return SHADER_RGB_SIMPLE;
|
||||
|
||||
@@ -2748,7 +2748,8 @@ static D3D12_Shader SelectShader(SDL_Renderer *renderer, const D3D12_PixelShader
|
||||
{
|
||||
if (shader_constants) {
|
||||
if (renderer->current_colorspace == SDL_COLORSPACE_HDR10) {
|
||||
if (shader_constants->input_type == INPUTTYPE_HDR10 &&
|
||||
if (shader_constants->texture_type == TEXTURETYPE_RGB &&
|
||||
shader_constants->input_type == INPUTTYPE_HDR10 &&
|
||||
!PQShaderScalesInput(shader_constants)) {
|
||||
// Do a simple 1-1 copy
|
||||
return SHADER_RGB_SIMPLE;
|
||||
|
||||
@@ -3576,7 +3576,8 @@ static VULKAN_Shader SelectShader(SDL_Renderer *renderer, const VULKAN_PixelShad
|
||||
{
|
||||
if (shader_constants) {
|
||||
if (renderer->current_colorspace == SDL_COLORSPACE_HDR10) {
|
||||
if (shader_constants->input_type == INPUTTYPE_HDR10 &&
|
||||
if (shader_constants->texture_type == TEXTURETYPE_RGB &&
|
||||
shader_constants->input_type == INPUTTYPE_HDR10 &&
|
||||
!PQShaderScalesInput(shader_constants)) {
|
||||
// Do a simple 1-1 copy
|
||||
return SHADER_RGB_SIMPLE;
|
||||
|
||||
Reference in New Issue
Block a user