diff options
| author | 2018-05-30 22:50:41 -0400 | |
|---|---|---|
| committer | 2018-05-30 22:50:41 -0400 | |
| commit | 49309b58486391dedd90cdc9fcf57744fc35bd7e (patch) | |
| tree | 9f70cf62366d300bb0d2a8dae32c34a52b98a09b /src | |
| parent | gl_rasterizer_cache: Implement PixelFormat RGBA16F. (diff) | |
| download | yuzu-49309b58486391dedd90cdc9fcf57744fc35bd7e.tar.gz yuzu-49309b58486391dedd90cdc9fcf57744fc35bd7e.tar.xz yuzu-49309b58486391dedd90cdc9fcf57744fc35bd7e.zip | |
gl_rasterizer_cache: Assert that component type is UNorm or format is RGBA16F.
Diffstat (limited to 'src')
| -rw-r--r-- | src/video_core/renderer_opengl/gl_rasterizer_cache.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp b/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp index 193362f1c..10a460a82 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp | |||
| @@ -59,7 +59,8 @@ static const FormatTuple& GetFormatTuple(PixelFormat pixel_format, ComponentType | |||
| 59 | const SurfaceType type = SurfaceParams::GetFormatType(pixel_format); | 59 | const SurfaceType type = SurfaceParams::GetFormatType(pixel_format); |
| 60 | if (type == SurfaceType::ColorTexture) { | 60 | if (type == SurfaceType::ColorTexture) { |
| 61 | ASSERT(static_cast<size_t>(pixel_format) < tex_format_tuples.size()); | 61 | ASSERT(static_cast<size_t>(pixel_format) < tex_format_tuples.size()); |
| 62 | // For now only UNORM components are supported | 62 | // For now only UNORM components are supported, or RGBA16F which is type FLOAT |
| 63 | ASSERT(component_type == ComponentType::UNorm || pixel_format == PixelFormat::RGBA16F); | ||
| 63 | return tex_format_tuples[static_cast<unsigned int>(pixel_format)]; | 64 | return tex_format_tuples[static_cast<unsigned int>(pixel_format)]; |
| 64 | } else if (type == SurfaceType::Depth || type == SurfaceType::DepthStencil) { | 65 | } else if (type == SurfaceType::Depth || type == SurfaceType::DepthStencil) { |
| 65 | // TODO(Subv): Implement depth formats | 66 | // TODO(Subv): Implement depth formats |