diff options
author | Shannon Woods <shannonwoods@chromium.org> | 2013-07-24 19:08:02 -0400 |
---|---|---|
committer | Shannon Woods <shannonwoods@chromium.org> | 2013-07-24 19:08:02 -0400 |
commit | 5b3f92177fd5cefb4833d48d47f0f4dcea3955b5 (patch) | |
tree | 2378b2ae25433d3192059a4a6d22784123d7f99d | |
parent | ba6944849acb31e9db7e1f157cdbaf3a249512ee (diff) | |
download | angle_dx11-5b3f92177fd5cefb4833d48d47f0f4dcea3955b5.tar.gz |
Uses R32G32B32A32_FLOAT textures to emulate RGB32F
TRAC #23523
Author: Shannon Woods
Signed-off-by: Geoff Lang
Signed-off-by: Jamie Madill
-rw-r--r-- | src/common/version.h | 2 | ||||
-rw-r--r-- | src/libGLESv2/renderer/Image11.cpp | 4 | ||||
-rw-r--r-- | src/libGLESv2/renderer/TextureStorage11.cpp | 2 | ||||
-rw-r--r-- | src/libGLESv2/renderer/renderer11_utils.cpp | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/src/common/version.h b/src/common/version.h index c8ff6364..6f34076e 100644 --- a/src/common/version.h +++ b/src/common/version.h @@ -1,7 +1,7 @@ #define MAJOR_VERSION 1 #define MINOR_VERSION 2 #define BUILD_VERSION 0 -#define BUILD_REVISION 2426 +#define BUILD_REVISION 2427 #define STRINGIFY(x) #x #define MACRO_STRINGIFY(x) STRINGIFY(x) diff --git a/src/libGLESv2/renderer/Image11.cpp b/src/libGLESv2/renderer/Image11.cpp index 8c78c7d7..a46ad756 100644 --- a/src/libGLESv2/renderer/Image11.cpp +++ b/src/libGLESv2/renderer/Image11.cpp @@ -194,7 +194,7 @@ void Image11::loadData(GLint xoffset, GLint yoffset, GLsizei width, GLsizei heig loadAlphaFloatDataToRGBA(width, height, inputPitch, input, mappedImage.RowPitch, offsetMappedData); break; case GL_LUMINANCE32F_EXT: - loadLuminanceFloatDataToRGB(width, height, inputPitch, input, mappedImage.RowPitch, offsetMappedData); + loadLuminanceFloatDataToRGBA(width, height, inputPitch, input, mappedImage.RowPitch, offsetMappedData); break; case GL_ALPHA16F_EXT: loadAlphaHalfFloatDataToRGBA(width, height, inputPitch, input, mappedImage.RowPitch, offsetMappedData); @@ -230,7 +230,7 @@ void Image11::loadData(GLint xoffset, GLint yoffset, GLsizei width, GLsizei heig loadBGRADataToBGRA(width, height, inputPitch, input, mappedImage.RowPitch, offsetMappedData); break; case GL_RGB32F_EXT: - loadRGBFloatDataToNative(width, height, inputPitch, input, mappedImage.RowPitch, offsetMappedData); + loadRGBFloatDataToRGBA(width, height, inputPitch, input, mappedImage.RowPitch, offsetMappedData); break; case GL_RGB16F_EXT: loadRGBHalfFloatDataToRGBA(width, height, inputPitch, input, mappedImage.RowPitch, offsetMappedData); diff --git a/src/libGLESv2/renderer/TextureStorage11.cpp b/src/libGLESv2/renderer/TextureStorage11.cpp index 667dbff1..8c9ecf81 100644 --- a/src/libGLESv2/renderer/TextureStorage11.cpp +++ b/src/libGLESv2/renderer/TextureStorage11.cpp @@ -69,7 +69,6 @@ bool TextureStorage11::IsTextureFormatRenderable(DXGI_FORMAT format) case DXGI_FORMAT_R8G8B8A8_UNORM: case DXGI_FORMAT_A8_UNORM: case DXGI_FORMAT_R32G32B32A32_FLOAT: - case DXGI_FORMAT_R32G32B32_FLOAT: case DXGI_FORMAT_R16G16B16A16_FLOAT: case DXGI_FORMAT_B8G8R8A8_UNORM: case DXGI_FORMAT_R8_UNORM: @@ -80,6 +79,7 @@ bool TextureStorage11::IsTextureFormatRenderable(DXGI_FORMAT format) case DXGI_FORMAT_BC1_UNORM: case DXGI_FORMAT_BC2_UNORM: case DXGI_FORMAT_BC3_UNORM: + case DXGI_FORMAT_R32G32B32_FLOAT: // not renderable on all devices return false; default: UNREACHABLE(); diff --git a/src/libGLESv2/renderer/renderer11_utils.cpp b/src/libGLESv2/renderer/renderer11_utils.cpp index 5f01dc12..13800da2 100644 --- a/src/libGLESv2/renderer/renderer11_utils.cpp +++ b/src/libGLESv2/renderer/renderer11_utils.cpp @@ -356,7 +356,7 @@ DXGI_FORMAT ConvertTextureFormat(GLenum internalformat) return DXGI_FORMAT_R32G32B32A32_FLOAT; case GL_RGB32F_EXT: case GL_LUMINANCE32F_EXT: - return DXGI_FORMAT_R32G32B32_FLOAT; + return DXGI_FORMAT_R32G32B32A32_FLOAT; case GL_RGBA16F_EXT: case GL_ALPHA16F_EXT: case GL_LUMINANCE_ALPHA16F_EXT: |