src/tests/gl_tests


Log

Author Commit Date CI Message
SeongHwan Park 16a61bbb 2021-08-05T23:06:22 D3D: Fix not notifying RenderTarget release in TextureD3D This could lead to use-after-free for the RenderTarget object. Bug: chromium:1234829 Change-Id: I73d4547b8f09f2f2cf3f7f8394f7f573fe5a4ef5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3063858 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Charlie Lao c5fa9a44 2021-08-05T15:27:47 Vulkan: Add test for BufferData change is propagated to SSBO properly When BufferData is called while previous reference is still pending, ANGLE may allocate a new storage. When this happened, we need to ensure context gets notified so that it can pick up new buffer storage. Bug: b/195678877 Change-Id: Idb591ed49e7d2c9e2dc5803f65d00894687ae1d3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3076820 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Charlie Lao <cclao@google.com>
Charlie Lao e28fb127 2021-08-05T14:32:16 Vulkan: Propagate BufferData changes to atomic counter binding This CL adds context to the observer list of atomic counter buffer so that it gets notified when BufferData is called on atomic counter buffer and set dirty bit accordingly. Bug: b/195678877 Change-Id: I924cf12ef54b5986d5c56b9e3b71584039490206 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3076170 Commit-Queue: Charlie Lao <cclao@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Charlie Lao 52aae056 2021-08-05T14:22:26 Vulkan: Test for buffer storage propagate to AtomicCounter properly When BufferData call result in storage change, it should propagate the change to atomic counter buffer binding properly. This CL adds a test to call BufferData on the same buffer while the previous usage of buffer is still pending (thus may trigger reallocation of buffer storage) and see if shader reads correct atomic counter buffer data. Bug: b/195678877 Change-Id: Iac94c3bd0a73573da0bfc814d33b5cd43475772d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3076819 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Charlie Lao <cclao@google.com>
Shahbaz Youssefi 09d5047b 2021-08-03T01:31:03 GL: Remove the rewriteVectorScalarArithmetic workaround This workaround was implemented for a bug in Nvidia driver 387 which is end-of-life. More recent driver branches (390 and 4XX) are fixed, and so this workaround is no longer required. The implementation of the workaround itself could introduce bugs. Bug: chromium:772651 Bug: chromium:1201084 Change-Id: I3db179eb90d9124235bdad2daacc712302906d8e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3067952 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org>
SeongHwan Park 215d00b1 2021-08-03T23:34:02 D3D11: Add validation for storages size in updateBufferStorage The source/dest BufferStorage used by the updateBufferStorage may have a raw buffer ptr value of null. Add size validation to prevent null crashes. Bug: angleproject:6235 Change-Id: I57ed1ae0e558bd2f61273c64ed067958a1603425 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3069000 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Brandon Schade 217acac2 2021-07-21T12:42:56 Vulkan: Add support for EXT_primitive_bounding_box 1. Added support for EXT_primitive_bounding_box extension 2. Renamed shader variable gl_BoundingBoxEXT[] to ANGLEBoundingBox[] Bug: angleproject:3576 Test: dEQP-GLES31.functional.primitive_bounding_box.* Change-Id: I15fa9af50c6fd8e86d225670ddd8eb39f6e65d35 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3053618 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi aca9f2e2 2021-07-29T17:49:26 Vulkan: SPIR-V Gen: Fix constructors with uniform parameters When the constructor contains parameters from interface blocks, they may have SPIR-V type specializations that was not previously accounted for. The code is made more robust by retrieving the column/component types when generating constructors through TTypes instead of modifying SpirvTypes directly. Bug was caught by the WebGL CTS. Bug: angleproject:4889 Change-Id: I6c9df17a97fac8622dea55ed67c7bae1ce16d1bd Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3061640 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Jamie Madill 3a6a0e91 2021-08-02T08:01:33 Remove ASSERT in computeRowPitch about row length. Compressed texture image uploads ignore unpack parameters. So it's not an error if these parameters have non-default values. We just ignore them anyway. This ASSERT was causing a crash in some edge cases in debug and dcheck builds. ASSERT introduced in https://crrev.com/c/348064 Bug: chromium:1235031 Change-Id: I1db6ebc9f5572a92ab16bb13da4c236f6fcb8ce2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3064986 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi ae8ef039 2021-07-30T00:43:14 Translator: Correctly respect precision of gl_FragColor/Data These builtins are declared with a mediump precision. However, during translation to Vulkan GLSL, the precision was not output and as such glslang treated them as highp. Discovered through comparison with SPIR-V output from ANGLE which included more RelaxedPrecision operations. Bug: angleproject:4889 Change-Id: I7974478e87ad20115345d679f8f035492be1f349 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3062204 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi ebe943e2 2021-07-29T11:19:33 Vulkan: SPIR-V Gen: Fix gl_Clip/CullDistance These built-ins can be redeclared in the shader. The translator took these redeclarations (and gl_LastFragData) as UserDefined symbols. There were a number of hacks such as in name generation and CollectVariables, to special-case these redeclarations. This change instead makes sure that these variables continue to be considered built-ins with the appropriate qualifiers. A number of fixes are made accordingly: - Hacks are removed. - In fragment shaders, ANGLEClipDistance was initialized with gl_ClipDistance for further use by the shader. The code generation however mistakenly produced `gl_ClipDistance[0] = ANGLEClipDistance[0];`, which caused compilation failures by glslang, but passed the tests accidentally because they expected link failures (see next item). - CollectVariables is fixed to correctly collect gl_Clip/CullDistance in fragment shaders; previously they were collected as output varyings, and therefore the aforementioned link error was not produced in the tests after the compilation error was fixed. Additional fixes: - The transformation of gl_Clip/CullDistance was always ever done on one of them due to misplaced breaks in the loop that detected their presence. - The transformation of gl_CullDistance was skipped when it was not redeclared. Validation is added to make sure these built-ins always have the correct qualifier even when redeclared. SPIR-V gen support for these variables have been fixed as well. Bug: angleproject:4889 Change-Id: Ic8bf2c508357035cb937ef41a28ae22ffc533ebe Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3059921 Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi a83c9108 2021-07-29T17:13:41 Vulkan: SPIR-V Gen: Fix nested ternary operators The OpPhi instruction used to implement ternaries referenced to the blocks pregenerated for the true and false cases. However, if there were other code nested inside that could generate blocks (other ternary expressions or short-circuits), that would be wrong. Instead, the last block id is taken every time the true or false case is entirely visited (similar to how it's done in the short-circuit implementation). Bug was caught by the WebGL CTS. Bug: angleproject:4899 Change-Id: I71be86989dfe9596a13940ce657a7e67849e86bf Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3061639 Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 2b23aae4 2021-07-29T16:39:28 Vulkan: SPIR-V Gen: Support vec(..., mat) Matrices specified in vector constructor arguments were not correctly handled w.r.t to casting (caught by the WebGL CTS). Bug: angleproject:4889 Change-Id: I70253f049a651fc5f439b56d1e4d8f785813b605 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3061638 Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Kenneth Russell aec5e65c 2021-07-28T00:36:12 Get direct-to-Metal backend to run angle_end2end_tests. Cherry-pick nameless struct fix from Apple in https://bugs.webkit.org/show_bug.cgi?id=227482 . Fix SeparateCompoundStructDeclarations pass to stop generating multiple declarations; thanks syoussefi@ for advice. Incorporate additional passes from TranslatorVulkan (MonomorphizeUnsupportedFunctionsInVulkanGLSL, RewriteArrayOfArrayOfOpaqueUniforms, SeparateStructFromUniformDeclarations) needed by RewriteStructSamplers pass in TranslatorMetalDirect. Fixes many assertion failures in GLSL tests. Moved these passes out of tree_ops/vulkan. Thanks again to syoussefi@ for advice and help. Disable a validation check related to the RewritePipelines pass. Skip two tests that were failing for other reasons. With these changes, angle_end2end_tests runs to completion when the direct-to-Metal backend is turned on. There are still ~1300 failures of the ~4000 tests which will be investigated next. Bug: angleproject:5505 Change-Id: Ibca77822543e8e8e8d2a8c862e92cdf74bfa3545 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3058524 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Kenneth Russell <kbr@chromium.org>
Shahbaz Youssefi 96ccf3f4 2021-07-29T12:38:21 Translator: Consolidate EvqFragDepth and EvqFragDepthEXT They were the same thing. Fixes SPIR-V generation which only handled EvqFragDepth. Bug: angleproject:4889 Change-Id: Id2c35f4c5a26e43ad16a420cc0306756a1add082 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3059922 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Peter Kasting 0d06c3cf 2021-07-26T04:30:39 Fix some instances of -Wunused-but-set-variable. Bug: chromium:1203071 Change-Id: I144165ae5ec47aba88658030a6ba3e371bf31ee7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3053616 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 8bf2e5ec 2021-07-23T16:54:16 Vulkan: SPIR-V Gen: Fix switch with default at the end A minor bug was making a switch with default at the end to jump to the merge block instead of the default block. Bug: angleproject:4889 Change-Id: Ied434fab949b10d45a0db1242c1b8535a5f4f773 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3048321 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com>
Shahbaz Youssefi d0c03ff4 2021-07-22T14:55:51 Vulkan: SPIR-V Gen: Fix lvalues passed to in/inout parameters In GLSL, these values are semantically copied when passed to a function as an in or inout parameter. For example in: bool f(inout vec4 a, inout vec4 b) { a = vec4(0); return all(equal(a, b)); } var = vec4(1); bool result = f(var, var); result is expected to be false. In SPIR-V, every parameter is semantically passed by "reference". glslang conservatively uses temporaries to pass to functions. An optimization in ANGLE didn't create temporaries for unindexed lvalues, which did not take into account the above fact. This optimization is limited to out parameters now. Bug: angleproject:4889 Change-Id: Ie1b4b1cecba847ba63d5810d01d0856823b89ddc Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3046103 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 9d23ae62 2021-07-22T12:32:44 Vulkan: SPIR-V Gen: Fix conditionals with pruned blocks Rewored the visitIfElse function to simplify the logic and correctly handle if-else constructs where the true block is pruned. Bug: angleproject:4889 Change-Id: Ib968a2fe65f4b6463158fd76e7d67757115ee832 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3046101 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com>
Shahbaz Youssefi 951b04bb 2021-07-21T12:20:13 Vulkan: SPIR-V Gen: Support scalar constructors In GLSL, the scalar constructor can be given a vector and matrix, in which case the first element is selected. This case was not previously handled. Bug: angleproject:4889 Change-Id: Ibf276883fc7396b750981a4e469ff9b152c6e700 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3042554 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi 7f199d75 2021-07-20T00:11:23 Vulkan: SPIR-V Gen: Support geometry shaders Geometry shader built-ins are implemented. A bug in DeclarePerVertexBlocks is fixed w.r.t to gl_PerVertex arrays and a new AST validation option is added to catch that sort of error. Bug: angleproject:4889 Change-Id: I40b2929e450eac8ae840bbf1a1583e6c4c047c88 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3041623 Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 6e261453 2021-07-20T22:34:33 Vulkan: SPIR-V Gen: Fix I/O block arrays Since the qualifier on intermediate nodes are EvqTemporary, the code that autodeduced the block storage of I/O blocks was incorrectly assigning them std140 when an indexed I/O block array was encountered. This resulted in duplicate types in the SPIR-V. This is generally benign (other than creating an unnecessary type) except for gl_PerVertex as it adds BuiltIn decorations. gl_PerVertex may be an array in geometry and tessellation shaders. Bug: angleproject:4889 Change-Id: Iaa8e414ae01a4be127dc52df0e9406546b23d24c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3041621 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi e9decf0c 2021-07-19T14:29:21 Vulkan: SPIR-V Gen: Support framebuffer fetch Bug: angleproject:4889 Change-Id: Ia75b45b5d0f6cb3b6ca8a8f8a987bb857e45ad33 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3040120 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com>
Shahbaz Youssefi a8807cbf 2021-07-17T00:00:27 Vulkan: SPIR-V Gen: Support interpolateAt* The interpolateAt* builtins take their first argument as a pointer, so only the OpAccessChain result should be given to the corresponding SPIR-V instruction. A test is written in this change to handle interpolateAt* when given a swizzled lvalue, which is not representable in SPIR-V. This can be supported by having the AST transform: interpolateAtX(value.zy) to: interpolateAtX(value).zy which can be done right when the function is parsed and the AST node for it is created (by taking the swizzle out of the parameter and applying it to the node). However, swizzled lvalues as parameter to interpolateAt* is only allowed in desktop GLSL, and so the test is disabled. From the GLSL ES3.2 spec: > Component selection operators (e.g. .xy) may not be used when > specifying interpolant. Bug: angleproject:4889 Change-Id: I043969f22011e6171c7ae225ded3a5013e8cfa4e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3035588 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com>
Shahbaz Youssefi 32196d8f 2021-07-16T14:49:08 Vulkan: SPIR-V Gen: Support built-ins with out parameters Some built-ins have out parameters; modf, frexp, uaddCarry, usubBorrow, umulExtended and imulExtended. In SPIR-V, they are translated as such: - modf and frexp: Returns the same result as GLSL, with a pointer to store the output parameter. Since SPIR-V cannot create pointers to swizzles, a temp variable is used in that case. - uaddCarry, usubBorrow, umulExtended and imulExtended: These return a struct in SPIR-V, which contains the two output parameters; with lsb in field 0 and msb in field 1. Bug: angleproject:4889 Change-Id: Ic5114f74b9c1013093007e91939f78d5218f2a07 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3036088 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com>
Mohan Maiya 5c8bf081 2021-06-08T13:12:24 Vulkan: Add support for YUV internal format extension 1. Add a function to upload YUV image data to textures 2. Modify stageSubresourceUpdate method to account for YUV images 3. Create VkSamplerYcbcrConversion when initializing ImageHelper 4. Update hasImmutableSampler to account for native YUV format support 5. Skip initializeNonZeroMemory for YUV formats Bug: angleproject:5773 Test: Texture2DTestES3.TexStorage2D*Yuv*Vulkan* Change-Id: I270f04bbf903cf2bf19f100eb95f32953d491c39 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2947767 Commit-Queue: Mohan Maiya <m.maiya@samsung.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Tim Van Patten 9ddaa686 2021-07-16T14:57:13 Call getNearestSamples() in Framebuffer::setAttachment() The app jp.garud.ssimulator uses the same sample count of '2' for both glRenderbufferStorageMultisampleEXT() and glFramebufferTexture2DMultisampleEXT(). However, when glRenderbufferStorageMultisampleEXT() is called, Renderbuffer::setStorageMultisample() calls TextureCaps::getNearestSamples() which rounds up the sample count from '2' to '4'. Later, when the app tries to draw with the framebuffer, an error is generated by ANGLE: Framebuffer is incomplete: Attachments have different sample counts. The fix is to also call TextureCaps::getNearestSamples() in Framebuffer::setAttachment() to make sure the sample count passed into glFramebufferTexture2DMultisampleEXT() is also rounded up to match the renderbuffer. Bug: angleproject:6183 Test: MultisampledRenderToTextureTest.FramebufferCompletenessSmallSampleCount Change-Id: I58be9986077257f4767f2e528c2f87e496d9d774 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3036254 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Tim Van Patten <timvp@google.com>
Geoff Lang 232e5236 2021-07-08T15:08:35 Remove the explicit context extension. This extension currently has no known users and doubles the number of entry points that ANGLE exports which is a significant binary size cost. This saves about 130kb of binary size on Android. Bug: chromium:1084580 Change-Id: Ib0fc4930b38a33bd61434f7d0030ba9fb9b93ba7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3015518 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi f4ce6d00 2021-07-15T11:07:25 Vulkan: SPIR-V Gen: Support bool in interface blocks SPIR-V doesn't allow bool in interface blocks. Another type specialization is added for this purpose, turning those bools to uint. Bug: angleproject:4889 Change-Id: I803bffcf5ea58c913d4df6e7aae3386c67901b25 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3032021 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com>
Jamie Madill 48da1c35 2021-07-16T13:24:34 Vulkan: Prefer the local vulkan loader over the system one. Load the Vulkan loader ourselves and give vkGetInstanceProcAddr to volk. This allows us to always prefer loading from the current module directory instead of using the platform-specific ordering. Refactor angle::Library loading to use ModuleDir instead of ApplicationDir. CL originally authored by Geoff Lang. Bug: chromium:1219969 Change-Id: I21d1926e90fd66e1c23cea7323991ae55f3d22d4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3035444 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi 9c6fb52c 2021-07-13T14:10:41 Vulkan: SPIR-V Gen: Assignment between mismatching SPIR-V types In general, GLSL qualifiers translate to SPIR-V decorations on SPIR-V variables. In the case of blocks (struct or interface block), OpMemberDecorate is used, which due to its specification in SPIR-V, can only apply decorations to direct members of a block. This makes it impossible for example to decorate a nested member of a block through its variable id. As such, some decorations such as RowMajor and Invariant apply to members of a block given its _type_ id. Unfortunately SPIR-V requires ArrayStride to also be applied to a type directly, rather than a member of a block. This implies that some types, such as structs used in uniform/buffer interface block, or decorated with invariant or row_major, as well as arrays (of any type) used inside and outside interface blocks to produce different SPIR-V types from the same GLSL type. The SpirvTypeSpec data previously introduced specialize these types. It's necessary to "cast" between these types when needed. The translator handles casts at load/store boundary: - Upon load, the value is cast to the type with the default SpirvTypeSpec. - Upon store, the value is cast from the default to the store target SpirvTypeSpec. - All intermediate results use the default SpirvTypeSpec. Bug: angleproject:4889 Change-Id: I6fa28e518ec6b517ff163f44b6892859eb4b10fd Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3026145 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Yuly Novikov 992a2f70 2021-07-15T14:32:11 Skip DrawRepeatUnalignedVboChange on Mac ARM Metal SimpleStateChangeTest.DrawRepeatUnalignedVboChange/ES2_Metal flaky on Mac FYI arm64 Release (Apple DTK) Bug: angleproject:6171 Change-Id: I9fa8b39e172c6422d9430ab3a0aa8ce9e7558b9f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3032024 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Cody Northrop f46df397 2021-07-14T19:41:03 Vulkan: Suppress VVL errors triggered by external formats Since several tests are hitting these and it may be a VVL bug, moving to ignore rather than skips. Bug: angleproject:6155 Bug: angleproject:6168 Change-Id: I38a5be8d792b8b13a490be895a68349bffe69c6e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3028809 Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Mohan Maiya <m.maiya@samsung.com> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Mohan Maiya e66e3344 2021-07-12T13:28:54 Vulkan: Add GL_ANGLE_yuv_internal_format extension 1. Add a new extension to support creation of immutable textures with sized internal YUV formats 2. Rename YUV format enums from *_ANGLEX to *_ANGLE 3. Move YUV format enums from angleutils.h to glext_angle.h Bug: angleproject:5773 Change-Id: Ibfe732f4c9a4a536be56481f33e4768f6227c212 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2820153 Commit-Queue: Mohan Maiya <m.maiya@samsung.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Mohan Maiya 715a49c7 2021-07-03T08:48:07 Vulkan: Handle incompatible immutable sampler formats If the immutable sampler format of an active texture is not compatible with those supported by the pipeline layout, recreate the pipeline layout. Bug: b/155487768 Bug: angleproject:5033 Bug: angleproject:5773 Test: ImageTest.SourceAHBTarget2DExternalCycleThroughYuvTargetsNoData*Vulkan Change-Id: Iea78e1738ea2fb133a24dc88f5b68daf4cc1bdfe Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2997289 Commit-Queue: Mohan Maiya <m.maiya@samsung.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 07c39616 2021-07-08T17:01:31 Vulkan: SPIR-V Gen: Enable GLSLTest* This change includes an assortment of small fixes to enable most of GLSLTest* end2end tests. - User-defined std140 storage buffers were mistakenly turned to std430. - External and WEBGL samplers were redundantly redeclaring the sampler2D type. - `invariant` specified on a field of struct type didn't apply it to said struct's members. - Arrays of struct as a member of an interface block didn't have their size aligned, producing incorrect stride - Interpolation and auxiliary qualifiers are now generated - Arrays of opaque uniforms are now correctly passed to functions when indexed. - atan(x, y)'s built-in Op is fixed - early_fragment_tests is now generated Additionally, the SPIR-V transformer didn't handle the Invariant decoration applied to gl_PerVertex built-ins, which is possible as a result of: #pragma STDGL invariant(all) This bug existed in the transformer due to two bugs: - ANGLE didn't generate this line when generating GLSL to feed to glslang. This is fixed by this change. - glslang itself ignores this line: https://github.com/KhronosGroup/glslang/issues/2689 Bug: angleproject:4889 Change-Id: I15ad9fcc178abc1eae944e7a58f4e6153fa5dfd9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3016762 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Kenneth Russell 2534ee4c 2021-07-02T12:18:07 Limit the size of declared variables in WebGL shaders. Add an implementation-specific limit for the sizes of variables (specifically arrays, structs, and arrays of structs) in WebGL 1.0 and 2.0 shaders, and interface blocks in WebGL 2.0 shaders, no matter whether they're input, output, or local variables. It is legal in the OpenGL ES and OpenGL ES Shading Language specifications to fail to compile shaders for implementation-specific reasons. Add WebGLCompatibilityTests covering the new limit. Bug: chromium:1220237 Change-Id: I6c1d24a5d9a382ba4454c2dfbb856ab9468f5409 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3023033 Commit-Queue: Kenneth Russell <kbr@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Jason Macnak 7c4404da 2021-07-09T13:37:29 Vulkan: update D/S state in ContextVk::onFramebufferChange ANGLE needs to ensure that the stencil test is correctly handled when framebuffers are cleared before stencil attachments are configured. Adds two stencil tests for clearing fbo before stencil attached which fail before this change and which replicate the behavior of CtsNativeHardwareTestCases's StencilAffectsDrawAcrossContexts. BUG=b/192315789 TEST=newly added tests on Cuttlefish Change-Id: I58d97af97d3f78787051b069d2594041ccd2bfba Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3018486 Commit-Queue: Jason Macnak <natsu@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com>
Jonah Ryan-Davis b202d5cf 2021-07-13T13:34:19 Suppress BlitFramebufferTest.MultisampleDepth on Metal This test is failing on Intel as well, expand the suppression. Bug: chromium:1228433 Bug: angleproject:5505 Change-Id: I98e240897b996d5d8d9a5977ef777f928b25c9dd Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3024591 Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Kyle Piddington d33a2222 2021-04-26T16:56:15 Upstream Apple's direct-to-Metal backend: compile libANGLE. This change is meant to merge the metal backend changes from Apple's direct-to-Metal backend. Taken from Kyle Piddington's CL: https://chromium-review.googlesource.com/c/angle/angle/+/2857366/ The goal of this CL is to merge the metal backend code in a state that compiles, but not to switch the Metal backend over to using the direct-to-metal backend yet. Bug: angleproject:5505 Bug: angleproject:6127 Change-Id: If6783e06e0086b3a1dd25c6f53caca5cfc96cb86 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2950067 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Tim Van Patten a34f668d 2021-07-09T10:55:48 Skip BlitWithDepthUserToDefault for Linux+Intel+OpenGL The test BlitFramebufferANGLETest.BlitWithDepthUserToDefault/ES2_OpenGL is failing on Linux+Intel. This CL skips the test to unblock the vulkan-deps roll into Chromium. Bug: angleproject:6154 Change-Id: I098622ca23b79027e6166d3308c3c41948eca285 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3018109 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Tim Van Patten <timvp@google.com>
Tim Van Patten aa727b78 2021-07-09T11:26:36 Skip ImageTests generating VUID-vkCmdDraw-None-02699 The latest VVL roll is generating VUID-vkCmdDraw-None-02699 on Pixel 4 devices. This CL will skip the failing tests to unblock the roll while the VVL error is investigated. Bug: angleproject:6155 Change-Id: Ie9e21f7df13baa8b9252a3273d1985513404bdfe Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3018114 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Tim Van Patten <timvp@google.com>
Shahbaz Youssefi 81ed8d40 2021-07-02T00:54:25 Vulkan: SPIR-V Gen: Support barrier* built-ins This change enables the ComputeShaderTest suite and additionally includes the following fixes: - OpArrayLength was given the array type instead of variable. - Struct arrays inside interface blocks were not decorated with ArrayStride. Bug: angleproject:4889 Change-Id: Ibae95371bcea10e58c86b8fe1d1e172a18d56a09 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3001908 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi afdf378f 2021-07-01T21:55:58 Vulkan: SPIR-V Gen: Support == and != on complex types In GLSL, == and != produce a bool. In SPIR-V, there are only component-wise comparison operations. For ==, OpAll should be used to reduce it to a single bool, and for !=, OpAny. For matrices, the comparison is done column by column with a similar reduction for each column, and one for the final result. For structs and arrays, the comparison is similarly done field by field or element by element respectively. Bug: angleproject:4889 Change-Id: I8157c1931b7d1dedd74a3825967f5e212d346900 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3001905 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 68d4e392 2021-07-02T14:18:54 Trace Tests: Add option for ASAN builds. ASAN builds can detect OOB memory accesses. This is very useful for diagnosing some kinds of flaky OOB crashes. Removes a test that was calling BufferSubData with a null data argument. This behaviour is undefined and we shouldn't be testing it. Also includes some minor refactorings and script changes. Bug: angleproject:5133 Change-Id: I5a7d9a5500c50a51f6369e944a5f0a533709f00d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3002510 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Gert Wollny <gert.wollny@collabora.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Gert Wollny 4964513a 2021-06-28T20:07:46 ANGLETest: When on WebGL compatibility then use index buffers WebGL actually requires the use of index buffers, otherwise the call is invalid, therefore explicitely request index buffers in the according VertexAttributeOORTest tests. In addition, assert on the indices when the glDrawElements call is captured. With that we can enable VertexAttributeOORTest.* Bug: angleproject:6125 Change-Id: Id3855c78d4c5fcab5599f19dd74ce745d059fb1c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2999523 Commit-Queue: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Gert Wollny 4b464dd4 2021-06-28T14:50:22 tests: Skip WebGL/EnableProgramBinaryExtension with no formats If the extensions is exposed, but the backend doesn't support binary formats, then the part of the tests loading and storing a binary shader are skipped. With that also Capture/Replay of the test is fixed. Bug: angleproject:6112 Change-Id: Iaa25860a9be69207e4dbd6213cf77e75fd87a766 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2993090 Commit-Queue: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Trevor David Black 5d314b59 2021-06-01T03:03:22 Fix undefined behavior associated with Runescape Mobile Bug: b/184287970 Change-Id: I5d3baf5e7a8a20c30e1b787b69597110226521d8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2929352 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
SeongHwan Park 9f256d10 2021-07-07T02:14:13 D3D11: Fix incorrect bounds checking in Blit11 This could lead to blitting depthStencil buffer incorrectly. Bug: angleproject:6140 Change-Id: I2c5786c0375f8e2fefe862da68929340844ce9ae Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3009736 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi cfaaf2ab 2021-06-30T17:23:55 Vulkan: SPIR-V Gen: Fixes to std430 block definition Bug: angleproject:4889 Change-Id: I18feff0916f348c8514cc97ba438d42fc00d0cba Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2999023 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 3b0fcf6a 2021-06-30T15:14:48 Vulkan: SPIR-V Gen: Support type casts in constructors GLSL basic, vector and matrix constructors can convert between types. This was already done for constants used in constructors. This change implements the cast for non-constant expressions. Bug: angleproject:4889 Change-Id: I0a8c1a6e97ffced0d1652032a41fb87c70be16ca Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2999022 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 0461d8d4 2021-06-23T23:20:33 Vulkan: SPIR-V Gen: texture and image built-ins GLSL contains a large number of built-in texture* and image* functions, but these map to only a handful of SPIR-V instructions. The bulk of the work to map these is to extract the arguments from the built-ins based on their ordinal position. Bug: angleproject:4889 Change-Id: I760d986bd9171ddde35f9f046c549ca53252df17 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2992980 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Jamie Madill d665593b 2021-07-05T15:02:11 Update TextureState::getEnabledLevelCount. Instead of simply returning a count of all non-empty texture desc levels, we iterate the levels from the base level and return the count of levels that make a consistent mip chain. This will fix edge cases where Textures are defined sequentially with inconsistent mip levels, but valid rendering states. Bug: angleproject:4780 Change-Id: Id3ebf2d7ad706070896cb5cdf2a311dba2c88949 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3007135 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Peter Kasting 1bffabe8 2021-06-29T18:13:39 Fix -Wunreachable-code-aggressive. Bug: chromium:1066980 Change-Id: I1fa08a40dbf223d60a10681af33ca8a29b12bf8b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2991094 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi dc59772e 2021-06-22T22:37:26 Vulkan: SPIR-V Gen: Support switch With the infrastructure to support this in place, switch is simply implemented as a conditional with multiple blocks. Each block either ends with a branch to the merge block or the next block, implementing fallthrough. Bug: angleproject:4889 Change-Id: I5831531d918ac06648cced7707d1d48ffeb6b1b0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2983559 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi a8c9cecf 2021-06-12T00:12:34 Vulkan: SPIR-V Gen: Support break and continue This is simply done by issuing a branch to the merge or continue blocks respectively. Bug: angleproject:4889 Change-Id: I3e96a3b0f1a0533aa4eac519ab64a87600c0983b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2957810 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Mohan Maiya e2881e25 2021-06-27T10:45:41 Vulkan: Handle incompatible pipeline layouts It is necessary that a pipeline layout be compatible with active textures. Make sure to recreate the pipeline layout otherwise. Bug: b/155487768 Bug: angleproject:5033 Bug: angleproject:5773 Test: ImageTest.SourceAHBTarget2DExternalCycleThroughRgbAndYuvTargets*Vulkan Change-Id: Iab371a9035b6cd143585e5000e2e68c7302ef447 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2992056 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 153240b2 2021-06-11T16:36:32 Vulkan: SPIR-V Gen: Support loops Loops are similar to if-else in that they generate a number of blocks where the first block specifies divergence (OpLoopMerge) and the merge block. Differently from if-else, there is a block where the condition is evaluated and a block which `continue;` leads to (this last block is the only one allowed to back-jump to the beginning of the loop). Bug: angleproject:4889 Change-Id: Ic59f4bf3e05fbf93cb5af85acd3bc4b0da8412af Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2957809 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com>
Gert Wollny f8d2c429 2021-06-24T11:22:59 Capture/Replay: Add test to capture an uninitialized buffer Handle the serialization in case the buffer is not yet set up. Bug: angleproject:6093 Change-Id: I06a8e15d181c4ec514a334f952ce29a4026970a6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2982549 Commit-Queue: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Peter Kasting 5fc3fa9a 2021-06-25T10:18:06 Fix -Wimplicit-int-float-conversions. Bug: chromium:989932 Change-Id: Id7a49a4bd925508ea0362d1e6b9d853bf860ddb9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2987733 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Jamie Madill bd797f75 2021-06-14T11:27:27 D3D11: Fix OOB write in Blit11. This could happen for specific values of the 'dest' target. Bug: chromium:1219082 Change-Id: Ic19a5dc4a95531f9513403ad9c97a4b4c5dc5a6f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2961070 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi 7d023dac 2021-06-10T00:13:41 Vulkan: SPIR-V Gen: Basic support for fragment shaders Fragment shader built-ins are implemented in this change and direct SPIR-V generation for fragment shaders is enabled. Bug: angleproject:4889 Change-Id: I6f92a5585f242122a81c97a9b1aa2763009161a0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2951625 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi 4375d6c7 2021-06-18T23:51:23 Vulkan: Support multiview queries When using queries with multiview, Vulkan specifies that N queries are actually produced (N being the number of views) which must be summed by the application. Bug: angleproject:6048 Change-Id: I5ea615536f1a357806b7ea8093280b9122f1d66a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2971562 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com>
Shahbaz Youssefi 977a28f3 2021-06-22T12:30:07 No-op glGenerateMipmap on zero-sized textures The spec says: > Otherwise, ... if any dimension is zero, all mipmap levels are left > unchanged. This is not an error. Bug: chromium:1220250 Change-Id: I45e007c1f8e9b80f405d3d096eb896a7246f7c8e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2979853 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Shahbaz Youssefi 5b314268 2021-06-15T17:37:45 Vulkan: Support OVR_multiview and OVR_multiview2 Multiview is supported in Vulkan simply by specifying the number of views in the render pass, and creating the appropriate image views. A number of changes to the way image views and render targets are stored are made to support those that don't cover the entire range of layers. One particular detail that is not implemented in this change is the use of queries in combination with multiview. Vulkan specifies that N queries are actually produced (N being the number of views) which must be summed by the application, but this is not currently done. Bug: angleproject:6048 Change-Id: I1d4a9894c232d3a93d7a97c9fa0eedc334e57469 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2967625 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com>
Gert Wollny 13ac4dfb 2021-06-23T12:19:40 gl_tests:DrawArraysThenDrawElements: glFinish instead of swap Later in the test we read from the backbuffer to confirm that the triangles were drawn correctly, but without EGL_BUFFER_PRESERVED the content of the backbuffer is undefined. Since glReadBuffer is not supported in GLES2 don't swap, instead to a glFinish to force the drawing in each iteration. Bug: angleproject:6088 Change-Id: Iac485cc6ec92626a74a4428bcdb32cc535a2691f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2982112 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Gert Wollny <gert.wollny@collabora.com>
Shahbaz Youssefi b6adeb2f 2021-06-21T11:11:30 Vulkan: Use pipeline statistics query to emulate primitives generated The VK_QUERY_PIPELINE_STATISTIC_CLIPPING_INVOCATIONS_BIT query produces the same result as the GL primitives generated query. One caveat is that in combination with rasterizer discard this query may not work. This is emulated by disabling rasterizer discard when this query is active and applying an empty scissor instead. When VK_EXT_primitives_generated_query is released and supported, a similar issue with rasterizer discard persists so this change will facilitate using that extension as well. Bug: angleproject:5430 Change-Id: Id45b6f058c5cb6837e04aa64b1efde28c104e4cf Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2976181 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com>
Alexey Knyazev dbfc119a 2021-06-22T08:56:33 Fix overflow in gl::ValidateES2TexImageParametersBase Bug: chromium:1222516 Change-Id: I532dc6e1c80c442af2c35d1facc262c48222def3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2978251 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Shahbaz Youssefi 3d37a374 2021-06-22T00:37:22 Add regression test for GL bug w.r.t cached programs Bug: angleproject:6073 Change-Id: I22ffabea8a686e2ae615e99607cb557324c23c78 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2976185 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Xiaoxuan Liu 96dd515a 2021-03-31T14:21:16 Update glColorspace(EGL_KHR_gl_colorspace) enable logic 1. Enable glColorspace if VK_EXT_swapchain_colorspace is supported, remove dependency on VK_KHR_image_format_list. 2. Enable VK_KHR_image_format_list support on Mali GPU. 3. Fix PbufferTest.ClearAndBindTexImageSrgbSkipDecode test tolerance issue. Bug: angleproject:2514 Bug: angleproject:5281 Change-Id: I2ed54a14afc7c3aee5a5980bd300ab052ebab3d1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2793852 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi c51c59c7 2021-06-15T13:43:50 Test for missing index dirty bit bug Bug fixed in https://chromium-review.googlesource.com/c/angle/angle/+/2961690 triggers only in the following situation: - Context 1: draw indexed -> clears index dirty bit - Context 1: change state in such a way that closing the render pass is deferred to dirty bit handling (for example, change FBO) - Context 1: issue a non-indexed draw call. This closes the render pass and starts a new one -> bug was that the index dirty bit was not set - Context 2: flush the command buffer, which submits the previous render pass of context 1 (which contained vkCmdBindIndexBuffer). The primary command buffer is now reset. - Context 1: issue an indexed draw call. Since the index dirty bit was not set, this was missing the vkCmdBindIndexBuffer call. This change implements a regression test based on the above scenario. Bug: chromium:1183068 Bug: chromium:1190493 Change-Id: I729bd48cd6df2621ca763f6231023a52ac08b0fb Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2963836 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 3f9dcb00 2021-06-12T01:37:32 Translator: Prune trivial dead code Code after discard, return, break and continue is discarded with this change. This simplifies SPIR-V generation as no code is allowed after a branch instruction and no special handling is necessary after this change. Bug: angleproject:4889 Change-Id: Ife9c8de8a6d0db9d682561daf44366aad9b1cf61 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2957811 Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Gert Wollny eb882040 2021-06-08T11:17:59 test/ImageTest: Clear back buffer when test cleanup Many tests don't actually use the back buffer, so uninitialized data is used when capturing leading to failure. Hence, clear the back buffer when the test ends and before swap is called triggering the capture. Bug: angleproject:6035 Change-Id: I0a500ae9f5203feaf0b492dc18e84c5a92ee1497 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2944953 Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Gert Wollny <gert.wollny@collabora.com>
Shahbaz Youssefi d769742c 2021-06-03T19:43:58 Vulkan: SPIR-V Gen: Default uniforms Default uniforms are gathered in a uniform block, so treat them like other nameless uniform block fields. Bug: angleproject:4889 Change-Id: If340040ab4c59f3243c40de7daba530b2289e147 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2939333 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Peter Kasting 19209666 2021-06-09T07:55:04 Fix -Wc++11-narrowing in ANGLE. This adds a few explicit casts where necessary and changes some double constants to floats to avoid truncation. Bug: chromium:1216696 Change-Id: Ie1a3ad94284185fb20a6feff75290cabb7ee09e8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2950320 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi ac2fc259 2021-06-03T17:11:14 Vulkan: SPIR-V Gen: Support function forward declaration The generation of function-related ids is moved to visitFunctionPrototype to support forward declarations. The DeferGlobalInitializers AST transformation produces such code. Bug: angleproject:4889 Change-Id: Iefee534575092ca25ff86e416e35703d7022bc07 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2939332 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi 013613ea 2021-06-08T01:33:30 Translator: Allow invariant on I/O block members The GLSL ES 3.2 spec says: > Only variables output from a shader can be candidates for invariance. And: > All uses of invariant must be at global scope or on block members, and > before any use of the variables being declared as invariant. As a result, it's possible to specify `invariant` on a member of an output I/O block. Bug: angleproject:4889 Change-Id: I8822ed214813db8424d6a67dfef7f069a448b19d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2946115 Reviewed-by: Ian Elliott <ianelliott@google.com> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 0c26ff11 2021-06-03T17:09:22 Vulkan: SPIR-V Gen: Support initializers in declarations If the initializer is a constant, it's specified directly in the OpVariable instruction. Otherwise an OpStore is generated where the declaration is visited. Bug: angleproject:4889 Change-Id: I79291552ecc50c0878f921aff9f6d8618be34116 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2939331 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi 6746e5dd 2021-06-01T22:48:14 Vulkan: SPIR-V Gen: Basic support for compute shaders This change enables direct SPIR-V generation for compute shaders and enables a few tests. A handful of built-in functions are translated to support said tests. Bug: angleproject:4889 Change-Id: I8fd6dc50ff31559a738ba680a993fb197e29fcf9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2939330 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com>
Shahbaz Youssefi ee4a5266 2021-06-01T14:57:24 Vulkan: SPIR-V Gen: Function calls This change implements function calls. As a result, transform feedback tests are enabled as well as support for transform feedback emulation (which contains functions and if blocks). `const` and opaque uniform function arguments take intermediate values, while the rest take memory objects. If the argument being passed is an unindexed lvalue, it can be directly given to the function. Otherwise a temporary variable is made which is initialized by the parameter if necessary (in and inout parameters) and later overwrites the parameter if necessary (out and inout parameters). Bug: angleproject:4889 Change-Id: I8976cdd17870c35d5a2daeed3c38de57ada931d9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2930363 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 052713da 2021-06-07T12:25:53 Lift OpenGL Win/Intel test expectation. This was fixed in a prior patch. Bug: angleproject:5444 Change-Id: I6df4b71b8dabd66eb151d94d757f89d88a864dab Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2939468 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 1b680b77 2021-06-02T22:04:45 Reland "Make SH_CLAMP_INDIRECT_ARRAY_BOUNDS do proper AST transformation" This is a reland of a474fd7de769ae817db83490d410510cdbed75b2 The integer clamp used in this transformation is not available in es100 shaders, and float clamp is used instead. Original change's description: > Make SH_CLAMP_INDIRECT_ARRAY_BOUNDS do proper AST transformation > > This translator flag adds a clamp to non-literal indices to arrays. Two > strategies were provisioned, using the clamp intrinsic or a hand-written > function. The latter is ununsed in angle, chromium, firefox and > webkit, so this change removes this option and uses the clamp intrinsic > unconditionally. > > The clamp itself was added at output generation time with special flags > set on the index node. This is changed such that a proper AST > transformation is done and no-special handling would be necessary. > > Bug: angleproject:4361 > Bug: angleproject:4889 > Change-Id: Ieccfd2c1c347563fb5282e9fa66d39304e62f2ca > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2935041 > Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> > Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Bug: angleproject:4361 Bug: angleproject:4889 Change-Id: I9397ec7e6bdfb706c2a891b33fd3b2b79e883ccc Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2940902 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Mohan Maiya 26a54260 2021-05-26T16:53:29 Reland "Vulkan: Handle immutable sampler state change in TextureVk" This is a reland of 349c08300e08bc809c448d62e0ad969ecb17c047 Skip YUV tests on Pixel2 Original change's description: > Vulkan: Handle immutable sampler state change in TextureVk > > Transitioning between sources in RGB and YUV colorspace or between > YUV formats with different layout should force the recreation of > pipeline layout and the invalidation of texture's sampler. > > Only textures that are EGLImage targets are handled for now. > > Bug: b/155487768 > Bug: angleproject:5033 > Bug: angleproject:5773 > Test: ImageTest.SourceAHBTarget2DExternalCycleThrough*Vulkan > Change-Id: I02d5763e7f89b910313e14b57bfc5403113dfbb2 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2924415 > Reviewed-by: Jamie Madill <jmadill@chromium.org> > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> > Commit-Queue: Mohan Maiya <m.maiya@samsung.com> Bug: b/155487768 Bug: angleproject:5033 Bug: angleproject:5773 Change-Id: Ie3791bc6f6e9b53eb0db23759a14fdc038c8f5b6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2939354 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Sunny Sachanandani 03d8e7c9 2021-06-04T21:22:52 Revert "Vulkan: Handle immutable sampler state change in TextureVk" This reverts commit 349c08300e08bc809c448d62e0ad969ecb17c047. Reason for revert: anglebug.com/6028 Original change's description: > Vulkan: Handle immutable sampler state change in TextureVk > > Transitioning between sources in RGB and YUV colorspace or between > YUV formats with different layout should force the recreation of > pipeline layout and the invalidation of texture's sampler. > > Only textures that are EGLImage targets are handled for now. > > Bug: b/155487768 > Bug: angleproject:5033 > Bug: angleproject:5773 > Test: ImageTest.SourceAHBTarget2DExternalCycleThrough*Vulkan > Change-Id: I02d5763e7f89b910313e14b57bfc5403113dfbb2 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2924415 > Reviewed-by: Jamie Madill <jmadill@chromium.org> > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> > Commit-Queue: Mohan Maiya <m.maiya@samsung.com> Bug: b/155487768 Bug: angleproject:5033 Bug: angleproject:5773 Bug: angleproject:6028 Change-Id: Ib8b3b54ff61f26910df2af4a6b894b3d2d5906bb No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2941547 Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Commit-Queue: Sunny Sachanandani <sunnyps@chromium.org>
Mohan Maiya 349c0830 2021-05-26T16:53:29 Vulkan: Handle immutable sampler state change in TextureVk Transitioning between sources in RGB and YUV colorspace or between YUV formats with different layout should force the recreation of pipeline layout and the invalidation of texture's sampler. Only textures that are EGLImage targets are handled for now. Bug: b/155487768 Bug: angleproject:5033 Bug: angleproject:5773 Test: ImageTest.SourceAHBTarget2DExternalCycleThrough*Vulkan Change-Id: I02d5763e7f89b910313e14b57bfc5403113dfbb2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2924415 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Jamie Madill cf853b30 2021-06-03T13:54:44 Add missing buffer validation to BeginTransformFeedback. A change to Vulkan exposed this missing validation. In the Vulkan back-end we do some caching on BeginXFB, which would perform an invalid memory access. Adding the missing validation correctly traps the error before we reach the back-end. Bug: chromium:1171685 Bug: angleproject:4622 Change-Id: I5c92575a07149e431c4f260a4555ff196822c64e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2937022 Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi be873929 2021-05-26T21:55:50 Vulkan: SPIR-V Gen: Handle constants and constructors This change translates constants and constructors (minus type casting). With this change, shaders such as gl_Position = vec4(aposition, 0, 1); are translated correctly. Bug: angleproject:4889 Change-Id: I4463717cf880c6d05db179b98691d5cabc1a2d7c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2920192 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com>
Shahbaz Youssefi aa2626f9 2021-05-21T15:24:55 Vulkan: SPIR-V Gen: Handle load/store access chain This change implements a key instruction of SPIR-V, OpAccessChain. Inspired by glslang's implementation, a class is added (AccessChain) that tracks "indices" into a base value. These indices could select a field of a block, an element of an array, a column of a matrix, or a component of a vector. Nuances (such as multi-component swizzle as an lvalue not representable in SPIR-V) and optimizations (such as all-literal indices to an rvalue) that are implemented in glslang have also been implemented in this change. As a result, this change implements all manners of loads and stores (with the exception of this gotcha: https://github.com/KhronosGroup/glslang/issues/2637). The change uses this feature to translate the basic shader which does `gl_Position = positionAttr;` (by implementing EOpAssign), and enables a test that uses this shader. Bug: angleproject:4889 Change-Id: I22dbe5b169ce499eaac657902164aca3b0ebc193 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2911880 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com>
Shahbaz Youssefi bcb678a5 2021-05-27T16:50:55 Vulkan: Fix deferred clears vs 3D textures Two bugs are fixed in this change. One is that framebuffer attachments to 3D textures should not attempt to defer clears. The clear staged for the 3D texture applies to all slices, not just the slice the framebuffer is attached to (and that would get cleared through deferred clears). Secondly, when clearing an attachment to a 3D texture, the clear must be applied immediately through a render pass loadOp to affect only the slice that's attached. This was already handled for layered framebuffers where the clear was applied immediately if the 3D texture render target had more layers than the framebuffer. The condition for this is generalized to check whether the 3D texture has more slices (regardless of whether the render target is layered or not). Test is based on one written by Austin Eng <enga@chromium.org> Bug: angleproject:5967 Change-Id: I43cf5fc24673323eda8390021641e2238be6e375 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2923785 Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 778a4ed9 2021-06-01T22:51:24 Re-enable atomic counter tests on Vulkan/Windows Since --bot-mode, the situation that prevented these tests from working is no longer possible. Bug: angleproject:3738 Change-Id: I9ef8af8ebd204cb490e3907ca621eb30bb829532 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2931757 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Ian Elliott f7843da2 2021-05-27T16:41:51 Create tests for GL_EXT_shader_framebuffer_fetch extension This CL refactors most of the existing tests for the GL_EXT_shader_framebuffer_fetch_non_coherent extension, sharing shader and test code with new tests for the coherent extension. Bug: b/188095445 Change-Id: I23eac5dae9055f1c8f9eeb9c33429fd1091e68fb Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2923323 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Ian Elliott <ianelliott@google.com>
Geoff Lang f410e81a 2021-04-20T14:26:54 GL: Implement multisampled_render_to_texture Bug: angleproject:2894, angleproject:5988 Change-Id: I17b55f0655d32d9f41cb55a0467b93a00fba751b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2841084 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Charlie Lao a280c671 2021-05-24T19:05:44 Vulkan: Move framebuffer dirty bits handling after texture When texture changes, it notify the observer. Framebuffer object is one of the observer and is able to respond to the changes in texture object. In this specific case, when texture called TextureVk::releaseImage and requires framebuffer object to syncState and call TextureVk::initRenderTargets. The problem right now is that framebuffer object's dirty bits are processed before texture, which means if the texture is being used by currently bound framebuffer object, it will not trigger the FBO's dirty bit handling. This CL moves container object dirty bit (DIRTY_OBJECT_DRAW_FRAMEBUFFER and DIRTY_OBJECT_READ_FRAMEBUFFER) after texture/image object's dirty bits. Bug: chromium:1212206 Bug: chromium:1197431 Change-Id: I95723da1ce5b8936d66692242f2e25e7a73bafe6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2915764 Commit-Queue: Charlie Lao <cclao@google.com> Reviewed-by: Ian Elliott <ianelliott@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Charlie Lao ecf2956d 2021-05-24T10:57:40 Vulkan: Convert web_gl.fuzz545ImmutableTexRenderFeedback to gl_test Bug: chromium:1212206 Change-Id: I4b87906a9e877da12d64e39bfe54b9b7cec409a9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2912928 Reviewed-by: Ian Elliott <ianelliott@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Charlie Lao <cclao@google.com>
Shahbaz Youssefi 7761ed1d 2021-05-11T22:55:15 Add test for Vulkan crash with texture MAX_LEVEL change Bug: chromium:1197431 Change-Id: I05fba78b32a7c5d5f1da0435084f96c510b15ed5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2889600 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Mohan Maiya 81db1a46 2021-05-20T13:45:26 Vulkan: TextureVk inherits a few attributes from ImageHelper Cache VkImageCreateFlags in ImageHelper. This allows texture target siblings to inherit a few VkImage create attributes thus avoiding image respecification in certain code paths. Bug: angleproject:2514 Bug: angleproject:5281 Test: PbufferTest.ClearAndBindTexImageSrgbSkipDecode*Vulkan Change-Id: Ic7397fabdce185264e06488355ca47f809338519 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2910473 Commit-Queue: Mohan Maiya <m.maiya@samsung.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Mohan Maiya e697e379 2021-03-10T23:59:45 Vulkan: Allow certain usecases to have non-zero stride When glVertexAttribPointer is called with a type parameter that doesn't match the vertex attribute binding's type in shader, the vulkan backend used to force the stride to 0. This is acceptable since this usecase is unspecified in spec. To allow for better app compatibility, introduce a new extension that requires normal glVertexAttribPointer functionality to be maintained if the mismatched vertex attribute type is a mismatched integer type sign. This change also modifies the VkFormat used when a mismatch in signedness occurs to use a VkFormat with the same component width as the type parameter. Bug: angleproject:5762 Test: VertexAttributeTestES3.DrawWithRelaxedVertexAttributeType* Test: VertexAttributeTestES3.DrawWithMismatchedComponentCount* Change-Id: I7e5281500afc3d77f0775821447cabfad3ff2d66 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2765012 Commit-Queue: Mohan Maiya <m.maiya@samsung.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 26973584 2021-05-20T12:22:46 D3D11: Fix respecifying 3D textures. The missing check for the "Depth" dimension could lead to a bug where we would not recreate a texture when the dimension changed. Bug: chromium:1210414 Change-Id: Id59097ad14ae77ff80d27081f61786dad17a77ea Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2911032 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Cody Northrop 2b8ceb28 2021-05-19T14:08:03 Update skip list for Texture2DTest.TextureSize It is also failing on Linux+Vulkan+TSAN. Bug: angleproject:5982 Change-Id: I742a65ef6076e4f00cc8030cfea46619effaa4d6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2906815 Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Shahbaz Youssefi 8bd3d7d5 2021-05-17T13:45:33 Vulkan: Fix a bug releasing DynamicBuffer-owned buffer There was one instance of BufferVk releasing a buffer it had allocated from a DynamicBuffer. This shouldn't have happened as the DynamicBuffer owns the buffers. Bug: angleproject:5720 Change-Id: I435512f4bb099130126bf3efb48a238fcd9f3ddb Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2896168 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Mohan Maiya <m.maiya@samsung.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>