src/libANGLE/capture/serialize.cpp


Log

Author Commit Date CI Message
Charlie Lao 2269011c 2025-06-30T14:08:11 Remove BitSet::to_ulong and BitSetArray::to_ulong BitSet::to_ulong() is a bit redundant with bits(), and has a risk of losing upper bits on windows platform where unsigned long is 32 bit. This CL removes the usage of it and replaced with bits(). BitSetArray::to_ulong() method only captures up to 64 bits, all other bits are dropped silently which is wrong. This CL fix this and serialize it as a vector of uint64_t. BitSetArray::to_ulong() is removed in this CL. Bug: angleproject:42264163 Change-Id: I663b2cdacc0e930ee616e333131e831ec124a9d4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6691283 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Charlie Lao <cclao@google.com>
Alexey Knyazev 408f5853 2025-04-04T00:00:00 Make gl::Version data members private * Further simplified gl::Version implementation by making data members private and merging them. * Used proper version struct comparisons instead of accessing individual version components. * Moved known version constants to Version.h for broader availability. * Removed no longer used helpers: * PrivateState::getClientMinorVersion() * State::getClientMinorVersion() * Context::getClientMinorVersion() Bug: angleproject:408843436 Change-Id: I3ae8f495269d649253fa2381ecbfc018a184fa20 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6460787 Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Shahbaz Youssefi b16d105f 2024-10-03T10:25:32 Remove Desktop GL front-end support For Desktop GL applications, please use Zink! Bug: angleproject:370937467 Change-Id: Ie734634bb62a2e98c80e1b32d8b3d34624da3c04 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5905428 Reviewed-by: Geoff Lang <geofflang@chromium.org>
Mohan Maiya 1b4d6185 2024-09-12T09:18:46 Vulkan: Cleanup sRGB related code Image and image view code is littered with sRGB related enums, even in places that don't deal with sRGB. Remove sRGB related parameters from initLayerImageView and getLevelLayerDrawImageView methods, which now assume default values. Add dedicated methods that allow overriding sRGB state values. Also introduce ColorspaceState struct that consolidates all sRGB related states, this will be used in follow up changes to track and infer colorspace of image views Bug: angleproject:40644776 Change-Id: Ifb366db48043e376f9ff6c30c852c44dd96562a1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5860808 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: mohan maiya <m.maiya@samsung.com>
Shahbaz Youssefi d193d51b 2024-06-17T22:46:08 Replace issue ids post migration to new issue tracker This change replaces anglebug.com/NNNN links. Bug: None Change-Id: I8ac3aec8d2a8a844b3d7b99fc0a6b2be8da31761 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5637912 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi a1665d2f 2024-05-10T00:15:31 Reland "Document thread-unsafe iterator access to resource maps" This is a reland of commit d1bb6ed8399dd12e79484f30f9e9ded95c25625a The crash was due to another issue (disabling EGL validation in Chrome) Original change's description: > Document thread-unsafe iterator access to resource maps > > By using a proxy type, everywhere resource maps are iterated are clearly > marked as not being thread safe. In most cases, only destruction and > capture/replay iterate over these maps, which means thread safety is not > an issue (or is externally enforced). > > The only case where iterators are used in the presence of other contexts > is with ANGLE_request_extension, which is changed to explicitly require > the application to ensure thread safety. In practice, the user is > Chrome which already guarantees this. > > Bug: angleproject:8667 > Change-Id: I7af13c6433b6955d9c36f9088b3aa4c065e1cfc1 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5526428 > Reviewed-by: Charlie Lao <cclao@google.com> > Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> > Reviewed-by: Geoff Lang <geofflang@chromium.org> Bug: angleproject:8667 Change-Id: Id539cabac01df5f242150f6684222577003eef3f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5531278 Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Shahbaz Youssefi 4e887491 2024-05-11T18:08:03 Revert "Document thread-unsafe iterator access to resource maps" This reverts commit d1bb6ed8399dd12e79484f30f9e9ded95c25625a. Reason for revert: Checking to see if it's the reason for crbug.com/339948886 Original change's description: > Document thread-unsafe iterator access to resource maps > > By using a proxy type, everywhere resource maps are iterated are clearly > marked as not being thread safe. In most cases, only destruction and > capture/replay iterate over these maps, which means thread safety is not > an issue (or is externally enforced). > > The only case where iterators are used in the presence of other contexts > is with ANGLE_request_extension, which is changed to explicitly require > the application to ensure thread safety. In practice, the user is > Chrome which already guarantees this. > > Bug: angleproject:8667 > Change-Id: I7af13c6433b6955d9c36f9088b3aa4c065e1cfc1 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5526428 > Reviewed-by: Charlie Lao <cclao@google.com> > Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> > Reviewed-by: Geoff Lang <geofflang@chromium.org> Bug: angleproject:8667 Change-Id: I1245c9e57dfeb27a7f0e5718b1455614c70bc0dc No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5532187 Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi d1bb6ed8 2024-05-10T00:15:31 Document thread-unsafe iterator access to resource maps By using a proxy type, everywhere resource maps are iterated are clearly marked as not being thread safe. In most cases, only destruction and capture/replay iterate over these maps, which means thread safety is not an issue (or is externally enforced). The only case where iterators are used in the presence of other contexts is with ANGLE_request_extension, which is changed to explicitly require the application to ensure thread safety. In practice, the user is Chrome which already guarantees this. Bug: angleproject:8667 Change-Id: I7af13c6433b6955d9c36f9088b3aa4c065e1cfc1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5526428 Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Shahbaz Youssefi 0c4d6446 2024-01-24T10:38:45 Rework uniform block <-> uniform buffer mapping In GLES, the shader declares which buffer binding a block (uniform, storage or atomic counter) is bound to. For example: layout(binding = 1) uniform ubo0 { ... }; layout(binding = 2) uniform ubo1 { ... }; layout(binding = 1) uniform ubo2 { ... }; In the above, ubo0 and ubo2 use data from the buffer bound to index 2 (through glBindBufferRange), while ubo1 uses data from the buffer bound to index 1. For uniform blocks in particular, omitting the binding is allowed, in which case it is implicitly bound to buffer 0. GLES allows uniform blocks (and only uniform blocks) to remap their bindings through calls to glUniformBlockBinding. This means that the mapping of uniform blocks in the program (ubo0, ubo1, ubo2) to the buffer bindings is not constant. For storage blocks and atomic counter buffers, this binding _is_ constant and is determined at link time. At link time, the mapping of blocks to buffers is determined based on values specified in the shaders. This info is stored was stored in gl::InterfaceBlock::binding (for UBOs and SSBOs), and gl::AtomicCounterBuffer::binding. For clarity, this change renames these members to ...::inShaderBinding. When glUniformBlockBinding is called, the mapping is updated. Prior to this change, gl::InterfaceBlock::binding was directly updated, trumping the mapping determined at link time. A bug here was that after a call to glProgramBinary, GL expects the mappings to reset to their original link-time values, but instead ANGLE restored the mappings to what was configured at the time the binary was retrieved. This change tracks the uniform block -> buffer binding mapping separately from the link results so that the original values can be restored during glProgramBinary. In the process, the support data structures for tracking this mapping are moved to ProgramExecutable and the algorithms are simplified. Program Pipeline Objects maintain this mapping identically to Programs and no longer require a special and more costly path when a buffer state changes. This change prepares for but does not yet fix the more fundamental bug that the dirty bits are tracked in the program executable instead of the context state, which makes changes not propagate to all contexts correctly. Bug: angleproject:8493 Change-Id: Ib0999f49be24db06ebe9a4917d06b90af899611e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5235883 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 175514c6 2024-01-12T14:43:33 Translator: Bundle metadata flags coming out of the translator In preparation for a follow up change that adds more such metadata. Bundling them together makes it convenient to retrieve, save and load all those flags. Bug: b/320563594 Change-Id: I4f95b32acfb0842cc5d9e72c1788a827bee2c760 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5209450 Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi fb6b960c 2023-11-27T14:24:28 Remove GL_CHROMIUM_texture_filtering_hint This was using an unregistered Vulkan extension to set the precision of SwiftShader's internal filtering for the sake of Chrome. That's baked in at build instead. Bug: angleproject:8349 Bug: chromium:726075 Change-Id: I12849d2d29d99626f22a92ee9d74366f78658476 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5063344 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Shahbaz Youssefi e7ce481f 2023-11-01T22:44:22 Consolidate parallel compilation in front-end This cleans up the multiple compilation task implementations in the backends and consolidates them in the front-end. The front-end is then able to do the compilation in an unlocked tail call instead if desired (in a future change). This change is in preparation for having the program link tasks directly wait on the shader compilation tasks. As a result, the "shader resolve" should not be needed to access the shader compilation results; it should be enough to wait for the compilation job. This change therefore moves post-processing of results to the compilation job itself as they did not need to actually be done after compilation is done (merely after translation is done). As a side effect, shader substition and other debug features should now work for the GL backend as they are now done before back-end compilation. Bug: angleproject:8297 Change-Id: Ib9274b1149fadca7545956a864d6635b6cba5c3a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4994655 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Charlie Lao 9ca025d2 2023-09-18T15:50:48 Flatten BufferVariable/ShaderVariableBuffer/InterfaceBlock struct InterfaceBlock inherits from ShaderVariableBuffer, ShaderVariableBuffer is not a trivially copyable struct, this made InterfaceBlock not trivially copyable. InterfaceBlock is being used by some app traces for uniform blocks. BufferVariable inherits from sh::ShaderVariable which is very complicated and not trivially copyable. This CL flattens all of these three structs to simple structs without inheritance, and wraps all trivially copyable data into one POD struct, thus load/save are cheaper. Bug: b/275102061 Change-Id: I96f89176ce3d3131cb1d3ea3280c3c36c257560f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4874610 Commit-Queue: Charlie Lao <cclao@google.com> Reviewed-by: Roman Lavrov <romanl@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi eb0d5997 2023-09-15T16:41:13 Move set/get uniform machinery to ProgramExecutable This is done because some uniforms are internally added by the compiler (draw ID, base vertex, and base instance) and are automatically set **on the installed executable**. This change fixes scenarios where a draw is done after a program has failed a relink, and therefore is unable to correctly set the uniforms (as it does not have access to the executable that is installed). It also fixes draws that use those uniforms in a PPO. Bug: angleproject:8297 Change-Id: Id74b4984b88aa09b5b81be1c91412d6c91711136 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4864693 Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 29561184 2023-09-06T22:08:33 Remove forward-to-executable helpers from program This helps avoid accidental usage of the executable that is in the program instead of the installed executable in the GL context. The program's executable is still accessed in specific cases of: - During link - GL program queries Bug: angleproject:8297 Change-Id: I40a956e740944f2ecfbf6e4a3060aac08c21f7f3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4864448 Commit-Queue: Yuxin Hu <yuxinhu@google.com> Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Yuxin Hu <yuxinhu@google.com> Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi d9672ada 2023-08-25T11:37:09 Move left over link state to ProgramExecutable Previously, only things that needed sharing with ProgramPipeline was moved to ProgramExecutable, and in particular only state that the Vulkan backend needed to access. In truth, everything that's a result of link needs moving. Bug: angleproject:8297 Change-Id: I1ca01c5dedbfc62ddcfb4ef945336ceb8ad0f1c4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4812044 Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Shahbaz Youssefi f3c1de36 2023-08-17T15:29:24 Make shader recompile while parallel linking safe Prior to this change, Program* objects held references to Shader* objects. This poses a problem where a shader recompile can race with a program link, if the program link is done in parallel. As a result, a good chunk of the link job is done serially and under the share group lock. After this change, that is no longer a problem, and most of the link can be made lockless/parallelized. This change separates out the "compiled state" from the rest of the shader state. This was already done for the front-end state (for the sake of caching), but is also now done for the backends that need it. The compiled state in turn is placed in a shared_ptr, and is shared with the program. When a shader is compiled, its own shared_ptr is replaced with a new object, leaving all programs currently compiling unaffected and using the previous compilation results. Once a program is linked, its references to compiled shader states is updated. Bug: angleproject:8297 Change-Id: Iff7094a37088fbad99c6241f1c48b0bd4c820eb2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4791065 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com>
Charlie Lao 22438ad8 2023-08-02T14:01:45 Embed ActiveVariable into BufferVariable and ShaderVariableBuffer This CL embeds ActiveVariable into BufferVariable and ShaderVariableBuffer struct instead of subclass. This allows us to remove the virtual function of ~ActiveVariable(), which means ActiveVariable is a simple struct with basic types and memcpy can be used for load/save. Thus, in this CL, I also moved activeVariables to LinkedUniform::mFixedSizeData structure and let memcpy handle the load/save. Bug: b/275102061 Change-Id: I8d21080cfdd72d4d22cef927d136ca428d9b12e4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4722265 Reviewed-by: Roman Lavrov <romanl@google.com> Commit-Queue: Charlie Lao <cclao@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi c1ba8e6f 2023-06-20T16:03:20 Vulkan: Flatten shader interface variable maps This change removes duplicate entries added in the shader shader interface variable maps. One level of arrayness (indexed by shader type) is removed from these maps as now there is only a single entry per linked resource/etc. Bug: angleproject:7220 Change-Id: Ibf2d06a0e1f68e68797c2066f36e14cb9e667f77 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4628677 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 24f4007b 2023-06-08T00:41:55 Vulkan: Use SPIR-V ids instead of names in the transformer This change removes the SPIR-V transformer's reliance on type and variable names. As a result: - String hashing is removed from the info map data structure and the SPIR-V transformer - The ID discovery class is entirely removed - Internal variable names have become a detail of the compiler alone (and are no longer exposed as part of the compiler interface) - Some front-end name tracking is removed ("parentStructMappedName", etc) This change also properly cleans up xfb emulation types that were previously left over. This change allows the SPIR-V compiler to emit user strings as-is instead of prefixing them with `u_` leading to more readable debug shaders. Additionally, it will make it possible not to emit debug info at all. Both of these changes will be done in follow ups. Bug: angleproject:7220 Change-Id: Iaa127496209a27aaae2e0d14c41b22fffb0b72a2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4600610 Reviewed-by: Roman Lavrov <romanl@google.com> Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Alexey Knyazev 73f9cf00 2023-03-31T00:00:00 GL: Implement polygon mode extensions * Implemented polygon mode extensions on the OpenGL backend * Supported capture and serialization of the new commands and state * Added PolygonModeTest end2end tests Bug: angleproject:1791 Bug: angleproject:8132 Change-Id: I3bc08546a02f110dd739950129bee25ccc507bf6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4492683 Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Alexey Knyazev e809e7bd 2023-03-13T00:00:00 Reland "Implement EXT_depth_clamp" This is a reland of commit f8c1418319ac2aef4b3101e322005b1d0f73120f Host GPU bugs are observable in iOS Simulator Original change's description: > Implement EXT_depth_clamp > > * Added depthClamp to the RasterizerState > * Added DepthWriteTest end2end tests covering > both clipped and clamped depth writes > > Capture > * Updated serialized rasterizer state > * Updated CaptureMidExecutionSetup > > OpenGL > * Requires GL 3.2 or ARB_depth_clamp > on desktop contexts > * Maps to EXT_depth_clamp on ES > > D3D11 > * Maps to the opposite of > D3D11_RASTERIZER_DESC.DepthClipEnable > * The new tests uncover several edge cases where > a workaround is needed to implement unextended > OpenGL semantics on top of D3D > > Metal > * Maps to the setDepthClipMode command > > Bug: angleproject:8047 > Bug: angleproject:8077 > Change-Id: I1b3448e5b84443e4be18af9bc22d2f8495ac8267 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4347753 > Reviewed-by: Geoff Lang <geofflang@chromium.org> > Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com> Bug: angleproject:8047 Bug: angleproject:8077 Change-Id: I8c5f8304276c97c51b2c3382cd2764592ee0c3fe Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4349938 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Yuxin Hu 4a77b0f5 2023-03-18T00:16:24 Revert "Implement EXT_depth_clamp" This reverts commit f8c1418319ac2aef4b3101e322005b1d0f73120f. Reason for revert: This change breaks angle_end2end_tests on Metal backend: https://ci.chromium.org/ui/p/chromium/builders/ci/ios-angle-intel/26035/overview Original change's description: > Implement EXT_depth_clamp > > * Added depthClamp to the RasterizerState > * Added DepthWriteTest end2end tests covering > both clipped and clamped depth writes > > Capture > * Updated serialized rasterizer state > * Updated CaptureMidExecutionSetup > > OpenGL > * Requires GL 3.2 or ARB_depth_clamp > on desktop contexts > * Maps to EXT_depth_clamp on ES > > D3D11 > * Maps to the opposite of > D3D11_RASTERIZER_DESC.DepthClipEnable > * The new tests uncover several edge cases where > a workaround is needed to implement unextended > OpenGL semantics on top of D3D > > Metal > * Maps to the setDepthClipMode command > > Bug: angleproject:8047 > Bug: angleproject:8077 > Change-Id: I1b3448e5b84443e4be18af9bc22d2f8495ac8267 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4347753 > Reviewed-by: Geoff Lang <geofflang@chromium.org> > Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com> Bug: angleproject:8047 Bug: angleproject:8077 Change-Id: I829add68c006c72b7b4acf03aee3efa8a9a16fac No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4350876 Reviewed-by: Alexis Hétu <sugoi@google.com> Reviewed-by: Yuxin Hu <yuxinhu@google.com> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Commit-Queue: Yuxin Hu <yuxinhu@google.com>
Alexey Knyazev f8c14183 2023-03-13T00:00:00 Implement EXT_depth_clamp * Added depthClamp to the RasterizerState * Added DepthWriteTest end2end tests covering both clipped and clamped depth writes Capture * Updated serialized rasterizer state * Updated CaptureMidExecutionSetup OpenGL * Requires GL 3.2 or ARB_depth_clamp on desktop contexts * Maps to EXT_depth_clamp on ES D3D11 * Maps to the opposite of D3D11_RASTERIZER_DESC.DepthClipEnable * The new tests uncover several edge cases where a workaround is needed to implement unextended OpenGL semantics on top of D3D Metal * Maps to the setDepthClipMode command Bug: angleproject:8047 Bug: angleproject:8077 Change-Id: I1b3448e5b84443e4be18af9bc22d2f8495ac8267 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4347753 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Alexey Knyazev bf5e9dbc 2023-03-09T00:00:00 GL: Reset clip origin before scissored clears Clip origin must not affect scissor box but some drivers flip it for clear operations. Added capture/replay support for ClipControl. Bug: angleproject:8066 Change-Id: I9292cb4945b49c56c80da4c5813e89df3453b6b6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4328267 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Gert Wollny bd08c309 2023-02-20T08:17:31 Capture/Replay: Don't serialize shader refcount with context The shader and program reference count is not an OpenGL state, it is only an implementation dependent value and should, therefore, not be part of the context serialization. In fact, it is actually misleading, because for shared contexts its value depends on the state of all contexts and not just the current one. Especially with MEC this may lead to validation errors, because a sequence Context 1 (shared): create program A Context 2: use program A -> start MEC will result in a refcount of "1" when the state of context 1 is serialized during MEC startup, because at this time context 2 already holds a reference. However, when the valiation checkpoint at the end of the setup for context 1 is executed during replay, then the setup for context 2 has not yet been run and the refcount will be "0". Bug: angleproject:8029 Change-Id: Ia7236e5f35634ba1506117abc19efa94b816e572 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4270930 Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Alexey Knyazev ef0fe638 2023-01-16T00:00:00 Implement EXT_polygon_offset_clamp * Added polygonOffsetClamp to the RasterizerState * Adjusted State::setPolygonOffsetParams * Added PolygonOffsetClampTest end2end tests * Added StateChangeTestES3.PolygonOffsetClamp test * Suppressed the affected dEQP test as it has a bug Capture * Updated serialized rasterizer state * Updated CaptureMidExecutionSetup OpenGL * Rely on the EXT extension defined both for desktop and ES contexts * On desktops, might as well use the ARB extension or GL 4.6 once ANGLE supports them D3D11 * Requires FL10_0 or higher * Maps to D3D11_RASTERIZER_DESC.DepthBiasClamp * Drive-by cleanup of extensions init code Vulkan * Requires depthBiasClamp physical device feature * Maps to the depthBiasClamp parameter of the vkCmdSetDepthBias command Metal * Maps to the clamp parameter of the setDepthBias command Bug: angleproject:7957 Change-Id: If6b28df4084f0a81db29f75fb434e75d394c8730 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4169945 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Jamie Madill 4bfb749f 2022-10-10T20:59:48 Capture/Replay: Move shared trace code into src/common. This will let them be accessible to the test harnesses. The trace tests interpreter will need direct access to the classes that we move in this CL. This CL also moves the GLenum utils into the common folder, where they were already used by some other tests. Bug: angleproject:7752 Change-Id: I97ad607938ef29bc316f6d40098478e002ea8128 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3963362 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>