Vulkan: Add entry points for GL_QCOM_shading_rate

Bug: angleproject:7172
Change-Id: I837d2697d95c44f47a2fab7411cfd87a4ec65e90
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3599873
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: mohan maiya <m.maiya@samsung.com>
This commit is contained in:
Mohan Maiya 2022-04-21 15:52:39 -07:00 коммит произвёл Angle LUCI CQ
Родитель 62ca644926
Коммит ea76cb0f5e
42 изменённых файлов: 333 добавлений и 59 удалений

Просмотреть файл

@ -129,6 +129,7 @@ using data from registry_xml.py and gl.xml.
| [GL_EXT_shader_non_constant_global_initializers](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_shader_non_constant_global_initializers.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_NV_shader_noperspective_interpolation](https://khronos.org/registry/OpenGL/extensions/NV/NV_shader_noperspective_interpolation.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_EXT_shader_texture_lod](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_shader_texture_lod.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_QCOM_shading_rate](https://khronos.org/registry/OpenGL/extensions/QCOM/QCOM_shading_rate.txt) | | | | | | |
| [GL_EXT_shadow_samplers](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_shadow_samplers.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_EXT_sRGB](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_sRGB.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |
| [GL_EXT_sRGB_write_control](https://khronos.org/registry/OpenGL/extensions/EXT/EXT_sRGB_write_control.txt) | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; | &#x2714; |

Просмотреть файл

@ -598,6 +598,11 @@ struct FeaturesVk : FeatureSetBase
"preferDeviceLocalMemoryHostVisible", FeatureCategory::VulkanFeatures,
"Prefer adding HOST_VISIBLE flag for DEVICE_LOCAL memory when picking memory types",
&members, "http://anglebug.com/7047"};
FeatureInfo supportsFragmentShadingRate = {
"supportsFragmentShadingRate", FeatureCategory::VulkanFeatures,
"VkDevice supports VK_KHR_fragment_shading_rate extension", &members,
"http://anglebug.com/7172"};
};
inline FeaturesVk::FeaturesVk() = default;

Просмотреть файл

@ -896,6 +896,15 @@
"Prefer adding HOST_VISIBLE flag for DEVICE_LOCAL memory when picking memory types"
],
"issue": "http://anglebug.com/7047"
},
{
"name": "supports_fragment_shading_rate",
"category": "Features",
"description": [
"VkDevice supports VK_KHR_fragment_shading_rate extension"
],
"issue": "http://anglebug.com/7172"
}
]
}

Просмотреть файл

@ -6,7 +6,7 @@
"include/platform/FeaturesMtl_autogen.h":
"e6286daf0088fe4140b13a0a64b9acbd",
"include/platform/FeaturesVk_autogen.h":
"c95fcf38fe9b79092d181bbe44ec110d",
"76694d576e396463bb00390dbce9b3a9",
"include/platform/FrontendFeatures_autogen.h":
"95ba012012ae6a2de2a9237ab9d081f7",
"include/platform/d3d_features.json":
@ -20,9 +20,9 @@
"include/platform/mtl_features.json":
"9ff73684f28ff8df40fb66da8fe4713a",
"include/platform/vk_features.json":
"2e03e03fc76946ac7bd96127e8dc0012",
"aaab06cd9b5cdefdaf093d659e747fa7",
"util/angle_features_autogen.cpp":
"094764c9b5156a25e5982c17ec2fc7ef",
"d6460c96d7f6c6db45372939f5c874ff",
"util/angle_features_autogen.h":
"7c80b9df0a147c7cb05f1a46dd1efd47"
"be6a10360d080bd8802e285ad3bc443c"
}

Просмотреть файл

@ -1,6 +1,6 @@
{
"doc/ExtensionSupport.md":
"f201e59c0d7fc893b37c4b2e0954d410",
"1b86f123870b49e1db0b2426f85d5f4b",
"scripts/cl.xml":
"f923201d4ea3e1130763b19fa7faa7a2",
"scripts/egl.xml":
@ -22,17 +22,17 @@
"scripts/extension_data/swiftshader_win10_gles1.json":
"fbf1c3dc83570c1e3fffdbee313bca30",
"scripts/gl.xml":
"4ea42a5934348eab4d30c0e92e00c90d",
"e8f8d52f5a5b8bd5bdd4557fdc58d5dd",
"scripts/gl_angle_ext.xml":
"37eebedc1153cd9d208efa469a10a7b2",
"scripts/registry_xml.py":
"a04c10c331ddff73d0ff9a56489be129",
"8d002c3cd027eb292c01abfc91c9be7b",
"scripts/wgl.xml":
"c36001431919e1c435f1215a85f7e1db",
"src/libANGLE/gen_extensions.py":
"186e7b22cb560bf4f32e2b1b8a025dd8",
"src/libANGLE/gles_extensions_autogen.cpp":
"5dfe96dae5cd4867941e0e34b09aae4b",
"e00e8bd3cea419b33e9b3cb66462754f",
"src/libANGLE/gles_extensions_autogen.h":
"8df74279a34dfd634ab4a9efdd590f15"
"887f39c8994a0b8e3c82a2676f2308e7"
}

Просмотреть файл

@ -8,11 +8,11 @@
"scripts/generate_loader.py":
"e67f4da64ba7f5cff39ba4e8926a05f8",
"scripts/gl.xml":
"4ea42a5934348eab4d30c0e92e00c90d",
"e8f8d52f5a5b8bd5bdd4557fdc58d5dd",
"scripts/gl_angle_ext.xml":
"37eebedc1153cd9d208efa469a10a7b2",
"scripts/registry_xml.py":
"a04c10c331ddff73d0ff9a56489be129",
"8d002c3cd027eb292c01abfc91c9be7b",
"scripts/wgl.xml":
"c36001431919e1c435f1215a85f7e1db",
"src/libEGL/egl_loader_autogen.cpp":
@ -24,17 +24,17 @@
"src/tests/restricted_traces/trace_egl_loader_autogen.h":
"2a417d513f4ad2892ccc5c66e42e5759",
"src/tests/restricted_traces/trace_gles_loader_autogen.cpp":
"66d09a2dd240c073868fc14118186c69",
"fdc7f36a3d07cc65a4101bf858e26127",
"src/tests/restricted_traces/trace_gles_loader_autogen.h":
"e6bdefb58de439b5b38d4d2546ae44e7",
"9a37fe421597202b101b7e528851b6ac",
"util/egl_loader_autogen.cpp":
"6afbbc553222705dd77c48e7510250dd",
"util/egl_loader_autogen.h":
"3e1e6ea983aa952601d1b6de83161a8a",
"util/gles_loader_autogen.cpp":
"01482c56dd2c4410149feaa8bff21bbe",
"1df0ee076131e4c612bf0db0495c82bf",
"util/gles_loader_autogen.h":
"ca1eeb57ff623043a7e71f370d4b9579",
"5684f9adb6da838c8fcdb87b9876084a",
"util/windows/wgl_loader_autogen.cpp":
"158e6937dd7bd2879bb440983afd5a36",
"util/windows/wgl_loader_autogen.h":

Просмотреть файл

@ -12,17 +12,17 @@
"scripts/generate_entry_points.py":
"34ec50705a2f70cd2151c53e57689ccc",
"scripts/gl.xml":
"4ea42a5934348eab4d30c0e92e00c90d",
"e8f8d52f5a5b8bd5bdd4557fdc58d5dd",
"scripts/gl_angle_ext.xml":
"37eebedc1153cd9d208efa469a10a7b2",
"scripts/registry_xml.py":
"a04c10c331ddff73d0ff9a56489be129",
"8d002c3cd027eb292c01abfc91c9be7b",
"scripts/wgl.xml":
"c36001431919e1c435f1215a85f7e1db",
"src/common/entry_points_enum_autogen.cpp":
"f882ef34359bd438d01653ec0228b4a8",
"547fd2eae6a3e94109eb925ae534f3f3",
"src/common/entry_points_enum_autogen.h":
"e944a17f832d00a2ac9762ce957f370c",
"60e72190c84794dd17ebe4a43d8b07e4",
"src/libANGLE/Context_gl_1_autogen.h":
"115d224fd28b0bc2b2800354bb57fcf3",
"src/libANGLE/Context_gl_2_autogen.h":
@ -42,7 +42,7 @@
"src/libANGLE/Context_gles_3_2_autogen.h":
"48567dca16fd881dfe6d61fee0e3106f",
"src/libANGLE/Context_gles_ext_autogen.h":
"a741b577375d57bc83aa08d3a713c78d",
"b8425d3985a9bcfa68398bee64f27fb3",
"src/libANGLE/capture/capture_gles_1_0_autogen.cpp":
"7ec7ef8f779b809a45d74b97502c419b",
"src/libANGLE/capture/capture_gles_1_0_autogen.h":
@ -64,11 +64,11 @@
"src/libANGLE/capture/capture_gles_3_2_autogen.h":
"74ed7366af3a46c0661397cfa29ec6fc",
"src/libANGLE/capture/capture_gles_ext_autogen.cpp":
"d05ef52e43df7fa9119e1803ebbeb7a0",
"18a21759230aea9d3c9fedb8d1edc2ac",
"src/libANGLE/capture/capture_gles_ext_autogen.h":
"49e92d10807c8746e665e5060cdad0c5",
"fb8e823b9d9d657ad300e9b589eccef2",
"src/libANGLE/capture/frame_capture_replay_autogen.cpp":
"e2e6419d43bc96a65b8a8e94222a910a",
"6ae3d4cadc39e2c320f3cd97883e2c9f",
"src/libANGLE/capture/frame_capture_utils_autogen.cpp":
"90caecf105e7f7a500561d4c5447844b",
"src/libANGLE/capture/frame_capture_utils_autogen.h":
@ -88,7 +88,7 @@
"src/libANGLE/validationES3_autogen.h":
"0147506ce91c68d8ccbca9688c7251ba",
"src/libANGLE/validationESEXT_autogen.h":
"ad417be4cc656f0c47bbf58081258b11",
"37c67fed673d842e5fb596282d6d5090",
"src/libANGLE/validationGL1_autogen.h":
"a247dddc40418180d4b2dbefeb75f233",
"src/libANGLE/validationGL2_autogen.h":
@ -162,17 +162,17 @@
"src/libGLESv2/entry_points_gles_3_2_autogen.h":
"647f932a299cdb4726b60bbba059f0d2",
"src/libGLESv2/entry_points_gles_ext_autogen.cpp":
"923e55b9424769dab7a9ed4a5e2a6be3",
"1dcb8de56d1ed3d5beb6e8bf562031d8",
"src/libGLESv2/entry_points_gles_ext_autogen.h":
"bda9d1730e13847b562d9ff6db374759",
"e4919cb73e28310ecf15cd6dbaa941ac",
"src/libGLESv2/libGLESv2_autogen.cpp":
"006daa82c90eb0b1e34b9583ab3be0f1",
"759920f21a460f539aa1511e2de3af66",
"src/libGLESv2/libGLESv2_autogen.def":
"dd60a1892473a9b39597cac069430c74",
"761a5f382b9d5cf2447538e2b68cc851",
"src/libGLESv2/libGLESv2_no_capture_autogen.def":
"dc47015c8faf323ec7840e70c4e45c0d",
"f9b97ca8df1e9871e5ecca18321d9045",
"src/libGLESv2/libGLESv2_with_capture_autogen.def":
"00e23c3af9bcfceea900d4471bc063af",
"33b59e6842cf2217320398d0233cf545",
"src/libOpenCL/libOpenCL_autogen.cpp":
"10849978c910dc1af5dd4f0c815d1581"
}

Просмотреть файл

@ -2,13 +2,13 @@
"scripts/gen_gl_enum_utils.py":
"332cfb6f04242d18966445f70f0039b3",
"scripts/gl.xml":
"4ea42a5934348eab4d30c0e92e00c90d",
"e8f8d52f5a5b8bd5bdd4557fdc58d5dd",
"scripts/gl_angle_ext.xml":
"37eebedc1153cd9d208efa469a10a7b2",
"scripts/registry_xml.py":
"a04c10c331ddff73d0ff9a56489be129",
"8d002c3cd027eb292c01abfc91c9be7b",
"src/libANGLE/capture/gl_enum_utils_autogen.cpp":
"9044ba1abe100bf14e9e218bab9e9dcd",
"6e6b08183c720c9f5521df6fdc7f2b70",
"src/libANGLE/capture/gl_enum_utils_autogen.h":
"fb0bb7f506f6082ea3b2c3fa384d2739"
"fbd6fa7daa2e4cd6cc71db769517cd8b"
}

Просмотреть файл

@ -1,6 +1,6 @@
{
"scripts/gl.xml":
"4ea42a5934348eab4d30c0e92e00c90d",
"e8f8d52f5a5b8bd5bdd4557fdc58d5dd",
"src/libANGLE/renderer/angle_format.py":
"2f8fa768088e22b0963bbdf842d3e725",
"src/libANGLE/renderer/gl/DispatchTableGL_autogen.cpp":

Просмотреть файл

@ -8,9 +8,9 @@
"src/common/PackedEGLEnums_autogen.h":
"7d87e160a0c8ea26cb0c835729f7b586",
"src/common/PackedGLEnums_autogen.cpp":
"e2cb0a29dcd2bdbda338b82953c752ee",
"81a3c830e3d832b00b2f68131f252705",
"src/common/PackedGLEnums_autogen.h":
"60a5b286c98aba32a0e3b537a1424ee9",
"33354eaef83bda2fcd9c623e9e8cc773",
"src/common/gen_packed_gl_enums.py":
"27df356513bc2f377b78655113d17c7e",
"src/common/packed_cl_enums.json":
@ -18,5 +18,5 @@
"src/common/packed_egl_enums.json":
"5797db941e95e418d69527eb4e4af900",
"src/common/packed_gl_enums.json":
"5e9956ad129fc6f2ed4ce5b8a094f157"
"a8eebbfc9a8a703fa3e54bb29d125649"
}

Просмотреть файл

@ -8,11 +8,11 @@
"scripts/gen_proc_table.py":
"8336449da7e36f45dd6d70c44add2ebf",
"scripts/gl.xml":
"4ea42a5934348eab4d30c0e92e00c90d",
"e8f8d52f5a5b8bd5bdd4557fdc58d5dd",
"scripts/gl_angle_ext.xml":
"37eebedc1153cd9d208efa469a10a7b2",
"scripts/registry_xml.py":
"a04c10c331ddff73d0ff9a56489be129",
"8d002c3cd027eb292c01abfc91c9be7b",
"scripts/wgl.xml":
"c36001431919e1c435f1215a85f7e1db",
"src/libGL/proc_table_wgl_autogen.cpp":
@ -20,7 +20,7 @@
"src/libGLESv2/proc_table_cl_autogen.cpp":
"ed003b0f041aaaa35b67d3fe07e61f91",
"src/libGLESv2/proc_table_egl_autogen.cpp":
"c6b5d0b60395ccd33a1d9e38341eeef3",
"e94e6f51ed6bde891d299540e61da44d",
"src/libOpenCL/libOpenCL_autogen.map":
"bc5f5cf48227149ed321258a16eff1d7"
}

Просмотреть файл

@ -2242,6 +2242,17 @@ typedef unsigned int GLhandleARB;
<enum name="GL_SMOOTH"/>
</group>
<group name="ShadingRate">
<enum name="GL_SHADING_RATE_QCOM"/>
<enum name="GL_SHADING_RATE_PRESERVE_ASPECT_RATIO_QCOM"/>
<enum name="GL_SHADING_RATE_1X1_PIXELS_QCOM"/>
<enum name="GL_SHADING_RATE_1X2_PIXELS_QCOM"/>
<enum name="GL_SHADING_RATE_2X1_PIXELS_QCOM"/>
<enum name="GL_SHADING_RATE_2X2_PIXELS_QCOM"/>
<enum name="GL_SHADING_RATE_4X2_PIXELS_QCOM"/>
<enum name="GL_SHADING_RATE_4X4_PIXELS_QCOM"/>
</group>
<group name="StencilFaceDirection">
<enum name="GL_FRONT"/>
<enum name="GL_BACK"/>
@ -10187,7 +10198,17 @@ typedef unsigned int GLhandleARB;
<enums namespace="GL" start="0x96A0" end="0x96AF" vendor="Qualcomm" comment="contact Maurice Ribble">
<unused start="0x96A0" end="0x96A1" vendor="Qualcomm"/>
<enum value="0x96A2" name="GL_FRAMEBUFFER_FETCH_NONCOHERENT_QCOM"/>
<unused start="0x96A3" end="0x96AF" vendor="Qualcomm"/>
<unused start="0x96A3" end="0x96A3" vendor="Qualcomm"/>
<enum value="0x96A4" name="GL_SHADING_RATE_QCOM"/>
<enum value="0x96A5" name="GL_SHADING_RATE_PRESERVE_ASPECT_RATIO_QCOM"/>
<enum value="0x96A6" name="GL_SHADING_RATE_1X1_PIXELS_QCOM"/>
<enum value="0x96A7" name="GL_SHADING_RATE_1X2_PIXELS_QCOM"/>
<enum value="0x96A8" name="GL_SHADING_RATE_2X1_PIXELS_QCOM"/>
<enum value="0x96A9" name="GL_SHADING_RATE_2X2_PIXELS_QCOM"/>
<enum value="0x96AC" name="GL_SHADING_RATE_4X2_PIXELS_QCOM"/>
<unused start="0x96AD" end="0x96AD" vendor="Qualcomm"/>
<enum value="0x96AE" name="GL_SHADING_RATE_4X4_PIXELS_QCOM"/>
<unused start="0x96AF" end="0x96AF" vendor="Qualcomm"/>
</enums>
<!-- Enums reservable for future use. To reserve a new range, allocate one
@ -26245,6 +26266,10 @@ typedef unsigned int GLhandleARB;
<param><ptype>GLuint</ptype> <name>storageBlockIndex</name></param>
<param><ptype>GLuint</ptype> <name>storageBlockBinding</name></param>
</command>
<command>
<proto>void <name>glShadingRateQCOM</name></proto>
<param group="ShadingRate"><ptype>GLenum</ptype> <name>rate</name></param>
</command>
<command>
<proto>void <name>glSharpenTexFuncSGIS</name></proto>
<param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
@ -49090,6 +49115,19 @@ typedef unsigned int GLhandleARB;
<enum name="GL_WRITEONLY_RENDERING_QCOM"/>
</require>
</extension>
<extension name="GL_QCOM_shading_rate" supported="gles2">
<require>
<enum name="GL_SHADING_RATE_QCOM"/>
<enum name="GL_SHADING_RATE_PRESERVE_ASPECT_RATIO_QCOM"/>
<enum name="GL_SHADING_RATE_1X1_PIXELS_QCOM"/>
<enum name="GL_SHADING_RATE_1X2_PIXELS_QCOM"/>
<enum name="GL_SHADING_RATE_2X1_PIXELS_QCOM"/>
<enum name="GL_SHADING_RATE_2X2_PIXELS_QCOM"/>
<enum name="GL_SHADING_RATE_4X2_PIXELS_QCOM"/>
<enum name="GL_SHADING_RATE_4X4_PIXELS_QCOM"/>
<command name="glShadingRateQCOM"/>
</require>
</extension>
<extension name="GL_REND_screen_coordinates" supported="gl">
<require>
<enum name="GL_SCREEN_COORDINATES_REND"/>

Просмотреть файл

@ -198,6 +198,7 @@ gles_requestable_extensions = [
"GL_OES_vertex_type_10_10_10_2",
"GL_OVR_multiview",
"GL_OVR_multiview2",
"GL_QCOM_shading_rate",
"GL_WEBGL_video_texture",
]

Просмотреть файл

@ -1503,6 +1503,79 @@ std::ostream &operator<<(std::ostream &os, ShadingModel value)
return os;
}
template <>
ShadingRate FromGLenum<ShadingRate>(GLenum from)
{
switch (from)
{
case GL_SHADING_RATE_1X1_PIXELS_QCOM:
return ShadingRate::_1x1;
case GL_SHADING_RATE_1X2_PIXELS_QCOM:
return ShadingRate::_1x2;
case GL_SHADING_RATE_2X1_PIXELS_QCOM:
return ShadingRate::_2x1;
case GL_SHADING_RATE_2X2_PIXELS_QCOM:
return ShadingRate::_2x2;
case GL_SHADING_RATE_4X2_PIXELS_QCOM:
return ShadingRate::_4x2;
case GL_SHADING_RATE_4X4_PIXELS_QCOM:
return ShadingRate::_4x4;
default:
return ShadingRate::InvalidEnum;
}
}
GLenum ToGLenum(ShadingRate from)
{
switch (from)
{
case ShadingRate::_1x1:
return GL_SHADING_RATE_1X1_PIXELS_QCOM;
case ShadingRate::_1x2:
return GL_SHADING_RATE_1X2_PIXELS_QCOM;
case ShadingRate::_2x1:
return GL_SHADING_RATE_2X1_PIXELS_QCOM;
case ShadingRate::_2x2:
return GL_SHADING_RATE_2X2_PIXELS_QCOM;
case ShadingRate::_4x2:
return GL_SHADING_RATE_4X2_PIXELS_QCOM;
case ShadingRate::_4x4:
return GL_SHADING_RATE_4X4_PIXELS_QCOM;
default:
UNREACHABLE();
return 0;
}
}
std::ostream &operator<<(std::ostream &os, ShadingRate value)
{
switch (value)
{
case ShadingRate::_1x1:
os << "GL_SHADING_RATE_1X1_PIXELS_QCOM";
break;
case ShadingRate::_1x2:
os << "GL_SHADING_RATE_1X2_PIXELS_QCOM";
break;
case ShadingRate::_2x1:
os << "GL_SHADING_RATE_2X1_PIXELS_QCOM";
break;
case ShadingRate::_2x2:
os << "GL_SHADING_RATE_2X2_PIXELS_QCOM";
break;
case ShadingRate::_4x2:
os << "GL_SHADING_RATE_4X2_PIXELS_QCOM";
break;
case ShadingRate::_4x4:
os << "GL_SHADING_RATE_4X4_PIXELS_QCOM";
break;
default:
os << "GL_INVALID_ENUM";
break;
}
return os;
}
template <>
TextureCombine FromGLenum<TextureCombine>(GLenum from)
{

Просмотреть файл

@ -387,6 +387,24 @@ ShadingModel FromGLenum<ShadingModel>(GLenum from);
GLenum ToGLenum(ShadingModel from);
std::ostream &operator<<(std::ostream &os, ShadingModel value);
enum class ShadingRate : uint8_t
{
_1x1 = 0,
_1x2 = 1,
_2x1 = 2,
_2x2 = 3,
_4x2 = 4,
_4x4 = 5,
InvalidEnum = 6,
EnumCount = 6,
};
template <>
ShadingRate FromGLenum<ShadingRate>(GLenum from);
GLenum ToGLenum(ShadingRate from);
std::ostream &operator<<(std::ostream &os, ShadingRate value);
enum class TextureCombine : uint8_t
{
Add = 0,

Просмотреть файл

@ -2666,6 +2666,8 @@ const char *GetEntryPointName(EntryPoint ep)
return "glShaderSource";
case EntryPoint::GLShaderStorageBlockBinding:
return "glShaderStorageBlockBinding";
case EntryPoint::GLShadingRateQCOM:
return "glShadingRateQCOM";
case EntryPoint::GLSignalSemaphoreEXT:
return "glSignalSemaphoreEXT";
case EntryPoint::GLSpecializeShader:

Просмотреть файл

@ -1339,6 +1339,7 @@ enum class EntryPoint
GLShaderBinary,
GLShaderSource,
GLShaderStorageBlockBinding,
GLShadingRateQCOM,
GLSignalSemaphoreEXT,
GLSpecializeShader,
GLStencilFunc,

Просмотреть файл

@ -291,5 +291,14 @@
"TransferDst": "GL_LAYOUT_TRANSFER_DST_EXT",
"DepthReadOnlyStencilAttachment": "GL_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_EXT",
"DepthAttachmentStencilReadOnly": "GL_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_EXT"
},
"ShadingRate":
{
"_1x1": "GL_SHADING_RATE_1X1_PIXELS_QCOM",
"_1x2": "GL_SHADING_RATE_1X2_PIXELS_QCOM",
"_2x1": "GL_SHADING_RATE_2X1_PIXELS_QCOM",
"_2x2": "GL_SHADING_RATE_2X2_PIXELS_QCOM",
"_4x2": "GL_SHADING_RATE_4X2_PIXELS_QCOM",
"_4x4": "GL_SHADING_RATE_4X4_PIXELS_QCOM"
}
}

Просмотреть файл

@ -5864,6 +5864,11 @@ void Context::scissor(GLint x, GLint y, GLsizei width, GLsizei height)
mState.setScissorParams(x, y, width, height);
}
void Context::shadingRateQCOM(GLenum rate)
{
return;
}
void Context::stencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask)
{
GLint clampedRef = gl::clamp(ref, 0, std::numeric_limits<uint8_t>::max());

Просмотреть файл

@ -318,6 +318,8 @@
void framebufferTextureMultiview(GLenum target, GLenum attachment, TextureID texturePacked, \
GLint level, GLint baseViewIndex, GLsizei numViews); \
/* GL_OVR_multiview2 */ \
/* GL_QCOM_shading_rate */ \
void shadingRateQCOM(GLenum rate); \
/* GL_WEBGL_video_texture */ \
\
/* ANGLE Extensions */ \

Просмотреть файл

@ -11376,4 +11376,13 @@ CallCapture CaptureFramebufferTextureMultiviewOVR(const State &glState,
return CallCapture(angle::EntryPoint::GLFramebufferTextureMultiviewOVR, std::move(paramBuffer));
}
CallCapture CaptureShadingRateQCOM(const State &glState, bool isCallValid, GLenum rate)
{
ParamBuffer paramBuffer;
paramBuffer.addEnumParam("rate", GLenumGroup::ShadingRate, ParamType::TGLenum, rate);
return CallCapture(angle::EntryPoint::GLShadingRateQCOM, std::move(paramBuffer));
}
} // namespace gl

Просмотреть файл

@ -2608,6 +2608,9 @@ angle::CallCapture CaptureFramebufferTextureMultiviewOVR(const State &glState,
// GL_OVR_multiview2
// GL_QCOM_shading_rate
angle::CallCapture CaptureShadingRateQCOM(const State &glState, bool isCallValid, GLenum rate);
// Parameter Captures
void CaptureDeletePerfMonitorsAMD_monitors(const State &glState,

Просмотреть файл

@ -2683,6 +2683,10 @@ void FrameCaptureShared::ReplayCall(gl::Context *context,
replayContext->getAsConstPointer<const GLint *>(
params.getParam("length", ParamType::TGLintConstPointer, 3)));
break;
case angle::EntryPoint::GLShadingRateQCOM:
context->shadingRateQCOM(
params.getParam("rate", ParamType::TGLenum, 0).value.GLenumVal);
break;
case angle::EntryPoint::GLStencilFunc:
context->stencilFunc(params.getParam("func", ParamType::TGLenum, 0).value.GLenumVal,
params.getParam("ref", ParamType::TGLint, 1).value.GLintVal,

Просмотреть файл

@ -3668,6 +3668,31 @@ const char *GLenumToString(GLenumGroup enumGroup, unsigned int value)
}
}
case GLenumGroup::ShadingRate:
{
switch (value)
{
case 0x96A4:
return "GL_SHADING_RATE_QCOM";
case 0x96A5:
return "GL_SHADING_RATE_PRESERVE_ASPECT_RATIO_QCOM";
case 0x96A6:
return "GL_SHADING_RATE_1X1_PIXELS_QCOM";
case 0x96A7:
return "GL_SHADING_RATE_1X2_PIXELS_QCOM";
case 0x96A8:
return "GL_SHADING_RATE_2X1_PIXELS_QCOM";
case 0x96A9:
return "GL_SHADING_RATE_2X2_PIXELS_QCOM";
case 0x96AC:
return "GL_SHADING_RATE_4X2_PIXELS_QCOM";
case 0x96AE:
return "GL_SHADING_RATE_4X4_PIXELS_QCOM";
default:
return UnknownGLenumToString(value);
}
}
case GLenumGroup::StencilFaceDirection:
{
switch (value)

Просмотреть файл

@ -174,6 +174,7 @@ enum class GLenumGroup
ShaderParameterName,
ShaderType,
ShadingModel,
ShadingRate,
StencilFaceDirection,
StencilFunction,
StencilOp,

Просмотреть файл

@ -145,6 +145,7 @@ const ExtensionInfoMap &GetExtensionInfoMap()
map["GL_EXT_shader_non_constant_global_initializers"] = enableableExtension(&Extensions::shaderNonConstantGlobalInitializersEXT);
map["GL_NV_shader_noperspective_interpolation"] = enableableExtension(&Extensions::shaderNoperspectiveInterpolationNV);
map["GL_EXT_shader_texture_lod"] = enableableExtension(&Extensions::shaderTextureLodEXT);
map["GL_QCOM_shading_rate"] = enableableExtension(&Extensions::shadingRateQCOM);
map["GL_EXT_shadow_samplers"] = enableableExtension(&Extensions::shadowSamplersEXT);
map["GL_EXT_sRGB"] = enableableExtension(&Extensions::sRGBEXT);
map["GL_EXT_sRGB_write_control"] = esOnlyExtension(&Extensions::sRGBWriteControlEXT);

Просмотреть файл

@ -392,6 +392,9 @@ struct Extensions
// GL_EXT_shader_texture_lod
bool shaderTextureLodEXT = false;
// GL_QCOM_shading_rate
bool shadingRateQCOM = false;
// GL_EXT_shadow_samplers
bool shadowSamplersEXT = false;

Просмотреть файл

@ -3030,4 +3030,9 @@ bool ValidateSelectPerfMonitorCountersAMD(const Context *context,
UNIMPLEMENTED();
return false;
}
bool ValidateShadingRateQCOM(const Context *context, angle::EntryPoint entryPoint, GLenum rate)
{
return false;
}
} // namespace gl

Просмотреть файл

@ -2582,6 +2582,9 @@ bool ValidateFramebufferTextureMultiviewOVR(const Context *context,
GLsizei numViews);
// GL_OVR_multiview2
// GL_QCOM_shading_rate
bool ValidateShadingRateQCOM(const Context *context, angle::EntryPoint entryPoint, GLenum rate);
} // namespace gl
#endif // LIBANGLE_VALIDATION_ESEXT_AUTOGEN_H_

Просмотреть файл

@ -11681,4 +11681,30 @@ void GL_APIENTRY GL_FramebufferTextureMultiviewOVR(GLenum target,
}
// GL_OVR_multiview2
// GL_QCOM_shading_rate
void GL_APIENTRY GL_ShadingRateQCOM(GLenum rate)
{
Context *context = GetValidGlobalContext();
EVENT(context, GLShadingRateQCOM, "context = %d, rate = %s", CID(context),
GLenumToString(GLenumGroup::ShadingRate, rate));
if (context)
{
std::unique_lock<angle::GlobalMutex> shareContextLock = GetContextLock(context);
bool isCallValid =
(context->skipValidation() ||
ValidateShadingRateQCOM(context, angle::EntryPoint::GLShadingRateQCOM, rate));
if (isCallValid)
{
context->shadingRateQCOM(rate);
}
ANGLE_CAPTURE(ShadingRateQCOM, isCallValid, context, rate);
}
else
{
GenerateContextLostErrorOnCurrentGlobalContext();
}
}
} // extern "C"

Просмотреть файл

@ -1737,6 +1737,9 @@ ANGLE_EXPORT void GL_APIENTRY GL_FramebufferTextureMultiviewOVR(GLenum target,
GLsizei numViews);
// GL_OVR_multiview2
// GL_QCOM_shading_rate
ANGLE_EXPORT void GL_APIENTRY GL_ShadingRateQCOM(GLenum rate);
} // extern "C"
#endif // LIBGLESV2_ENTRY_POINTS_GLES_EXT_AUTOGEN_H_

Просмотреть файл

@ -5738,4 +5738,11 @@ void GL_APIENTRY glFramebufferTextureMultiviewOVR(GLenum target,
}
// GL_OVR_multiview2
// GL_QCOM_shading_rate
void GL_APIENTRY glShadingRateQCOM(GLenum rate)
{
return GL_ShadingRateQCOM(rate);
}
} // extern "C"

Просмотреть файл

@ -1152,6 +1152,9 @@ EXPORTS
; GL_OVR_multiview2
; GL_QCOM_shading_rate
glShadingRateQCOM
; EGL 1.0
EGL_ChooseConfig
EGL_CopyBuffers

Просмотреть файл

@ -1152,6 +1152,9 @@ EXPORTS
; GL_OVR_multiview2
; GL_QCOM_shading_rate
glShadingRateQCOM
; EGL 1.0
EGL_ChooseConfig
EGL_CopyBuffers

Просмотреть файл

@ -1152,6 +1152,9 @@ EXPORTS
; GL_OVR_multiview2
; GL_QCOM_shading_rate
glShadingRateQCOM
; EGL 1.0
EGL_ChooseConfig
EGL_CopyBuffers

Просмотреть файл

@ -803,6 +803,7 @@ const ProcEntry g_procTable[] = {
{"glShadeModel", P(GL_ShadeModel)},
{"glShaderBinary", P(GL_ShaderBinary)},
{"glShaderSource", P(GL_ShaderSource)},
{"glShadingRateQCOM", P(GL_ShadingRateQCOM)},
{"glSignalSemaphoreEXT", P(GL_SignalSemaphoreEXT)},
{"glStencilFunc", P(GL_StencilFunc)},
{"glStencilFuncSeparate", P(GL_StencilFuncSeparate)},
@ -946,5 +947,5 @@ const ProcEntry g_procTable[] = {
{"glWaitSync", P(GL_WaitSync)},
{"glWeightPointerOES", P(GL_WeightPointerOES)}};
const size_t g_numProcs = 913;
const size_t g_numProcs = 914;
} // namespace egl

Просмотреть файл

@ -826,6 +826,7 @@ ANGLE_TRACE_LOADER_EXPORT PFNGLGENVERTEXARRAYSOESPROC t_glGenVertexArraysOES;
ANGLE_TRACE_LOADER_EXPORT PFNGLISVERTEXARRAYOESPROC t_glIsVertexArrayOES;
ANGLE_TRACE_LOADER_EXPORT PFNGLFRAMEBUFFERTEXTUREMULTIVIEWOVRPROC
t_glFramebufferTextureMultiviewOVR;
ANGLE_TRACE_LOADER_EXPORT PFNGLSHADINGRATEQCOMPROC t_glShadingRateQCOM;
ANGLE_TRACE_LOADER_EXPORT PFNGLDRAWTEXFOESPROC t_glDrawTexfOES;
ANGLE_TRACE_LOADER_EXPORT PFNGLDRAWTEXFVOESPROC t_glDrawTexfvOES;
ANGLE_TRACE_LOADER_EXPORT PFNGLDRAWTEXIOESPROC t_glDrawTexiOES;
@ -2144,14 +2145,15 @@ void LoadGLES(LoadProc loadProc)
reinterpret_cast<PFNGLISVERTEXARRAYOESPROC>(loadProc("glIsVertexArrayOES"));
t_glFramebufferTextureMultiviewOVR = reinterpret_cast<PFNGLFRAMEBUFFERTEXTUREMULTIVIEWOVRPROC>(
loadProc("glFramebufferTextureMultiviewOVR"));
t_glDrawTexfOES = reinterpret_cast<PFNGLDRAWTEXFOESPROC>(loadProc("glDrawTexfOES"));
t_glDrawTexfvOES = reinterpret_cast<PFNGLDRAWTEXFVOESPROC>(loadProc("glDrawTexfvOES"));
t_glDrawTexiOES = reinterpret_cast<PFNGLDRAWTEXIOESPROC>(loadProc("glDrawTexiOES"));
t_glDrawTexivOES = reinterpret_cast<PFNGLDRAWTEXIVOESPROC>(loadProc("glDrawTexivOES"));
t_glDrawTexsOES = reinterpret_cast<PFNGLDRAWTEXSOESPROC>(loadProc("glDrawTexsOES"));
t_glDrawTexsvOES = reinterpret_cast<PFNGLDRAWTEXSVOESPROC>(loadProc("glDrawTexsvOES"));
t_glDrawTexxOES = reinterpret_cast<PFNGLDRAWTEXXOESPROC>(loadProc("glDrawTexxOES"));
t_glDrawTexxvOES = reinterpret_cast<PFNGLDRAWTEXXVOESPROC>(loadProc("glDrawTexxvOES"));
t_glShadingRateQCOM = reinterpret_cast<PFNGLSHADINGRATEQCOMPROC>(loadProc("glShadingRateQCOM"));
t_glDrawTexfOES = reinterpret_cast<PFNGLDRAWTEXFOESPROC>(loadProc("glDrawTexfOES"));
t_glDrawTexfvOES = reinterpret_cast<PFNGLDRAWTEXFVOESPROC>(loadProc("glDrawTexfvOES"));
t_glDrawTexiOES = reinterpret_cast<PFNGLDRAWTEXIOESPROC>(loadProc("glDrawTexiOES"));
t_glDrawTexivOES = reinterpret_cast<PFNGLDRAWTEXIVOESPROC>(loadProc("glDrawTexivOES"));
t_glDrawTexsOES = reinterpret_cast<PFNGLDRAWTEXSOESPROC>(loadProc("glDrawTexsOES"));
t_glDrawTexsvOES = reinterpret_cast<PFNGLDRAWTEXSVOESPROC>(loadProc("glDrawTexsvOES"));
t_glDrawTexxOES = reinterpret_cast<PFNGLDRAWTEXXOESPROC>(loadProc("glDrawTexxOES"));
t_glDrawTexxvOES = reinterpret_cast<PFNGLDRAWTEXXVOESPROC>(loadProc("glDrawTexxvOES"));
t_glBindFramebufferOES =
reinterpret_cast<PFNGLBINDFRAMEBUFFEROESPROC>(loadProc("glBindFramebufferOES"));
t_glBindRenderbufferOES =

Просмотреть файл

@ -786,6 +786,7 @@
#define glGenVertexArraysOES t_glGenVertexArraysOES
#define glIsVertexArrayOES t_glIsVertexArrayOES
#define glFramebufferTextureMultiviewOVR t_glFramebufferTextureMultiviewOVR
#define glShadingRateQCOM t_glShadingRateQCOM
#define glDrawTexfOES t_glDrawTexfOES
#define glDrawTexfvOES t_glDrawTexfvOES
#define glDrawTexiOES t_glDrawTexiOES
@ -1683,6 +1684,7 @@ ANGLE_TRACE_LOADER_EXPORT extern PFNGLGENVERTEXARRAYSOESPROC t_glGenVertexArrays
ANGLE_TRACE_LOADER_EXPORT extern PFNGLISVERTEXARRAYOESPROC t_glIsVertexArrayOES;
ANGLE_TRACE_LOADER_EXPORT extern PFNGLFRAMEBUFFERTEXTUREMULTIVIEWOVRPROC
t_glFramebufferTextureMultiviewOVR;
ANGLE_TRACE_LOADER_EXPORT extern PFNGLSHADINGRATEQCOMPROC t_glShadingRateQCOM;
ANGLE_TRACE_LOADER_EXPORT extern PFNGLDRAWTEXFOESPROC t_glDrawTexfOES;
ANGLE_TRACE_LOADER_EXPORT extern PFNGLDRAWTEXFVOESPROC t_glDrawTexfvOES;
ANGLE_TRACE_LOADER_EXPORT extern PFNGLDRAWTEXIOESPROC t_glDrawTexiOES;

Просмотреть файл

@ -216,6 +216,7 @@ constexpr PackedEnumMap<Feature, const char *> kFeatureNames = {{
{Feature::SupportsExternalSemaphoreFd, "supportsExternalSemaphoreFd"},
{Feature::SupportsExternalSemaphoreFuchsia, "supportsExternalSemaphoreFuchsia"},
{Feature::SupportsFilteringPrecision, "supportsFilteringPrecision"},
{Feature::SupportsFragmentShadingRate, "supportsFragmentShadingRate"},
{Feature::SupportsGeometryStreamsCapability, "supportsGeometryStreamsCapability"},
{Feature::SupportsGGPFrameToken, "supportsGGPFrameToken"},
{Feature::SupportsHostQueryReset, "supportsHostQueryReset"},

Просмотреть файл

@ -204,6 +204,7 @@ enum class Feature
SupportsExternalSemaphoreFd,
SupportsExternalSemaphoreFuchsia,
SupportsFilteringPrecision,
SupportsFragmentShadingRate,
SupportsGeometryStreamsCapability,
SupportsGGPFrameToken,
SupportsHostQueryReset,

Просмотреть файл

@ -796,6 +796,7 @@ ANGLE_UTIL_EXPORT PFNGLDELETEVERTEXARRAYSOESPROC l_glDeleteVertexArraysOES;
ANGLE_UTIL_EXPORT PFNGLGENVERTEXARRAYSOESPROC l_glGenVertexArraysOES;
ANGLE_UTIL_EXPORT PFNGLISVERTEXARRAYOESPROC l_glIsVertexArrayOES;
ANGLE_UTIL_EXPORT PFNGLFRAMEBUFFERTEXTUREMULTIVIEWOVRPROC l_glFramebufferTextureMultiviewOVR;
ANGLE_UTIL_EXPORT PFNGLSHADINGRATEQCOMPROC l_glShadingRateQCOM;
ANGLE_UTIL_EXPORT PFNGLDRAWTEXFOESPROC l_glDrawTexfOES;
ANGLE_UTIL_EXPORT PFNGLDRAWTEXFVOESPROC l_glDrawTexfvOES;
ANGLE_UTIL_EXPORT PFNGLDRAWTEXIOESPROC l_glDrawTexiOES;
@ -2113,14 +2114,15 @@ void LoadGLES(LoadProc loadProc)
reinterpret_cast<PFNGLISVERTEXARRAYOESPROC>(loadProc("glIsVertexArrayOES"));
l_glFramebufferTextureMultiviewOVR = reinterpret_cast<PFNGLFRAMEBUFFERTEXTUREMULTIVIEWOVRPROC>(
loadProc("glFramebufferTextureMultiviewOVR"));
l_glDrawTexfOES = reinterpret_cast<PFNGLDRAWTEXFOESPROC>(loadProc("glDrawTexfOES"));
l_glDrawTexfvOES = reinterpret_cast<PFNGLDRAWTEXFVOESPROC>(loadProc("glDrawTexfvOES"));
l_glDrawTexiOES = reinterpret_cast<PFNGLDRAWTEXIOESPROC>(loadProc("glDrawTexiOES"));
l_glDrawTexivOES = reinterpret_cast<PFNGLDRAWTEXIVOESPROC>(loadProc("glDrawTexivOES"));
l_glDrawTexsOES = reinterpret_cast<PFNGLDRAWTEXSOESPROC>(loadProc("glDrawTexsOES"));
l_glDrawTexsvOES = reinterpret_cast<PFNGLDRAWTEXSVOESPROC>(loadProc("glDrawTexsvOES"));
l_glDrawTexxOES = reinterpret_cast<PFNGLDRAWTEXXOESPROC>(loadProc("glDrawTexxOES"));
l_glDrawTexxvOES = reinterpret_cast<PFNGLDRAWTEXXVOESPROC>(loadProc("glDrawTexxvOES"));
l_glShadingRateQCOM = reinterpret_cast<PFNGLSHADINGRATEQCOMPROC>(loadProc("glShadingRateQCOM"));
l_glDrawTexfOES = reinterpret_cast<PFNGLDRAWTEXFOESPROC>(loadProc("glDrawTexfOES"));
l_glDrawTexfvOES = reinterpret_cast<PFNGLDRAWTEXFVOESPROC>(loadProc("glDrawTexfvOES"));
l_glDrawTexiOES = reinterpret_cast<PFNGLDRAWTEXIOESPROC>(loadProc("glDrawTexiOES"));
l_glDrawTexivOES = reinterpret_cast<PFNGLDRAWTEXIVOESPROC>(loadProc("glDrawTexivOES"));
l_glDrawTexsOES = reinterpret_cast<PFNGLDRAWTEXSOESPROC>(loadProc("glDrawTexsOES"));
l_glDrawTexsvOES = reinterpret_cast<PFNGLDRAWTEXSVOESPROC>(loadProc("glDrawTexsvOES"));
l_glDrawTexxOES = reinterpret_cast<PFNGLDRAWTEXXOESPROC>(loadProc("glDrawTexxOES"));
l_glDrawTexxvOES = reinterpret_cast<PFNGLDRAWTEXXVOESPROC>(loadProc("glDrawTexxvOES"));
l_glBindFramebufferOES =
reinterpret_cast<PFNGLBINDFRAMEBUFFEROESPROC>(loadProc("glBindFramebufferOES"));
l_glBindRenderbufferOES =

Просмотреть файл

@ -786,6 +786,7 @@
#define glGenVertexArraysOES l_glGenVertexArraysOES
#define glIsVertexArrayOES l_glIsVertexArrayOES
#define glFramebufferTextureMultiviewOVR l_glFramebufferTextureMultiviewOVR
#define glShadingRateQCOM l_glShadingRateQCOM
#define glDrawTexfOES l_glDrawTexfOES
#define glDrawTexfvOES l_glDrawTexfvOES
#define glDrawTexiOES l_glDrawTexiOES
@ -1627,6 +1628,7 @@ ANGLE_UTIL_EXPORT extern PFNGLDELETEVERTEXARRAYSOESPROC l_glDeleteVertexArraysOE
ANGLE_UTIL_EXPORT extern PFNGLGENVERTEXARRAYSOESPROC l_glGenVertexArraysOES;
ANGLE_UTIL_EXPORT extern PFNGLISVERTEXARRAYOESPROC l_glIsVertexArrayOES;
ANGLE_UTIL_EXPORT extern PFNGLFRAMEBUFFERTEXTUREMULTIVIEWOVRPROC l_glFramebufferTextureMultiviewOVR;
ANGLE_UTIL_EXPORT extern PFNGLSHADINGRATEQCOMPROC l_glShadingRateQCOM;
ANGLE_UTIL_EXPORT extern PFNGLDRAWTEXFOESPROC l_glDrawTexfOES;
ANGLE_UTIL_EXPORT extern PFNGLDRAWTEXFVOESPROC l_glDrawTexfvOES;
ANGLE_UTIL_EXPORT extern PFNGLDRAWTEXIOESPROC l_glDrawTexiOES;