2 changed files
build.sh | ||
variable_rasterization_rate_map.patch + | ||
Add comment 33 git apply ../flip_y.patch --ignore-whitespace --whitespace=nowarn
Add comment 34 check_success
Add comment 35
Add comment 36 Plus echo "Apply Variable Rasterization Rate Map ANGLE patch"
Add comment 37 Plus git apply ../variable_rasterization_rate_map.patch --ignore-whitespace --whitespace=nowarn
Add comment 38 Plus check_success
Add comment 39 Plus
Add comment 36 40 echo "Apply visionOS ANGLE patch"
Add comment 37 41 git apply ../angle.visionos.patch --ignore-whitespace --whitespace=nowarn
Add comment 38 42 check_success
variable_rasterization_rate_map.patch
/variable_rasterization_rate_map.patch+1772/variable_rasterization_rate_map.patch
Displayed content is truncated due to maximum viewable content limit.
Add comment 1 Plus diff --git a/doc/ExtensionSupport.md b/doc/ExtensionSupport.md
Add comment 2 Plus index 98cb52e1e5..2164dc8826 100644
Add comment 3 Plus --- a/doc/ExtensionSupport.md
Add comment 4 Plus +++ b/doc/ExtensionSupport.md
Add comment 5 Plus @@ -251,6 +251,7 @@ using data from registry_xml.py and gl.xml.
Add comment 6 Plus | [GL_ANGLE_texture_external_update](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/ANGLE_texture_external_update.txt) | | | | | | | |
Add comment 7 Plus | [GL_ANGLE_texture_multisample](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/ANGLE_texture_multisample.txt) | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
Add comment 8 Plus | [GL_ANGLE_texture_rectangle](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/ANGLE_texture_rectangle.txt) | | | | | | | |
Add comment 9 Plus +| [GL_ANGLE_variable_rasterization_rate_metal](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/ANGLE_variable_rasterization_rate_metal.txt) | | | | | | | |
Add comment 10 Plus | [GL_ANGLE_vulkan_image](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/ANGLE_vulkan_image.txt) | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
Add comment 11 Plus | [GL_ANGLE_webgl_compatibility](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/ANGLE_webgl_compatibility.txt) | | | | | | | |
Add comment 12 Plus | [GL_ANGLE_yuv_internal_format](https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/ANGLE_yuv_internal_format.txt) | ✔ | | ✔ | ✔ | ✔ | ✔ | ✔ |
Add comment 13 Plus diff --git a/extensions/ANGLE_variable_rasterization_rate_metal.txt b/extensions/ANGLE_variable_rasterization_rate_metal.txt
Add comment 14 Plus new file mode 100644
Add comment 15 Plus index 0000000000..661d204d57
Add comment 16 Plus --- /dev/null
Add comment 17 Plus +++ b/extensions/ANGLE_variable_rasterization_rate_metal.txt
Add comment 18 Plus @@ -0,0 +1,95 @@
Add comment 19 Plus +Name
Add comment 20 Plus +
Add comment 21 Plus + ANGLE_variable_rasterization_rate_metal
Add comment 22 Plus +
Add comment 23 Plus +Name Strings
Add comment 24 Plus +
Add comment 25 Plus + GL_ANGLE_variable_rasterization_rate_metal
Add comment 26 Plus +
Add comment 27 Plus +Contributors
Add comment 28 Plus +
Add comment 29 Plus + Dan Glastonbury, Apple Inc.
Add comment 30 Plus +
Add comment 31 Plus +Contact
Add comment 32 Plus +
Add comment 33 Plus + Dan Glastonbury, Apple Inc. (djg 'at' apple 'dot' com)
Add comment 34 Plus +
Add comment 35 Plus +Status
Add comment 36 Plus +
Add comment 37 Plus + Incomplete
Add comment 38 Plus +
Add comment 39 Plus +Version
Add comment 40 Plus +
Add comment 41 Plus + Last Modified Date: May 5, 2023
Add comment 42 Plus + Author Revision: 1
Add comment 43 Plus +
Add comment 44 Plus +Number
Add comment 45 Plus +
Add comment 46 Plus + OpenGL ES Extension XX
Add comment 47 Plus +
Add comment 48 Plus +Dependencies
Add comment 49 Plus +
Add comment 50 Plus +Overview
Add comment 51 Plus +
Add comment 52 Plus +IP Status
Add comment 53 Plus +
Add comment 54 Plus + No known IP claims.
Add comment 55 Plus +
Add comment 56 Plus +New Types
Add comment 57 Plus +
Add comment 58 Plus + /*
Add comment 59 Plus + * GLMTLRasterizationRateMapANGLE is an opaque handle to an id<MTLRasterizationRateMap>
Add comment 60 Plus + */
Add comment 61 Plus + typedef void* GLMTLRasterizationRateMapANGLE;
Add comment 62 Plus +
Add comment 63 Plus +New Procedures and Functions
Add comment 64 Plus +
Add comment 65 Plus + void BindMetalRasterizationRateMapANGLE(GLMTLRasterizationRateMapANGLE map);
Add comment 66 Plus +
Add comment 67 Plus +New Tokens
Add comment 68 Plus +
Add comment 69 Plus + Accepted by the <cap> parameter of Enable, Disable, and IsEnabled, by the
Add comment 70 Plus + <target> parameter of Enablei, Disablei, IsEnabledi, GetBooleani_v, GetIntegeri_v, GetInteger64i_v, and by the <pname> parameter
Add comment 71 Plus + of GetBooleanv, GetIntegerv, GetInteger64v, GetFloatv,
Add comment 72 Plus +
Add comment 73 Plus + VARIABLE_RASTERIZATION_RATE_ANGLE 0x96BC
Add comment 74 Plus +
Add comment 75 Plus + Accepted by the <pname> parameter of GetPointerv:
Add comment 76 Plus +
Add comment 77 Plus + METAL_RASTERIZATION_RATE_MAP_BINDING_ANGLE 0x96BD
Add comment 78 Plus +
Add comment 79 Plus +Issues
Add comment 80 Plus +
Add comment 81 Plus + 1) Specify behavior of BindMetalRaterizationRateMap(...)
Add comment 82 Plus +
Add comment 83 Plus + - Though this extension's incomplete and being prototyped, would you
Add comment 84 Plus + like to mention anything about the semantics of this new binding
Add comment 85 Plus + point?
Add comment 86 Plus +
Add comment 87 Plus + - Should this define ownership of the MTLRasterizationRateMap?
Add comment 88 Plus +
Add comment 89 Plus + - MTLRasterizationRateMap needs to define multiple layer maps if
Add comment 90 Plus + performing layered rendering - which I assume would mean using
Add comment 91 Plus + multiple draw buffers in OpenGL ES semantics.
Add comment 92 Plus +
Add comment 93 Plus + - Should this mention errors, for example that subsequent draw calls
Add comment 94 Plus + will fail with INVALID_OPERATION if the number of color attachments on
Add comment 95 Plus + the bound framebuffer doesn't match the number of layer maps in the
Add comment 96 Plus + rasterization rate map?
Add comment 97 Plus +
Add comment 98 Plus + - Does passing nullptr restore the GL state to its original value?
Add comment 99 Plus +
Add comment 100 Plus + - Does binding a rasterization rate map created with a different Metal
Add comment 101 Plus + device to that of ANGLE cause an error? If not, should it?
Add comment 102 Plus +
Add comment 103 Plus + 2) Specify behavior of glEnable(GL_VARIABLE_RASTERIZATION_RATE_ANGLE)
Add comment 104 Plus +
Add comment 105 Plus + - What happens if GL_VARIABLE_RASTERIZATION_RATE_ANGLE is enabled, but
Add comment 106 Plus + no rasterization rate map is bound?
Add comment 107 Plus +
Add comment 108 Plus + In the current implementation, if the feature is enable but no map is
Add comment 109 Plus + bound the GL renders as normal and no error is generated.
Add comment 110 Plus +
Add comment 111 Plus + 3) Does this feature require a GLSL extension to allow access to
Add comment 112 Plus + rasterization_rate_map_decoder when rendering with an enabled map? Should
Add comment 113 Plus + gl_FragCoord automatically be adjusted when rendering with a map?
Add comment 114 Plus diff --git a/include/GLES2/gl2ext_angle.h b/include/GLES2/gl2ext_angle.h
Add comment 115 Plus index 7e08b1cbbd..9cb77e9a18 100644
Add comment 116 Plus --- a/include/GLES2/gl2ext_angle.h
Add comment 117 Plus +++ b/include/GLES2/gl2ext_angle.h
Add comment 118 Plus @@ -731,4 +731,16 @@ GL_APICALL void GL_APIENTRY glLogicOpANGLE (GLenum);
Add comment 119 Plus #endif
Add comment 120 Plus #endif /* GL_ANGLE_logic_op */
Add comment 121 Plus
Add comment 122 Plus +#ifndef GL_ANGLE_variable_rasterization_rate_metal
Add comment 123 Plus +#define GL_ANGLE_variable_rasterization_rate_metal 1
Add comment 124 Plus +
Add comment 125 Plus +#define GL_VARIABLE_RASTERIZATION_RATE_ANGLE 0x96BC
Add comment 126 Plus +#define GL_METAL_RASTERIZATION_RATE_MAP_BINDING_ANGLE 0x96BD
Add comment 127 Plus +typedef void *GLMTLRasterizationRateMapANGLE;
Add comment 128 Plus +typedef void (GL_APIENTRYP PFNGLBINDMETALRASTERIZATIONRATEMAPANGLEPROC) (GLMTLRasterizationRateMapANGLE);
Add comment 129 Plus +#ifdef GL_GLEXT_PROTOTYPES
Add comment 130 Plus +GL_APICALL void GL_APIENTRY glBindMetalRasterizationRateMapANGLE(GLMTLRasterizationRateMapANGLE map);
Add comment 131 Plus +#endif
Add comment 132 Plus +#endif /* GL_ANGLE_variable_rasterization_rate_metal */
Add comment 133 Plus +
Add comment 134 Plus #endif // INCLUDE_GLES2_GL2EXT_ANGLE_H_
Add comment 135 Plus diff --git a/include/platform/autogen/FeaturesMtl_autogen.h b/include/platform/autogen/FeaturesMtl_autogen.h
Add comment 136 Plus index 3f09fa4c4e..441b5b5770 100644
Add comment 137 Plus --- a/include/platform/autogen/FeaturesMtl_autogen.h
Add comment 138 Plus +++ b/include/platform/autogen/FeaturesMtl_autogen.h
Add comment 139 Plus @@ -83,6 +83,13 @@ struct FeaturesMtl : FeatureSetBase
Add comment 140 Plus &members,
Add comment 141 Plus };
Add comment 142 Plus
Add comment 143 Plus + FeatureInfo hasVariableRasterizationRate = {
Add comment 144 Plus + "hasVariableRasterizationRate",
Add comment 145 Plus + FeatureCategory::MetalFeatures,
Add comment 146 Plus + "The renderer supports variable rasterization rate",
Add comment 147 Plus + &members,
Add comment 148 Plus + };
Add comment 149 Plus +
Add comment 150 Plus FeatureInfo allowInlineConstVertexData = {
Add comment 151 Plus "allowInlineConstVertexData",
Add comment 152 Plus FeatureCategory::MetalFeatures,
Add comment 153 Plus diff --git a/include/platform/mtl_features.json b/include/platform/mtl_features.json
Add comment 154 Plus index a636c5e777..d1624a7c49 100644
Add comment 155 Plus --- a/include/platform/mtl_features.json
Add comment 156 Plus +++ b/include/platform/mtl_features.json
Add comment 157 Plus @@ -70,6 +70,13 @@
Add comment 158 Plus "The renderer supports MTL(Shared)Event"
Add comment 159 Plus ]
Add comment 160 Plus },
Add comment 161 Plus + {
Add comment 162 Plus + "name": "has_variable_rasterization_rate",
Add comment 163 Plus + "category": "Features",
Add comment 164 Plus + "description": [
Add comment 165 Plus + "The renderer supports variable rasterization rate"
Add comment 166 Plus + ]
Add comment 167 Plus + },
Add comment 168 Plus {
Add comment 169 Plus "name": "allow_inline_const_vertex_data",
Add comment 170 Plus "category": "Features",
Add comment 171 Plus diff --git a/scripts/generate_entry_points.py b/scripts/generate_entry_points.py
Add comment 172 Plus index aeb978aeb1..cca12812be 100755
Add comment 173 Plus --- a/scripts/generate_entry_points.py
Add comment 174 Plus +++ b/scripts/generate_entry_points.py
Add comment 175 Plus @@ -988,6 +988,7 @@ FORMAT_DICT = {
Add comment 176 Plus "GLfloat": "%f",
Add comment 177 Plus "GLint": "%d",
Add comment 178 Plus "GLintptr": UNSIGNED_LONG_LONG_FORMAT,
Add comment 179 Plus + "GLMTLRasterizationRateMapANGLE": POINTER_FORMAT,
Add comment 180 Plus "GLshort": "%d",
Add comment 181 Plus "GLsizei": "%d",
Add comment 182 Plus "GLsizeiptr": UNSIGNED_LONG_LONG_FORMAT,
Add comment 183 Plus diff --git a/scripts/gl_angle_ext.xml b/scripts/gl_angle_ext.xml
Add comment 184 Plus index 914c5075b2..1e0c3807ca 100644
Add comment 185 Plus --- a/scripts/gl_angle_ext.xml
Add comment 186 Plus +++ b/scripts/gl_angle_ext.xml
Add comment 187 Plus @@ -9,6 +9,11 @@
Add comment 188 Plus Includes data used to auto-generate ANGLE classes.
Add comment 189 Plus </comment>
Add comment 190 Plus
Add comment 191 Plus + <!-- SECTION: GL type definitions. -->
Add comment 192 Plus + <types>
Add comment 193 Plus + <type>typedef void *<name>GLMTLRasterizationRateMapANGLE</name>;</type>
Add comment 194 Plus + </types>
Add comment 195 Plus +
Add comment 196 Plus <!-- SECTION: GL parameter class type definitions. -->
Add comment 197 Plus <groups>
Add comment 198 Plus <group name="CreateFlagMask">
Add comment 199 Plus @@ -1036,6 +1041,10 @@
Add comment 200 Plus <proto>void <name>glLogicOpANGLE</name></proto>
Add comment 201 Plus <param group="LogicOp"><ptype>GLenum</ptype> <name>opcode</name></param>
Add comment 202 Plus </command>
Add comment 203 Plus + <command>
Add comment 204 Plus + <proto>void <name>glBindMetalRasterizationRateMapANGLE</name></proto>
Add comment 205 Plus + <param><ptype>GLMTLRasterizationRateMapANGLE</ptype> <name>map</name></param>
Add comment 206 Plus + </command>
Add comment 207 Plus </commands>
Add comment 208 Plus
Add comment 209 Plus <!-- SECTION: ANGLE extension interface definitions -->
Add comment 210 Plus @@ -1348,6 +1357,13 @@
Add comment 211 Plus <command name="glLogicOpANGLE"/>
Add comment 212 Plus </require>
Add comment 213 Plus </extension>
Add comment 214 Plus + <extension name="GL_ANGLE_variable_rasterization_rate_metal" supported="gles2">
Add comment 215 Plus + <require>
Add comment 216 Plus + <enum name="GL_VARIABLE_RASTERIZATION_RATE_ANGLE"/>
Add comment 217 Plus + <enum name="GL_METAL_RASTERIZATION_RATE_MAP_BINDING_ANGLE"/>
Add comment 218 Plus + <command name="glBindMetalRasterizationRateMapANGLE"/>
Add comment 219 Plus + </require>
Add comment 220 Plus + </extension>
Add comment 221 Plus </extensions>
Add comment 222 Plus
Add comment 223 Plus <!-- SECTION: GL enumerant (token) definitions. -->
Add comment 224 Plus @@ -1473,4 +1489,9 @@
Add comment 225 Plus <enums namespace="GL" start="0x0BF2" end="0x0BF2" vendor="ANGLE">
Add comment 226 Plus <enum value="0x0BF2" name="GL_COLOR_LOGIC_OP_ANGLE"/>
Add comment 227 Plus </enums>
Add comment 228 Plus +
Add comment 229 Plus + <enums namespace="GL" start="0x96BC" end="0x96BD" vendor="ANGLE">
Add comment 230 Plus + <enum value="0x96BC" name="GL_VARIABLE_RASTERIZATION_RATE_ANGLE"/>
Add comment 231 Plus + <enum value="0x96BD" name="GL_METAL_RASTERIZATION_RATE_MAP_BINDING_ANGLE"/>
Add comment 232 Plus + </enums>
Add comment 233 Plus </registry>
Add comment 234 Plus diff --git a/scripts/registry_xml.py b/scripts/registry_xml.py
Add comment 235 Plus index 15d5895510..1baada9206 100644
Add comment 236 Plus --- a/scripts/registry_xml.py
Add comment 237 Plus +++ b/scripts/registry_xml.py
Add comment 238 Plus @@ -73,6 +73,7 @@ angle_requestable_extensions = [
Add comment 239 Plus "GL_ANGLE_texture_compression_dxt5",
Add comment 240 Plus "GL_ANGLE_texture_external_update",
Add comment 241 Plus "GL_ANGLE_texture_multisample",
Add comment 242 Plus + "GL_ANGLE_variable_rasterization_rate_metal",
Add comment 243 Plus "GL_ANGLE_vulkan_image",
Add comment 244 Plus "GL_ANGLE_yuv_internal_format",
Add comment 245 Plus "GL_CHROMIUM_color_buffer_float_rgb",
Add comment 246 Plus diff --git a/src/common/entry_points_enum_autogen.cpp b/src/common/entry_points_enum_autogen.cpp
Add comment 247 Plus index b67bc6aefa..f633d17cc1 100644
Add comment 248 Plus --- a/src/common/entry_points_enum_autogen.cpp
Add comment 249 Plus +++ b/src/common/entry_points_enum_autogen.cpp
Add comment 250 Plus @@ -538,6 +538,8 @@ const char *GetEntryPointName(EntryPoint ep)
Add comment 251 Plus return "glBindImageTexture";
Add comment 252 Plus case EntryPoint::GLBindImageTextures:
Add comment 253 Plus return "glBindImageTextures";
Add comment 254 Plus + case EntryPoint::GLBindMetalRasterizationRateMapANGLE:
Add comment 255 Plus + return "glBindMetalRasterizationRateMapANGLE";
Add comment 256 Plus case EntryPoint::GLBindProgramPipeline:
Add comment 257 Plus return "glBindProgramPipeline";
Add comment 258 Plus case EntryPoint::GLBindProgramPipelineEXT:
Add comment 259 Plus diff --git a/src/common/entry_points_enum_autogen.h b/src/common/entry_points_enum_autogen.h
Add comment 260 Plus index 70bbb9cf22..c93f217582 100644
Add comment 261 Plus --- a/src/common/entry_points_enum_autogen.h
Add comment 262 Plus +++ b/src/common/entry_points_enum_autogen.h
Add comment 263 Plus @@ -275,6 +275,7 @@ enum class EntryPoint
Add comment 264 Plus GLBindFramebufferOES,
Add comment 265 Plus GLBindImageTexture,
Add comment 266 Plus GLBindImageTextures,
Add comment 267 Plus + GLBindMetalRasterizationRateMapANGLE,
Add comment 268 Plus GLBindProgramPipeline,
Add comment 269 Plus GLBindProgramPipelineEXT,
Add comment 270 Plus GLBindRenderbuffer,
Add comment 271 Plus diff --git a/src/common/frame_capture_utils_autogen.cpp b/src/common/frame_capture_utils_autogen.cpp
Add comment 272 Plus index f356982285..9f601fc824 100644
Add comment 273 Plus --- a/src/common/frame_capture_utils_autogen.cpp
Add comment 274 Plus +++ b/src/common/frame_capture_utils_autogen.cpp
Add comment 275 Plus @@ -222,6 +222,10 @@ void WriteParamCaptureReplay(std::ostream &os, const CallCapture &call, const Pa
Add comment 276 Plus WriteParamValueReplay<ParamType::TGLDEBUGPROCKHR>(os, call,
Add comment 277 Plus param.value.GLDEBUGPROCKHRVal);
Add comment 278 Plus break;
Add comment 279 Plus + case ParamType::TGLMTLRasterizationRateMapANGLE:
Add comment 280 Plus + WriteParamValueReplay<ParamType::TGLMTLRasterizationRateMapANGLE>(
Add comment 281 Plus + os, call, param.value.GLMTLRasterizationRateMapANGLEVal);
Add comment 282 Plus + break;
Add comment 283 Plus case ParamType::TGLbitfield:
Add comment 284 Plus WriteParamValueReplay<ParamType::TGLbitfield>(os, call, param.value.GLbitfieldVal);
Add comment 285 Plus break;
Add comment 286 Plus @@ -768,6 +772,8 @@ const char *ParamTypeToString(ParamType paramType)
Add comment 287 Plus return "GLDEBUGPROC";
Add comment 288 Plus case ParamType::TGLDEBUGPROCKHR:
Add comment 289 Plus return "GLDEBUGPROCKHR";
Add comment 290 Plus + case ParamType::TGLMTLRasterizationRateMapANGLE:
Add comment 291 Plus + return "GLMTLRasterizationRateMapANGLE";
Add comment 292 Plus case ParamType::TGLbitfield:
Add comment 293 Plus return "GLbitfield";
Add comment 294 Plus case ParamType::TGLboolean:
Add comment 295 Plus diff --git a/src/common/frame_capture_utils_autogen.h b/src/common/frame_capture_utils_autogen.h
Add comment 296 Plus index e68affb0e0..88a18830e8 100644
Add comment 297 Plus --- a/src/common/frame_capture_utils_autogen.h
Add comment 298 Plus +++ b/src/common/frame_capture_utils_autogen.h
Add comment 299 Plus @@ -74,6 +74,7 @@ enum class ParamType
Add comment 300 Plus TFramebufferIDPointer,
Add comment 301 Plus TGLDEBUGPROC,
Add comment 302 Plus TGLDEBUGPROCKHR,
Add comment 303 Plus + TGLMTLRasterizationRateMapANGLE,
Add comment 304 Plus TGLbitfield,
Add comment 305 Plus TGLboolean,
Add comment 306 Plus TGLbooleanConstPointer,
Add comment 307 Plus @@ -191,7 +192,7 @@ enum class ParamType
Add comment 308 Plus TvoidPointerPointer,
Add comment 309 Plus };
Add comment 310 Plus
Add comment 311 Plus -constexpr uint32_t kParamTypeCount = 172;
Add comment 312 Plus +constexpr uint32_t kParamTypeCount = 173;
Add comment 313 Plus
Add comment 314 Plus union ParamValue
Add comment 315 Plus {
Add comment 316 Plus @@ -252,6 +253,7 @@ union ParamValue
Add comment 317 Plus gl::FramebufferID *FramebufferIDPointerVal;
Add comment 318 Plus GLDEBUGPROC GLDEBUGPROCVal;
Add comment 319 Plus GLDEBUGPROCKHR GLDEBUGPROCKHRVal;
Add comment 320 Plus + GLMTLRasterizationRateMapANGLE GLMTLRasterizationRateMapANGLEVal;
Add comment 321 Plus GLbitfield GLbitfieldVal;
Add comment 322 Plus GLboolean GLbooleanVal;
Add comment 323 Plus const GLboolean *GLbooleanConstPointerVal;
Add comment 324 Plus @@ -745,6 +747,14 @@ inline GLDEBUGPROCKHR GetParamVal<ParamType::TGLDEBUGPROCKHR, GLDEBUGPROCKHR>(
Add comment 325 Plus return value.GLDEBUGPROCKHRVal;
Add comment 326 Plus }
Add comment 327 Plus
Add comment 328 Plus +template <>
Add comment 329 Plus +inline GLMTLRasterizationRateMapANGLE
Add comment 330 Plus +GetParamVal<ParamType::TGLMTLRasterizationRateMapANGLE, GLMTLRasterizationRateMapANGLE>(
Add comment 331 Plus + const ParamValue &value)
Add comment 332 Plus +{
Add comment 333 Plus + return value.GLMTLRasterizationRateMapANGLEVal;
Add comment 334 Plus +}
Add comment 335 Plus +
Add comment 336 Plus template <>
Add comment 337 Plus inline GLbitfield GetParamVal<ParamType::TGLbitfield, GLbitfield>(const ParamValue &value)
Add comment 338 Plus {
Add comment 339 Plus @@ -1629,6 +1639,8 @@ T AccessParamValue(ParamType paramType, const ParamValue &value)
Add comment 340 Plus return GetParamVal<ParamType::TGLDEBUGPROC, T>(value);
Add comment 341 Plus case ParamType::TGLDEBUGPROCKHR:
Add comment 342 Plus return GetParamVal<ParamType::TGLDEBUGPROCKHR, T>(value);
Add comment 343 Plus + case ParamType::TGLMTLRasterizationRateMapANGLE:
Add comment 344 Plus + return GetParamVal<ParamType::TGLMTLRasterizationRateMapANGLE, T>(value);
Add comment 345 Plus case ParamType::TGLbitfield:
Add comment 346 Plus return GetParamVal<ParamType::TGLbitfield, T>(value);
Add comment 347 Plus case ParamType::TGLboolean:
Add comment 348 Plus @@ -2227,6 +2239,14 @@ inline void SetParamVal<ParamType::TGLDEBUGPROCKHR>(GLDEBUGPROCKHR valueIn, Para
Add comment 349 Plus valueOut->GLDEBUGPROCKHRVal = valueIn;
Add comment 350 Plus }
Add comment 351 Plus
Add comment 352 Plus +template <>
Add comment 353 Plus +inline void SetParamVal<ParamType::TGLMTLRasterizationRateMapANGLE>(
Add comment 354 Plus + GLMTLRasterizationRateMapANGLE valueIn,
Add comment 355 Plus + ParamValue *valueOut)
Add comment 356 Plus +{
Add comment 357 Plus + valueOut->GLMTLRasterizationRateMapANGLEVal = valueIn;
Add comment 358 Plus +}
Add comment 359 Plus +
Add comment 360 Plus template <>
Add comment 361 Plus inline void SetParamVal<ParamType::TGLbitfield>(GLbitfield valueIn, ParamValue *valueOut)
Add comment 362 Plus {
Add comment 363 Plus @@ -3149,6 +3169,9 @@ void InitParamValue(ParamType paramType, T valueIn, ParamValue *valueOut)
Add comment 364 Plus case ParamType::TGLDEBUGPROCKHR:
Add comment 365 Plus SetParamVal<ParamType::TGLDEBUGPROCKHR>(valueIn, valueOut);
Add comment 366 Plus break;
Add comment 367 Plus + case ParamType::TGLMTLRasterizationRateMapANGLE:
Add comment 368 Plus + SetParamVal<ParamType::TGLMTLRasterizationRateMapANGLE>(valueIn, valueOut);
Add comment 369 Plus + break;
Add comment 370 Plus case ParamType::TGLbitfield:
Add comment 371 Plus SetParamVal<ParamType::TGLbitfield>(valueIn, valueOut);
Add comment 372 Plus break;
Add comment 373 Plus diff --git a/src/common/gl_enum_utils_autogen.cpp b/src/common/gl_enum_utils_autogen.cpp
Add comment 374 Plus index 73806ab5bc..374ea29ae1 100644
Add comment 375 Plus --- a/src/common/gl_enum_utils_autogen.cpp
Add comment 376 Plus +++ b/src/common/gl_enum_utils_autogen.cpp
Add comment 377 Plus @@ -2754,6 +2754,10 @@ const char *GLenumToString(GLESEnum enumGroup, unsigned int value)
Add comment 378 Plus return "GL_SHADING_RATE_4X2_PIXELS_QCOM";
Add comment 379 Plus case 0x96AE:
Add comment 380 Plus return "GL_SHADING_RATE_4X4_PIXELS_QCOM";
Add comment 381 Plus + case 0x96BC:
Add comment 382 Plus + return "GL_VARIABLE_RASTERIZATION_RATE_ANGLE";
Add comment 383 Plus + case 0x96BD:
Add comment 384 Plus + return "GL_METAL_RASTERIZATION_RATE_MAP_BINDING_ANGLE";
Add comment 385 Plus case 0x96E0:
Add comment 386 Plus return "GL_MAX_PIXEL_LOCAL_STORAGE_PLANES_ANGLE";
Add comment 387 Plus case 0x96E1:
Add comment 388 Plus @@ -21945,6 +21949,7 @@ static StringEnumEntry g_stringEnumTable[] = {
Add comment 389 Plus {"GL_MESH_SUBROUTINE_UNIFORM_NV", 0x957E},
Add comment 390 Plus {"GL_MESH_VERTICES_OUT_NV", 0x9579},
Add comment 391 Plus {"GL_MESH_WORK_GROUP_SIZE_NV", 0x953E},
Add comment 392 Plus + {"GL_METAL_RASTERIZATION_RATE_MAP_BINDING_ANGLE", 0x96BD},
Add comment 393 Plus {"GL_MIN", 0x8007},
Add comment 394 Plus {"GL_MINMAX", 0x802E},
Add comment 395 Plus {"GL_MINMAX_EXT", 0x802E},
Add comment 396 Plus @@ -24579,6 +24584,7 @@ static StringEnumEntry g_stringEnumTable[] = {
Add comment 397 Plus {"GL_VARIABLE_E_NV", 0x8527},
Add comment 398 Plus {"GL_VARIABLE_F_NV", 0x8528},
Add comment 399 Plus {"GL_VARIABLE_G_NV", 0x8529},
Add comment 400 Plus + {"GL_VARIABLE_RASTERIZATION_RATE_ANGLE", 0x96BC},
Add comment 401 Plus {"GL_VARIANT_ARRAY_EXT", 0x87E8},
Add comment 402 Plus {"GL_VARIANT_ARRAY_POINTER_EXT", 0x87E9},
Add comment 403 Plus {"GL_VARIANT_ARRAY_STRIDE_EXT", 0x87E6},
Add comment 404 Plus diff --git a/src/common/utilities.cpp b/src/common/utilities.cpp
Add comment 405 Plus index 34826b4755..2e03a110de 100644
Add comment 406 Plus --- a/src/common/utilities.cpp
Add comment 407 Plus +++ b/src/common/utilities.cpp
Add comment 408 Plus @@ -6,6 +6,12 @@
Add comment 409 Plus
Add comment 410 Plus // utilities.cpp: Conversion functions and other utility routines.
Add comment 411 Plus
Add comment 412 Plus +// Older clang versions have a false positive on this warning here.
Add comment 413 Plus +// TODO(dino): Is this still necessary?
Add comment 414 Plus +#if defined(__clang__)
Add comment 415 Plus +# pragma clang diagnostic ignored "-Wglobal-constructors"
Add comment 416 Plus +#endif
Add comment 417 Plus +
Add comment 418 Plus #include "common/utilities.h"
Add comment 419 Plus #include "GLES3/gl3.h"
Add comment 420 Plus #include "common/mathutil.h"
Add comment 421 Plus diff --git a/src/libANGLE/Context.cpp b/src/libANGLE/Context.cpp
Add comment 422 Plus index 5dd9065894..1f7012ce63 100644
Add comment 423 Plus --- a/src/libANGLE/Context.cpp
Add comment 424 Plus +++ b/src/libANGLE/Context.cpp
Add comment 425 Plus @@ -9903,6 +9903,12 @@ void Context::textureFoveationParameters(TextureID texturePacked,
Add comment 426 Plus state::ExtendedDirtyBitType::EXTENDED_DIRTY_BIT_FOVEATED_RENDERING);
Add comment 427 Plus }
Add comment 428 Plus
Add comment 429 Plus +void Context::bindMetalRasterizationRateMap(GLMTLRasterizationRateMapANGLE map)
Add comment 430 Plus +{
Add comment 431 Plus + ANGLE_CONTEXT_TRY(mImplementation->bindMetalRasterizationRateMap(this, map));
Add comment 432 Plus + getMutablePrivateState()->setVariableRasterizationRateMap(map);
Add comment 433 Plus +}
Add comment 434 Plus +
Add comment 435 Plus // ErrorSet implementation.
Add comment 436 Plus ErrorSet::ErrorSet(Debug *debug,
Add comment 437 Plus const angle::FrontendFeatures &frontendFeatures,
Add comment 438 Plus diff --git a/src/libANGLE/Context_gles_ext_autogen.h b/src/libANGLE/Context_gles_ext_autogen.h
Add comment 439 Plus index 8fb78d9035..112e232672 100644
Add comment 440 Plus --- a/src/libANGLE/Context_gles_ext_autogen.h
Add comment 441 Plus +++ b/src/libANGLE/Context_gles_ext_autogen.h
Add comment 442 Plus @@ -617,6 +617,8 @@
Add comment 443 Plus void invalidateTexture(TextureType targetPacked); \
Add comment 444 Plus /* GL_ANGLE_texture_multisample */ \
Add comment 445 Plus /* GL_ANGLE_texture_rectangle */ \
Add comment 446 Plus + /* GL_ANGLE_variable_rasterization_rate_metal */ \
Add comment 447 Plus + void bindMetalRasterizationRateMap(GLMTLRasterizationRateMapANGLE map); \
Add comment 448 Plus /* GL_ANGLE_vulkan_image */ \
Add comment 449 Plus void acquireTextures(GLuint numTextures, const TextureID *texturesPacked, \
Add comment 450 Plus const GLenum *layouts); \
Add comment 451 Plus diff --git a/src/libANGLE/State.cpp b/src/libANGLE/State.cpp
Add comment 452 Plus index 6b0adeba62..e88b156487 100644
Add comment 453 Plus --- a/src/libANGLE/State.cpp
Add comment 454 Plus +++ b/src/libANGLE/State.cpp
Add comment 455 Plus @@ -6,6 +6,9 @@
Add comment 456 Plus
Add comment 457 Plus // State.cpp: Implements the State class, encapsulating raw GL state.
Add comment 458 Plus
Add comment 459 Plus +// Older clang versions have a false positive on this warning here.
Add comment 460 Plus +#pragma clang diagnostic ignored "-Wglobal-constructors"
Add comment 461 Plus +
Add comment 462 Plus #include "libANGLE/State.h"
Add comment 463 Plus
Add comment 464 Plus #include <string.h>
Add comment 465 Plus @@ -369,6 +372,8 @@ PrivateState::PrivateState(const EGLenum clientType,
Add comment 466 Plus mLogicOp(LogicalOperation::Copy),
Add comment 467 Plus mPatchVertices(3),
Add comment 468 Plus mPixelLocalStorageActivePlanes(0),
Add comment 469 Plus + mVariableRasterizationRateEnabled(false),
Add comment 470 Plus + mVariableRasterizationRateMap(nullptr),
Add comment 471 Plus mNoSimultaneousConstantColorAndAlphaBlendFunc(false),
Add comment 472 Plus mSetBlendIndexedInvoked(false),
Add comment 473 Plus mSetBlendFactorsIndexedInvoked(false),
Add comment 474 Plus @@ -1231,6 +1236,26 @@ void PrivateState::setLogicOp(LogicalOperation opcode)
Add comment 475 Plus }
Add comment 476 Plus }
Add comment 477 Plus
Add comment 478 Plus +void PrivateState::setVariableRasterizationRateEnabled(bool enabled)
Add comment 479 Plus +{
Add comment 480 Plus + if (mVariableRasterizationRateEnabled != enabled)
Add comment 481 Plus + {
Add comment 482 Plus + mVariableRasterizationRateEnabled = enabled;
Add comment 483 Plus + mDirtyBits.set(state::DIRTY_BIT_EXTENDED);
Add comment 484 Plus + mExtendedDirtyBits.set(state::EXTENDED_DIRTY_BIT_VARIABLE_RASTERIZATION_RATE);
Add comment 485 Plus + }
Add comment 486 Plus +}
Add comment 487 Plus +
Add comment 488 Plus +void PrivateState::setVariableRasterizationRateMap(GLMTLRasterizationRateMapANGLE map)
Add comment 489 Plus +{
Add comment 490 Plus + if (mVariableRasterizationRateMap != map)
Add comment 491 Plus + {
Add comment 492 Plus + mVariableRasterizationRateMap = map;
Add comment 493 Plus + mDirtyBits.set(state::DIRTY_BIT_EXTENDED);
Add comment 494 Plus + mExtendedDirtyBits.set(state::EXTENDED_DIRTY_BIT_VARIABLE_RASTERIZATION_RATE);
Add comment 495 Plus + }
Add comment 496 Plus +}
Add comment 497 Plus +
Add comment 498 Plus void PrivateState::setVertexAttribf(GLuint index, const GLfloat values[4])
Add comment 499 Plus {