mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-04 14:08:37 +00:00
gl: Fall back to renderpass decoder on ATI drivers
This commit is contained in:
parent
fafae1cbb5
commit
6d43fcf8fb
4 changed files with 80 additions and 14 deletions
|
|
@ -3,12 +3,27 @@ R"(
|
|||
#extension GL_ARB_shader_stencil_export : enable
|
||||
|
||||
#define ENABLE_DEPTH_STENCIL_LOAD %stencil_export_supported
|
||||
#define LEGACY_FORMAT_SUPPORT %legacy_format_support
|
||||
|
||||
#define FMT_GL_DEPTH_COMPONENT16 0x81A5
|
||||
#define FMT_GL_DEPTH_COMPONENT32F 0x8CAC
|
||||
#define FMT_GL_DEPTH24_STENCIL8 0x88F0
|
||||
#define FMT_GL_DEPTH32F_STENCIL8 0x8CAD
|
||||
|
||||
#if LEGACY_FORMAT_SUPPORT
|
||||
#define FMT_GL_RGBA8 0x8058
|
||||
#define FMT_GL_BGRA8 0x80E1
|
||||
#define FMT_GL_R8 0x8229
|
||||
#define FMT_GL_R16 0x822A
|
||||
#define FMT_GL_R32F 0x822E
|
||||
#define FMT_GL_RG8 0x822B
|
||||
#define FMT_GL_RG8_SNORM 0x8F95
|
||||
#define FMT_GL_RG16 0x822C
|
||||
#define FMT_GL_RG16F 0x822F
|
||||
#define FMT_GL_RGBA16F 0x881A
|
||||
#define FMT_GL_RGBA32F 0x8814
|
||||
#endif
|
||||
|
||||
#define FMT_GL_RGB565 0x8D62
|
||||
#define FMT_GL_RGB5_A1 0x8057
|
||||
#define FMT_GL_BGR5_A1 0x99F0
|
||||
|
|
@ -144,6 +159,45 @@ void main()
|
|||
gl_FragStencilRefARB = int(utmp2.y);
|
||||
break;
|
||||
|
||||
#endif
|
||||
|
||||
#if LEGACY_FORMAT_SUPPORT
|
||||
|
||||
// Simple color. Provided for compatibility with old drivers.
|
||||
case FMT_GL_RGBA8:
|
||||
outColor = readFixed8x4(invocation_id);
|
||||
break;
|
||||
case FMT_GL_BGRA8:
|
||||
outColor = readFixed8x4(invocation_id).bgra;
|
||||
break;
|
||||
case FMT_GL_R8:
|
||||
outColor.r = readFixed8(invocation_id);
|
||||
break;
|
||||
case FMT_GL_R16:
|
||||
outColor.r = readFixed16(invocation_id);
|
||||
break;
|
||||
case FMT_GL_R32F:
|
||||
outColor.r = readFloat32(invocation_id);
|
||||
break;
|
||||
case FMT_GL_RG8:
|
||||
outColor.rg = readFixed8x2(invocation_id);
|
||||
break;
|
||||
case FMT_GL_RG8_SNORM:
|
||||
outColor.rg = readFixed8x2Snorm(invocation_id);
|
||||
break;
|
||||
case FMT_GL_RG16:
|
||||
outColor.rg = readFixed16x2(invocation_id);
|
||||
break;
|
||||
case FMT_GL_RG16F:
|
||||
outColor.rg = readFloat16x2(invocation_id);
|
||||
break;
|
||||
case FMT_GL_RGBA16F:
|
||||
outColor = readFloat16x4(invocation_id);
|
||||
break;
|
||||
case FMT_GL_RGBA32F:
|
||||
outColor = readFloat32x4(invocation_id);
|
||||
break;
|
||||
|
||||
#endif
|
||||
|
||||
// Packed color
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue