Hash :
d8dc3cc2
Author :
Date :
2025-08-02T12:02:20
Remove shared context lock from glVertexAttrib{I}Format
This CL removes shared context lock from glVertexAttribFormat() and
glVertexAttribIFormat() APIs, since they no longer access anything
outside VertexArrayPrivate. The main problem I had run into is
validation code. Before this CL, ValidateIntegerVertexFormat() needs
context's mStateCache for mCachedVertexAttribTypesValidation and
mCachedIntegerVertexAttribTypesValidation. Given these two cached value
are constant after initialization, in this CL, I have moved them to
PrivateStateCache. PrivateStateCache argument is added to
ValidateVertexAttribFormat() and ValidateVertexAttribIFormat() to get
them access to mCachedIntegerVertexAttribTypesValidation.
Bug: b/433331119
Change-Id: Ifc3fbed32b4d3722c335dd2c393bc6519ed0b544
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6822032
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487
// GENERATED FILE - DO NOT EDIT.
// Generated by generate_entry_points.py using data from gl.xml and gl_angle_ext.xml.
//
// Copyright 2020 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// validationES1_autogen.h:
// Validation functions for the OpenGL ES 1.0 entry points.
#ifndef LIBANGLE_VALIDATION_ES1_AUTOGEN_H_
#define LIBANGLE_VALIDATION_ES1_AUTOGEN_H_
#include "common/PackedEnums.h"
#include "common/entry_points_enum_autogen.h"
namespace gl
{
class Context;
class PrivateState;
class PrivateStateCache;
class ErrorSet;
bool ValidateAlphaFunc(const PrivateState &state,
ErrorSet *errors,
angle::EntryPoint entryPoint,
AlphaTestFunc funcPacked,
GLfloat ref);
bool ValidateAlphaFuncx(const PrivateState &state,
ErrorSet *errors,
angle::EntryPoint entryPoint,
AlphaTestFunc funcPacked,
GLfixed ref);
bool ValidateClearColorx(const PrivateState &state,
ErrorSet *errors,
angle::EntryPoint entryPoint,
GLfixed red,
GLfixed green,
GLfixed blue,
GLfixed alpha);
bool ValidateClearDepthx(const PrivateState &state,
ErrorSet *errors,
angle::EntryPoint entryPoint,
GLfixed depth);
bool ValidateClientActiveTexture(const Context *context,
angle::EntryPoint entryPoint,
GLenum texture);
bool ValidateClipPlanef(const PrivateState &state,
ErrorSet *errors,
angle::EntryPoint entryPoint,
GLenum p,
const GLfloat *eqn);
bool ValidateClipPlanex(const PrivateState &state,
ErrorSet *errors,
angle::EntryPoint entryPoint,
GLenum plane,
const GLfixed *equation);
bool ValidateColor4f(const PrivateState &state,
ErrorSet *errors,
angle::EntryPoint entryPoint,
GLfloat red,
GLfloat green,
GLfloat blue,
GLfloat alpha);
bool ValidateColor4ub(const PrivateState &state,
ErrorSet *errors,
angle::EntryPoint entryPoint,
GLubyte red,
GLubyte green,
GLubyte blue,
GLubyte alpha);
bool ValidateColor4x(const PrivateState &state,
ErrorSet *errors,
angle::EntryPoint entryPoint,
GLfixed red,
GLfixed green,
GLfixed blue,
GLfixed alpha);
bool ValidateColorPointer(const Context *context,
angle::EntryPoint entryPoint,
GLint size,
VertexAttribType typePacked,
GLsizei stride,
const void *pointer);
bool ValidateDepthRangex(const PrivateState &state,
ErrorSet *errors,
angle::EntryPoint entryPoint,
GLfixed n,
GLfixed f);
bool ValidateDisableClientState(const Context *context,
angle::EntryPoint entryPoint,
ClientVertexArrayType arrayPacked);
bool ValidateEnableClientState(const Context *context,
angle::EntryPoint entryPoint,
ClientVertexArrayType arrayPacked);
bool ValidateFogf(const PrivateState &state,
ErrorSet *errors,
angle::EntryPoint entryPoint,
GLenum pname,
GLfloat param);
bool ValidateFogfv(const PrivateState &state,
ErrorSet *errors,
angle::EntryPoint entryPoint,
GLenum pname,
const GLfloat *params);
bool ValidateFogx(const PrivateState &state,
ErrorSet *errors,
angle::EntryPoint entryPoint,
GLenum pname,
GLfixed param);
bool ValidateFogxv(const PrivateState &state,
ErrorSet *errors,
angle::EntryPoint entryPoint,
GLenum pname,
const GLfixed *param);
bool ValidateFrustumf(const PrivateState &state,
ErrorSet *errors,
angle::EntryPoint entryPoint,
GLfloat l,
GLfloat r,
GLfloat b,
GLfloat t,
GLfloat n,
GLfloat f);
bool ValidateFrustumx(const PrivateState &state,
ErrorSet *errors,
angle::EntryPoint entryPoint,
GLfixed l,
GLfixed r,
GLfixed b,
GLfixed t,
GLfixed n,
GLfixed f);
bool ValidateGetClipPlanef(const PrivateState &state,
ErrorSet *errors,
angle::EntryPoint entryPoint,
GLenum plane,
const GLfloat *equation);
bool ValidateGetClipPlanex(const PrivateState &state,
ErrorSet *errors,
angle::EntryPoint entryPoint,
GLenum plane,
const GLfixed *equation);
bool ValidateGetFixedv(const Context *context,
angle::EntryPoint entryPoint,
GLenum pname,
const GLfixed *params);
bool ValidateGetLightfv(const PrivateState &state,
ErrorSet *errors,
angle::EntryPoint entryPoint,
GLenum light,
LightParameter pnamePacked,
const GLfloat *params);
bool ValidateGetLightxv(const PrivateState &state,
ErrorSet *errors,
angle::EntryPoint entryPoint,
GLenum light,
LightParameter pnamePacked,
const GLfixed *params);
bool ValidateGetMaterialfv(const PrivateState &state,
ErrorSet *errors,
angle::EntryPoint entryPoint,
GLenum face,
MaterialParameter pnamePacked,
const GLfloat *params);
bool ValidateGetMaterialxv(const PrivateState &state,
ErrorSet *errors,
angle::EntryPoint entryPoint,
GLenum face,
MaterialParameter pnamePacked,
const GLfixed *params);
bool ValidateGetTexEnvfv(const PrivateState &state,
ErrorSet *errors,
angle::EntryPoint entryPoint,
TextureEnvTarget targetPacked,
TextureEnvParameter pnamePacked,
const GLfloat *params);
bool ValidateGetTexEnviv(const PrivateState &state,
ErrorSet *errors,
angle::EntryPoint entryPoint,
TextureEnvTarget targetPacked,
TextureEnvParameter pnamePacked,
const GLint *params);
bool ValidateGetTexEnvxv(const PrivateState &state,
ErrorSet *errors,
angle::EntryPoint entryPoint,
TextureEnvTarget targetPacked,
TextureEnvParameter pnamePacked,
const GLfixed *params);
bool ValidateGetTexParameterxv(const Context *context,
angle::EntryPoint entryPoint,
TextureType targetPacked,
GLenum pname,
const GLfixed *params);
bool ValidateLightModelf(const PrivateState &state,
ErrorSet *errors,
angle::EntryPoint entryPoint,
GLenum pname,
GLfloat param);
bool ValidateLightModelfv(const PrivateState &state,
ErrorSet *errors,
angle::EntryPoint entryPoint,
GLenum pname,
const GLfloat *params);
bool ValidateLightModelx(const PrivateState &state,
ErrorSet *errors,
angle::EntryPoint entryPoint,
GLenum pname,
GLfixed param);
bool ValidateLightModelxv(const PrivateState &state,
ErrorSet *errors,
angle::EntryPoint entryPoint,
GLenum pname,
const GLfixed *param);
bool ValidateLightf(const PrivateState &state,
ErrorSet *errors,
angle::EntryPoint entryPoint,
GLenum light,
LightParameter pnamePacked,
GLfloat param);
bool ValidateLightfv(const PrivateState &state,
ErrorSet *errors,
angle::EntryPoint entryPoint,
GLenum light,
LightParameter pnamePacked,
const GLfloat *params);
bool ValidateLightx(const PrivateState &state,
ErrorSet *errors,
angle::EntryPoint entryPoint,
GLenum light,
LightParameter pnamePacked,
GLfixed param);
bool ValidateLightxv(const PrivateState &state,
ErrorSet *errors,
angle::EntryPoint entryPoint,
GLenum light,
LightParameter pnamePacked,
const GLfixed *params);
bool ValidateLineWidthx(const PrivateState &state,
ErrorSet *errors,
angle::EntryPoint entryPoint,
GLfixed width);
bool ValidateLoadIdentity(const PrivateState &state,
ErrorSet *errors,
angle::EntryPoint entryPoint);
bool ValidateLoadMatrixf(const PrivateState &state,
ErrorSet *errors,
angle::EntryPoint entryPoint,
const GLfloat *m);
bool ValidateLoadMatrixx(const PrivateState &state,
ErrorSet *errors,
angle::EntryPoint entryPoint,
const GLfixed *m);
bool ValidateLogicOp(const PrivateState &state,
ErrorSet *errors,
angle::EntryPoint entryPoint,
LogicalOperation opcodePacked);
bool ValidateMaterialf(const PrivateState &state,
ErrorSet *errors,
angle::EntryPoint entryPoint,
GLenum face,
MaterialParameter pnamePacked,
GLfloat param);
bool ValidateMaterialfv(const PrivateState &state,
ErrorSet *errors,
angle::EntryPoint entryPoint,
GLenum face,
MaterialParameter pnamePacked,
const GLfloat *params);
bool ValidateMaterialx(const PrivateState &state,
ErrorSet *errors,
angle::EntryPoint entryPoint,
GLenum face,
MaterialParameter pnamePacked,
GLfixed param);
bool ValidateMaterialxv(const PrivateState &state,
ErrorSet *errors,
angle::EntryPoint entryPoint,
GLenum face,
MaterialParameter pnamePacked,
const GLfixed *param);
bool ValidateMatrixMode(const PrivateState &state,
ErrorSet *errors,
angle::EntryPoint entryPoint,
MatrixType modePacked);
bool ValidateMultMatrixf(const PrivateState &state,
ErrorSet *errors,
angle::EntryPoint entryPoint,
const GLfloat *m);
bool ValidateMultMatrixx(const PrivateState &state,
ErrorSet *errors,
angle::EntryPoint entryPoint,
const GLfixed *m);
bool ValidateMultiTexCoord4f(const PrivateState &state,
ErrorSet *errors,
angle::EntryPoint entryPoint,
GLenum target,
GLfloat s,
GLfloat t,
GLfloat r,
GLfloat q);
bool ValidateMultiTexCoord4x(const PrivateState &state,
ErrorSet *errors,
angle::EntryPoint entryPoint,
GLenum texture,
GLfixed s,
GLfixed t,
GLfixed r,
GLfixed q);
bool ValidateNormal3f(const PrivateState &state,
ErrorSet *errors,
angle::EntryPoint entryPoint,
GLfloat nx,
GLfloat ny,
GLfloat nz);
bool ValidateNormal3x(const PrivateState &state,
ErrorSet *errors,
angle::EntryPoint entryPoint,
GLfixed nx,
GLfixed ny,
GLfixed nz);
bool ValidateNormalPointer(const Context *context,
angle::EntryPoint entryPoint,
VertexAttribType typePacked,
GLsizei stride,
const void *pointer);
bool ValidateOrthof(const PrivateState &state,
ErrorSet *errors,
angle::EntryPoint entryPoint,
GLfloat l,
GLfloat r,
GLfloat b,
GLfloat t,
GLfloat n,
GLfloat f);
bool ValidateOrthox(const PrivateState &state,
ErrorSet *errors,
angle::EntryPoint entryPoint,
GLfixed l,
GLfixed r,
GLfixed b,
GLfixed t,
GLfixed n,
GLfixed f);
bool ValidatePointParameterf(const PrivateState &state,
ErrorSet *errors,
angle::EntryPoint entryPoint,
PointParameter pnamePacked,
GLfloat param);
bool ValidatePointParameterfv(const PrivateState &state,
ErrorSet *errors,
angle::EntryPoint entryPoint,
PointParameter pnamePacked,
const GLfloat *params);
bool ValidatePointParameterx(const PrivateState &state,
ErrorSet *errors,
angle::EntryPoint entryPoint,
PointParameter pnamePacked,
GLfixed param);
bool ValidatePointParameterxv(const PrivateState &state,
ErrorSet *errors,
angle::EntryPoint entryPoint,
PointParameter pnamePacked,
const GLfixed *params);
bool ValidatePointSize(const PrivateState &state,
ErrorSet *errors,
angle::EntryPoint entryPoint,
GLfloat size);
bool ValidatePointSizex(const PrivateState &state,
ErrorSet *errors,
angle::EntryPoint entryPoint,
GLfixed size);
bool ValidatePolygonOffsetx(const PrivateState &state,
ErrorSet *errors,
angle::EntryPoint entryPoint,
GLfixed factor,
GLfixed units);
bool ValidatePopMatrix(const PrivateState &state, ErrorSet *errors, angle::EntryPoint entryPoint);
bool ValidatePushMatrix(const PrivateState &state, ErrorSet *errors, angle::EntryPoint entryPoint);
bool ValidateRotatef(const PrivateState &state,
ErrorSet *errors,
angle::EntryPoint entryPoint,
GLfloat angle,
GLfloat x,
GLfloat y,
GLfloat z);
bool ValidateRotatex(const PrivateState &state,
ErrorSet *errors,
angle::EntryPoint entryPoint,
GLfixed angle,
GLfixed x,
GLfixed y,
GLfixed z);
bool ValidateSampleCoveragex(const PrivateState &state,
ErrorSet *errors,
angle::EntryPoint entryPoint,
GLclampx value,
GLboolean invert);
bool ValidateScalef(const PrivateState &state,
ErrorSet *errors,
angle::EntryPoint entryPoint,
GLfloat x,
GLfloat y,
GLfloat z);
bool ValidateScalex(const PrivateState &state,
ErrorSet *errors,
angle::EntryPoint entryPoint,
GLfixed x,
GLfixed y,
GLfixed z);
bool ValidateShadeModel(const PrivateState &state,
ErrorSet *errors,
angle::EntryPoint entryPoint,
ShadingModel modePacked);
bool ValidateTexCoordPointer(const Context *context,
angle::EntryPoint entryPoint,
GLint size,
VertexAttribType typePacked,
GLsizei stride,
const void *pointer);
bool ValidateTexEnvf(const PrivateState &state,
ErrorSet *errors,
angle::EntryPoint entryPoint,
TextureEnvTarget targetPacked,
TextureEnvParameter pnamePacked,
GLfloat param);
bool ValidateTexEnvfv(const PrivateState &state,
ErrorSet *errors,
angle::EntryPoint entryPoint,
TextureEnvTarget targetPacked,
TextureEnvParameter pnamePacked,
const GLfloat *params);
bool ValidateTexEnvi(const PrivateState &state,
ErrorSet *errors,
angle::EntryPoint entryPoint,
TextureEnvTarget targetPacked,
TextureEnvParameter pnamePacked,
GLint param);
bool ValidateTexEnviv(const PrivateState &state,
ErrorSet *errors,
angle::EntryPoint entryPoint,
TextureEnvTarget targetPacked,
TextureEnvParameter pnamePacked,
const GLint *params);
bool ValidateTexEnvx(const PrivateState &state,
ErrorSet *errors,
angle::EntryPoint entryPoint,
TextureEnvTarget targetPacked,
TextureEnvParameter pnamePacked,
GLfixed param);
bool ValidateTexEnvxv(const PrivateState &state,
ErrorSet *errors,
angle::EntryPoint entryPoint,
TextureEnvTarget targetPacked,
TextureEnvParameter pnamePacked,
const GLfixed *params);
bool ValidateTexParameterx(const Context *context,
angle::EntryPoint entryPoint,
TextureType targetPacked,
GLenum pname,
GLfixed param);
bool ValidateTexParameterxv(const Context *context,
angle::EntryPoint entryPoint,
TextureType targetPacked,
GLenum pname,
const GLfixed *params);
bool ValidateTranslatef(const PrivateState &state,
ErrorSet *errors,
angle::EntryPoint entryPoint,
GLfloat x,
GLfloat y,
GLfloat z);
bool ValidateTranslatex(const PrivateState &state,
ErrorSet *errors,
angle::EntryPoint entryPoint,
GLfixed x,
GLfixed y,
GLfixed z);
bool ValidateVertexPointer(const Context *context,
angle::EntryPoint entryPoint,
GLint size,
VertexAttribType typePacked,
GLsizei stride,
const void *pointer);
} // namespace gl
#endif // LIBANGLE_VALIDATION_ES1_AUTOGEN_H_