Skip to content

Commit

Permalink
Correct subImage uses of texture type -> target.
Browse files Browse the repository at this point in the history
Texture "types" are the same as texture "targets" except for cube maps.
Cube map targets specify a single face. Cube map types specify a whole
cube map. The subImage functions should take a target instead of a
type. We were using both in different places. This CL corrects all uses
in subImage calls to "target". It also adds a helper for getting a
target texture from a target. And clarifies the naming of the texture
query methods.

Bug: angleproject:3356
Change-Id: I06eb5c5666eec9b8934becf2ba57a066d5cdabde
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1558672
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
  • Loading branch information
null77 authored and Commit Bot committed Apr 11, 2019
1 parent e29b61e commit cfc73cc
Show file tree
Hide file tree
Showing 13 changed files with 107 additions and 101 deletions.
10 changes: 5 additions & 5 deletions scripts/entry_point_packed_gl_enums.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@
"target": "TextureTarget"
},
"glCompressedTexSubImage3D": {
"target": "TextureType"
"target": "TextureTarget"
},
"glCompressedTexSubImage3DRobustANGLE": {
"target": "TextureType"
"target": "TextureTarget"
},
"glCopyTexImage2D": {
"target": "TextureTarget"
Expand All @@ -73,7 +73,7 @@
"target": "TextureTarget"
},
"glCopyTexSubImage3D": {
"target": "TextureType"
"target": "TextureTarget"
},
"glCopySubTexture3DANGLE": {
"destTarget": "TextureTarget"
Expand Down Expand Up @@ -466,10 +466,10 @@
"target": "TextureTarget"
},
"glTexSubImage3D": {
"target": "TextureType"
"target": "TextureTarget"
},
"glTexSubImage3DRobustANGLE": {
"target": "TextureType"
"target": "TextureTarget"
},
"glUnmapBuffer": {
"target": "BufferBinding"
Expand Down
10 changes: 5 additions & 5 deletions scripts/run_code_generation_hashes.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
"GL/EGL entry points:scripts/egl_angle_ext.xml":
"745534010f31fbe8e1a1fcddce15ed2d",
"GL/EGL entry points:scripts/entry_point_packed_gl_enums.json":
"a161bca02b89f244c56cc2702581e805",
"9bc20d81551055da0fb453ccf3f52f60",
"GL/EGL entry points:scripts/generate_entry_points.py":
"7bd73a78c638334a114ed027d49cb6df",
"GL/EGL entry points:scripts/gl.xml":
Expand All @@ -110,9 +110,9 @@
"GL/EGL entry points:src/libANGLE/validationES31_autogen.h":
"22ef241ea5b79a6abe6589f1afcc80a2",
"GL/EGL entry points:src/libANGLE/validationES3_autogen.h":
"210f732f87ac6a184bde4d4d1e548f70",
"345af98379909661060556c7ffaef7c0",
"GL/EGL entry points:src/libANGLE/validationESEXT_autogen.h":
"aec7b57a43322eb9f3959dc12e474058",
"4585c928c60468b4a1909f31ce502daf",
"GL/EGL entry points:src/libGLESv2/entry_points_enum_autogen.h":
"c023a19637be195551e04642f489eb24",
"GL/EGL entry points:src/libGLESv2/entry_points_gles_1_0_autogen.cpp":
Expand All @@ -124,15 +124,15 @@
"GL/EGL entry points:src/libGLESv2/entry_points_gles_2_0_autogen.h":
"3bbaf1cf42fba5d675e5b54cd1d14df7",
"GL/EGL entry points:src/libGLESv2/entry_points_gles_3_0_autogen.cpp":
"555b6fa72e56b5d6a531b744e5dd0607",
"86234d9b1a412ba827131adf931453c1",
"GL/EGL entry points:src/libGLESv2/entry_points_gles_3_0_autogen.h":
"395f6978219abd5182bbe80cc367e40c",
"GL/EGL entry points:src/libGLESv2/entry_points_gles_3_1_autogen.cpp":
"72188430258b99258cef9048f0f4b4ee",
"GL/EGL entry points:src/libGLESv2/entry_points_gles_3_1_autogen.h":
"043d09a964c740067bf4279e0b544aed",
"GL/EGL entry points:src/libGLESv2/entry_points_gles_ext_autogen.cpp":
"41608a3051395e280509f4dffca55659",
"6f0d4c01e04b65800e4a800327581a26",
"GL/EGL entry points:src/libGLESv2/entry_points_gles_ext_autogen.h":
"1daa12e804ae05ed40176d18eb895e84",
"GL/EGL entry points:src/libGLESv2/libGLESv2_autogen.cpp":
Expand Down
3 changes: 1 addition & 2 deletions src/common/PackedEnums.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ TextureType TextureTargetToType(TextureTarget target)
return TextureType::_2DMultisampleArray;
case TextureTarget::_3D:
return TextureType::_3D;
default:
UNREACHABLE();
case TextureTarget::InvalidEnum:
return TextureType::InvalidEnum;
}
}
Expand Down
Loading

0 comments on commit cfc73cc

Please sign in to comment.