Commit a37c6137 by Minmin Gong Committed by Jamie Madill

D3D11: Fix GL_ETC1_RGB8_OES format.

Passes all ETC1 related dEQP tests on Windows. BUG=angleproject:1212 TEST=dEQP-GLES2.capability.extensions.compressed_texture_formats.GL_OES_compressed_ETC1_RGB8_texture TEST=dEQP-GLES2.functional.texture.format.* TEST=dEQP-GLES2.functional.texture.wrap.* TEST=dEQP-GLES2.functional.texture.filtering.* TEST=dEQP-GLES3.functional.texture.format.compressed.etc1* TEST=dEQP-GLES3.functional.texture.filtering.* Change-Id: I937b039f90161bb5e8777766ea0c032ddfbbf159 Reviewed-on: https://chromium-review.googlesource.com/312416Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org> Tryjob-Request: Jamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Tested-by: 's avatarMinmin Gong <mgong@microsoft.com>
parent 65345da4
...@@ -112,6 +112,7 @@ Extensions::Extensions() ...@@ -112,6 +112,7 @@ Extensions::Extensions()
textureCompressionDXT5(false), textureCompressionDXT5(false),
textureCompressionASTCHDR(false), textureCompressionASTCHDR(false),
textureCompressionASTCLDR(false), textureCompressionASTCLDR(false),
compressedETC1RGB8Texture(false),
depthTextures(false), depthTextures(false),
textureStorage(false), textureStorage(false),
textureNPOT(false), textureNPOT(false),
......
...@@ -1094,5 +1094,14 @@ ...@@ -1094,5 +1094,14 @@
"requiresConversion": "false" "requiresConversion": "false"
} }
] ]
},
"GL_ETC1_RGB8_OES": {
"GL_UNSIGNED_BYTE": [
{
"loadFunction": "LoadETC1RGB8ToRGBA8",
"dxgiFormat": "DXGI_FORMAT_R8G8B8A8_UNORM",
"requiresConversion": "true"
}
]
} }
} }
\ No newline at end of file
...@@ -771,6 +771,24 @@ const std::map<GLenum, LoadImageFunction> &GetLoadFunctionsMap(GLenum internalFo ...@@ -771,6 +771,24 @@ const std::map<GLenum, LoadImageFunction> &GetLoadFunctionsMap(GLenum internalFo
} }
} }
} }
case GL_ETC1_RGB8_OES:
{
switch (dxgiFormat)
{
case DXGI_FORMAT_R8G8B8A8_UNORM:
{
static const std::map<GLenum, LoadImageFunction> loadFunctionsMap = []() {
std::map<GLenum, LoadImageFunction> loadMap;
loadMap[GL_UNSIGNED_BYTE] = LoadETC1RGB8ToRGBA8;
return loadMap;
}();
return loadFunctionsMap;
}
default:
break;
}
}
case GL_LUMINANCE: case GL_LUMINANCE:
{ {
switch (dxgiFormat) switch (dxgiFormat)
......
...@@ -300,6 +300,15 @@ ...@@ -300,6 +300,15 @@
"requirementsFcn": "OnlyFL10Plus" "requirementsFcn": "OnlyFL10Plus"
} }
], ],
"GL_ETC1_RGB8_OES": [
{
"texFormat": "DXGI_FORMAT_R8G8B8A8_UNORM",
"srvFormat": "DXGI_FORMAT_R8G8B8A8_UNORM",
"rtvFormat": "DXGI_FORMAT_UNKNOWN",
"dsvFormat": "DXGI_FORMAT_UNKNOWN",
"requirementsFcn": "AnyDevice"
}
],
"GL_LUMINANCE": [ "GL_LUMINANCE": [
{ {
"texFormat": "DXGI_FORMAT_R8G8B8A8_UNORM", "texFormat": "DXGI_FORMAT_R8G8B8A8_UNORM",
......
...@@ -732,6 +732,22 @@ const TextureFormat &GetTextureFormatInfo(GLenum internalFormat, ...@@ -732,6 +732,22 @@ const TextureFormat &GetTextureFormatInfo(GLenum internalFormat,
break; break;
} }
} }
case GL_ETC1_RGB8_OES:
{
if (AnyDevice(renderer11DeviceCaps))
{
static const TextureFormat textureFormat = GetD3D11FormatInfo(internalFormat,
DXGI_FORMAT_R8G8B8A8_UNORM,
DXGI_FORMAT_R8G8B8A8_UNORM,
DXGI_FORMAT_UNKNOWN,
DXGI_FORMAT_UNKNOWN);
return textureFormat;
}
else
{
break;
}
}
case GL_LUMINANCE: case GL_LUMINANCE:
{ {
if (AnyDevice(renderer11DeviceCaps)) if (AnyDevice(renderer11DeviceCaps))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment