Browse Source
Merge pull request #527 from Subv/rgba32f_texcopy
GPU: Allow the usage of RGBA32_FLOAT and RGBA16_FLOAT in the texture copy engine.
pull/15/merge
bunnei
8 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
5 additions and
0 deletions
-
src/video_core/gpu.cpp
-
src/video_core/gpu.h
|
|
@ -26,6 +26,10 @@ u32 RenderTargetBytesPerPixel(RenderTargetFormat format) { |
|
|
ASSERT(format != RenderTargetFormat::NONE); |
|
|
ASSERT(format != RenderTargetFormat::NONE); |
|
|
|
|
|
|
|
|
switch (format) { |
|
|
switch (format) { |
|
|
|
|
|
case RenderTargetFormat::RGBA32_FLOAT: |
|
|
|
|
|
return 16; |
|
|
|
|
|
case RenderTargetFormat::RGBA16_FLOAT: |
|
|
|
|
|
return 8; |
|
|
case RenderTargetFormat::RGBA8_UNORM: |
|
|
case RenderTargetFormat::RGBA8_UNORM: |
|
|
case RenderTargetFormat::RGB10_A2_UNORM: |
|
|
case RenderTargetFormat::RGB10_A2_UNORM: |
|
|
return 4; |
|
|
return 4; |
|
|
|
|
|
@ -15,6 +15,7 @@ namespace Tegra { |
|
|
|
|
|
|
|
|
enum class RenderTargetFormat : u32 { |
|
|
enum class RenderTargetFormat : u32 { |
|
|
NONE = 0x0, |
|
|
NONE = 0x0, |
|
|
|
|
|
RGBA32_FLOAT = 0xC0, |
|
|
RGBA16_FLOAT = 0xCA, |
|
|
RGBA16_FLOAT = 0xCA, |
|
|
RGB10_A2_UNORM = 0xD1, |
|
|
RGB10_A2_UNORM = 0xD1, |
|
|
RGBA8_UNORM = 0xD5, |
|
|
RGBA8_UNORM = 0xD5, |
|
|
|