Commit 55f29a8c by Jamie Madill Committed by Commit Bot

Check if conversion needed from load function.

The 'LoadToNative' copy is the only one that should be considered a non-conversion. For depth formats, we should be clamping on SetData and CopyImage calls, so this changes the flags for two of the depth formats, but won't affect behaviour since the conversion bit is never check for depth/stencil formats. This allows us to remove the 'requiresConversion' bit from the data. BUG=angleproject:1455 Change-Id: I739ecc54406d65049caad7851ffd51d7cb777946 Reviewed-on: https://chromium-review.googlesource.com/367693Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
parent c99518fc
......@@ -161,7 +161,8 @@ def parse_json_into_switch_string(json_data):
insert_map_string = ''
types_already_in_loadmap = set()
for type_function in sorted(dxgi_format_item[1]):
insert_map_string += get_function_maps_string(type_function['type'], type_function['loadFunction'], type_function['requiresConversion'])
requiresConversion = str('LoadToNative<' not in type_function['loadFunction']).lower()
insert_map_string += get_function_maps_string(type_function['type'], type_function['loadFunction'], requiresConversion)
types_already_in_loadmap.add(type_function['type'])
# DXGI_FORMAT_UNKNOWN add ons
......
......@@ -570,7 +570,7 @@ const std::map<GLenum, LoadImageFunctionInfo> &GetLoadFunctionsMap(GLenum intern
case DXGI_FORMAT_R32G8X24_TYPELESS:
{
static const std::map<GLenum, LoadImageFunctionInfo> loadFunctionsMap = {
{ GL_FLOAT_32_UNSIGNED_INT_24_8_REV, LoadImageFunctionInfo(LoadD32FS8X24ToD32FS8X24, false) },
{ GL_FLOAT_32_UNSIGNED_INT_24_8_REV, LoadImageFunctionInfo(LoadD32FS8X24ToD32FS8X24, true) },
};
return loadFunctionsMap;
......@@ -649,7 +649,7 @@ const std::map<GLenum, LoadImageFunctionInfo> &GetLoadFunctionsMap(GLenum intern
case DXGI_FORMAT_R32_TYPELESS:
{
static const std::map<GLenum, LoadImageFunctionInfo> loadFunctionsMap = {
{ GL_FLOAT, LoadImageFunctionInfo(LoadD32FToD32F, false) },
{ GL_FLOAT, LoadImageFunctionInfo(LoadD32FToD32F, true) },
};
return loadFunctionsMap;
......
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