- 08 Aug, 2019 1 commit
-
-
Ben Clayton authored
Keying off a single size_t is likely to cause collisions, more so when the hash function is simple shift-xors of 3 32-bit integers. Use a proper cache key comparision and a better hash function while we're at it. Bug: b/137649247 Change-Id: I1e0deefb0976102714d43dcb9dcedf6aa809bf7f Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/34909Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Chris Forbes <chrisforbes@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> (cherry picked from commit f046402b) Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/34928
-
- 06 Aug, 2019 1 commit
-
-
Chris Forbes authored
Bug: b/134584057 Change-Id: I1574c9017a5d48f69d14732874a8c8b814056aec Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/34248Tested-by:
Chris Forbes <chrisforbes@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
- 02 Aug, 2019 3 commits
-
-
SwiftShader Regression Bot authored
Change-Id: I62deef5e2db5ccf1794f74f400cfe5d04d24f6a1 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/34648 Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by:
Ben Clayton <bclayton@google.com> Tested-by:
Ben Clayton <bclayton@google.com>
-
Nicolas Capens authored
The last-used sampler routine can be reused when both the image and sampler descriptors are the same. To prevent a match on uninitialized cache keys we previously initialized them both to nullptr (as well as the function pointer itself), at the entry of the shader routine. This change reduces it to just initializing the image descriptor. This suffices since all image instructions use an image descriptor (but not all use a sampler descriptor). Bug: b/137649247 Change-Id: I62112f12a58ddefb6e56bddab8e3fdfa76c5b756 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/34628Tested-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Ben Clayton <bclayton@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by:
Ben Clayton <bclayton@google.com>
-
Sean Risser authored
MakeCurrent no longer generates EGL_BAD_SURFACE when the pbuffers are IOSurfaces. So the documentation has been updated to match. Bug chromium:987289 Change-Id: Id074d9d6d8d0a50c91ec725ec2016a4f5ad4b6e4 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/34568 Presubmit-Ready: Sean Risser <srisser@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Sean Risser <srisser@google.com>
-
- 01 Aug, 2019 3 commits
-
-
Ben Clayton authored
Micro-optimization as discussed here: https://swiftshader-review.googlesource.com/c/SwiftShader/+/34528/7/src/Pipeline/SpirvShader.hpp#1257 Change-Id: I0e71f2b5c882b2e65271a2e8f114239a924462f8 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/34549Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Ben Clayton <bclayton@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
-
Ben Clayton authored
Change-Id: I253abead4412eec7e72148c8680be04c64bd2148 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/34548Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Ben Clayton <bclayton@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
-
Ben Clayton authored
This complements the const-cache in 34348. Timings for the Glass demo running on a i7-4930K: this change: 24.25 FPS this change without 34528: 23.02 FPS parent change (inc 34528): 22.46 FPS Bug: b/137649247 Change-Id: I206cdaabfaf63da7f67e3cd5f6823f3343b823c8 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/34528Tested-by:
Ben Clayton <bclayton@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
- 31 Jul, 2019 1 commit
-
-
Nicolas Capens authored
Re-generated Visual Studio projects using build/cmake.sh. Removed/added changed SPIRV-Tools projects in solution. Bug: swiftshader:132 Bug: b/123642959 Change-Id: I2a9d21a0100882d3db8ffd81d90800f464d7419b Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/34508Tested-by:
Nicolas Capens <nicolascapens@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
- 30 Jul, 2019 6 commits
-
-
Nicolas Capens authored
We previously set this device limit to infinity to avoid having to clamp the sum of the sampler and shader provided bias values to the [-maxSamplerLodBias, maxSamplerLodBias] range. Unfortunately infinity is not supported/allowed by JSON and the android.graphics.cts.VulkanFeaturesTest tests which parse the output of the vkjson tool produce a failure. This change works around it by setting maxSamplerLodBias to a finite value (15, which is very common according to https://vulkan.gpuinfo.org/), and performing the clamping required by Vulkan 1.1.117 section 15.6.7. Fortunately this cost only has to be incurred when an optional Bias operand is used in the SPIR-V image sampling instruction. When an Lod operand is used, which is mutually exclusive with Bias because the former is for explicit-lod instructions and the latter for implicit-lod, no clamping is required because the explicit LOD is not part of this clamping equation and the sampler LOD bias must already be clamped as specified by the spec: "The absolute value of mipLodBias must be less than or equal to VkPhysicalDeviceLimits::maxSamplerLodBias". Bug: b/138670766 Change-Id: Iebd6a1fef1c993ec86ac8cc38f8d9a992ba9bc47 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/34510Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Ben Clayton <bclayton@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
-
Nicolas Capens authored
The MAP_JIT flag is only supported on macOS 10.14 and higher, so mmap() may fail on older ones. Bug: chromium:985816 Change-Id: If0e12d61b7f243d804e0213a43160e7b3db106d3 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/34511Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
Nicolas Capens authored
On macOS 10.14 and higher, executables that are code signed with the "runtime" option cannot execute writable memory by default. They can opt into this capability by specifying the "com.apple.security.cs.allow-jit" code signing entitlement and allocating the region with the MAP_JIT flag. Note this change only affects use of the Subzero backend of Reactor. Bug: chromium:985816 Change-Id: I7ea213cc2b62b64c85c4c46a0d4f28e0bace5d21 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/34509Tested-by:
Nicolas Capens <nicolascapens@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
Ben Clayton authored
Fixes build failures seen here: https://travis-ci.org/paulthomson/build-swiftshader/jobs/565093397 Change-Id: Ie03b1dbbbbbcc586dc4dfc7eba85e0e225012a16 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/34456Reviewed-by:
Paul Thomson <paulthomson@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Tested-by:
Ben Clayton <bclayton@google.com>
-
Nicolas Capens authored
Our copy of glslang is not thread safe, so we need to ensure a mutex is held during GLSL compilation. With shared contexts this was already the case because we lock a mutex belonging to the shared resource manager (through es2::getContext()), but using independent contexts in multiple threads was unsafe. Use of glReleaseShaderCompiler() was also unsafe, even with shared contexts, because no lock was taken. Bug: b/137828018 Change-Id: I90028035868f95c5a121777aee05c2128a2f8180 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/34488 Presubmit-Ready: Nicolas Capens <nicolascapens@google.com> Tested-by:
Nicolas Capens <nicolascapens@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
Ben Clayton authored
The ICD_LIBRARY_PATH variable needs to be double-escaped - once for CMake, and another for the actual .json file. Bug b/116336664 Change-Id: I8fd68c6a030b689e6432828ec5f1cf938c2a0d45 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/34455Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Tested-by:
Ben Clayton <bclayton@google.com>
-
- 29 Jul, 2019 13 commits
-
-
Ben Clayton authored
SpecializationInfo was default copy-constructed / assigned, and held a raw pointer to the copy of the VkSpecializationInfo. This struct was deleted in the destructor, trashing any other copies. Fixes undefined behavior and crashes of a few Vulkan samples. Bug b/123588002 Change-Id: I7adcec2d51bc357ef5bcee1ec6bdafe9ecd208a7 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/34454 Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com> Tested-by:
Ben Clayton <bclayton@google.com>
-
Ben Clayton authored
As these are touched by pixel shaders, this is extraordinarily hot code, and the cost of ref-counting by shared_ptr can really impact performance. As the const cache is updated at well known sync points, the queryConstCache method is safe to return a raw pointer to the routine. Bug: b/137524292 Bug: b/137649247 Change-Id: I2ae1f159467eb27b918344714cef1963f3b24a45 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/34453 Presubmit-Ready: Ben Clayton <bclayton@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com> Tested-by:
Ben Clayton <bclayton@google.com>
-
Sergey Ulanov authored
Previuously Fuchsia-specific memory allocation logic was trying to deal with non-page-aligned address returned from zx_vmar_map(), but it's no longer necessary because zx_vmap_map() is guaranteed to return page-aligned address. Also it was trying to unmap partial pages, but zx_vmar_unmap() now requires that len is page-aligned. This change fixes both issues by removing two redundant zx_vmar_unmap() calls. Also deallocateExecutable() has been updated to pass page-aligned size to zx_vmar_unmap(). This CL resolves test failures in some viz_unittests on Fuchsia. Bug: chromium:961455 Change-Id: Ib53e46af853802679a55dacc8546c3f67a3486c7 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/34409Tested-by:
Sergey Ulanov <sergeyu@chromium.org> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Nicolas Capens authored
Bug: b/137828018 Change-Id: Ia30de6af925213269768e3123d3f4ecf821624fb Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/34468Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Ben Clayton <bclayton@google.com>
-
Ben Clayton authored
This reverts commit 782a9802. Change-Id: I95f145db0a7e5351407402861d68bcb17289c698 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/33818Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Ben Clayton <bclayton@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
-
Ben Clayton authored
* changes: Update SPIRV-Tools to 9559cdbd Squashed 'third_party/SPIRV-Tools/' changes from d14db341b..9559cdbdf Update SPIRV-Headers to e4322e3b Squashed 'third_party/SPIRV-Headers/' changes from 79b6681aa..e4322e3be Temporarily disable warnings-as-errors Kokoro (Windows): Switch to python3
-
Ben Clayton authored
Always use toLLVM() to avoid a compiler warning / error that the function was declared by never used. Fix the arguments passed to the DebugInfo constructor. Change-Id: I1df069c028c9bfcf1f8e7f4221ffffd4f0261069 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/34329 Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Ben Clayton <bclayton@google.com>
-
Ben Clayton authored
VertexRoutineFuzzer.cpp was not updated as part of 6897e9b1. Fixes Chromium roller. Bug: b/137524292 Bug: b/137649247 Change-Id: I494ae1b6af07326013778251852816b5783666c4 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/34451 Presubmit-Ready: Ben Clayton <bclayton@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Ben Clayton <bclayton@google.com>
-
Ben Clayton authored
Commands: git subtree pull --prefix third_party/SPIRV-Tools https://github.com/KhronosGroup/SPIRV-Tools 9559cdbdf011c487f67f89e2d694bd4a18d5c1e0 --squash Bug: b/123642959 Change-Id: I10d6643924eaec8a74490b43ef941bbc63cf1d88
-
Ben Clayton authored
9559cdbdf Fix #2609 - Handle out-of-bounds scalar replacements. (#2767) f54b8653d Limit fuzzer tests so that they take less time to run (#2763) bb0e2f65b Fix check for unreachable blocks in merge-return (#2762) 1a89ac8b2 Transformation and fuzzer pass to add dead continues (#2758) 65f49dfc3 Remove unneeded future imports (#2739) c7fcb8c3b Process OpDecorateId in ADCE (#2761) fb83b6fbb Record correct dominators in merge return (#2760) c9190a54d SSA rewriter: Don't use trivial phis (#2757) aea4e6b1b Fix block depth rule priority (#2755) a94ddc267 Case validation with repeated labels (#2689) 3855447d9 Bindless Instrument: Make init check depend solely on input_init_enabled (#2753) 11516c0b9 Validate storage class OpenCL environment rules for atomics (#2750) bac82f49a Allow LOD ops in compute shaders with derivative group execution modes (#2752) 76b75c40a Document opt::Instruction::InsertBefore methods (#2751) aa9e8f538 Revert "Do not inline OpKill Instructions (#2713)" (#2749) 58e2ec25b For Vulkan, disallow structures containing opaque types (#2546) 230c9e437 Fix bug in merge return (#2734) 1fedf72e5 Allow ray tracing shaders in inst bindle check pass. (#2733) 032adc4d7 Correctly implement WebGPU related flag exclusions (#2737) 92c41ff1e Remove Common Uniform Elimination Pass (#2731) 59de04ad6 BUILD.gn: Add deps and move files for `gn check` (#2735) 55adf4cf7 Update execution scope rules for WebGPU (#2730) 1a2de48a1 Extra small storage validation (#2732) 327963765 Add validation for SPV_EXT_demote_to_helper_invocation (#2707) 508151250 BUILD.gn: Add targets to build all command-line tools (#2727) 5ce8cf781 Change the order branches are simplified in dead branch elim (#2728) cd153db8e Add —preserve-bindings and —preserve-spec-constants (#2693) 86e45efe1 Handle decorations better in some optimizations (#2716) 3a252a267 Update memory scope rules for WebGPU (#2725) 0c4feb643 Remove extra semis (#2717) 456cc598a Validate usage of 8- and 16-bit types with only storage capabilities (#2704) b8ab80843 Shrinker for spirv-fuzz (#2708) 37e8f7994 Perform merge return with single return in loop. (#2714) fe7cc9c61 Do not inline OpKill Instructions (#2713) 5a93e0739 Refactor reducer options (#2709) a6bfc26e5 Fix BUILD.gn for Fuchsia platform build. (#2692) 9702d47c6 Validate that in OpenGL env block variables have Binding (#2685) e6e3e2ccc Update type for loaded builtin GlobalInvocationID in pass instrumentation (#2705) 6ccb52b86 Warn when input facts are invalid. (#2699) 88183041d Got rid of redundant declaration. (#2698) efde68236 Disallow movement of unreachable blocks. (#2700) dfcb5a1e1 Refactor fuzzer transformations (#2694) 888aeef8a Fix Component decoration validation for arrays (#2697) df86bb44f Replace global static map with an array of pairs (#2691) 7c294608c Basic validation for Component decorations (#2679) 69b945992 Add infrastructure for maintaining and using DEPS (#2684) 2b84d25f1 Fix store to uniform Vulkan check (#2688) bec7e0393 Add all accepted target environments to the tools' help texts (#2687) 51b0d5ce5 Represent uniform facts via descriptor set and binding. (#2681) fa981bc24 Roll external/spirv-headers/ 8b911bd2b..de99d4d83 (8 commits) (#2682) a132c9b64 Whitelist SPV_GOOGLE_user_type. (#2673) 001e823b6 Add fuzzer pass to obfuscate constants. (#2671) 2090d7a2d Handle volatile memory semantics in upgrade (#2674) 3d5fb7b90 Validate Volatile memory semantics bit (#2672) 400dbde0b Disallow stores to UBOs (#2651) 6cc2c8f4a Another fix uint -> uint32_t (#2676) 59983a601 Validate variable initializer type (#2668) 9477c91de Fix uint -> uint32_t in fuzz.cpp (#2675) 42830e5a6 Add replayer tool for spirv-fuzz. (#2664) b4bf7bcf0 Add validation for Subgroup builtins (#2637) 9c0830133 Add constant == uniform facts. (#2660) 208d3132e Cast __LINE__ to size_t (#2661) a8ae579f7 Add transformation to replace a boolean constant with a numeric comparison (#2659) 0755d6ce8 Add builtin validation for SPV_NV_shader_sm_builtins (#2656) 43fb2403a Instrument: Fix code for version 2 output format. (#2655) 08cc49ec5 Fix bug in 'split blocks', and add tests for fuzzer. (#2658) d01a3c3b4 Optimizer: Handle array type with OpSpecConstantOp length (#2652) 4a00a80c4 Add fuzzer pass to add dead breaks. (#2654) 620197bd6 Add fuzzer pass that adds useful constructs to a module (#2647) 2c0111e6e Add validation for SPV_EXT_fragment_shader_interlock (#2650) 699e167d7 Remove asserts from GetUnderlyingType (#2646) 7919b877c Close opened file handles. (#2644) f99d7ad5c Validate OpenCL rules for ImageRead and OpImageSampleExplicitLod (#2643) 209ff0ce9 Add spirv-fuzz pass to permute blocks. (#2642) e7866de4b Linker: Better type comparison for OpTypeArray and OpTypeForwardPointer (#2580) 0125b28ed Add compact ids to WebGPU <-> Vulkan transformations (#2639) 3d62cb814 Instrument: Add version 2 of record formats (#2630) 1b71e4533 Add "split block" transformation. (#2633) f05181234 Add WebGPU specific fuzzer for validation (#2628) 5a06fa466 Add fuzzer for Vulkan->WebGPU spirv-opt passes (#2626) 78b2b1866 Add fuzzer for WebGPU->Vulkan spirv-opt passes (#2625) 6c7db9c63 Handle nested breaks from switches. (#2624) 37ae8671a Add spirv-fuzz tool. (#2631) fe9f87013 Add library for spirv-fuzz (#2618) 42abaa099 Remove MarkV and Stats code. (#2576) 3b5ab540c linker: Add tests for various type comparisons (#2613) 4c73ebc46 Enable the base branch to be overridden in the code format check script (#2607) b8fe7211c Allow arrays of out per-primitive builtins for mesh shaders (#2617) 07a101971 Validate OpenCL environment rules for OpImageWrite (#2619) b0504239a Added an external dependency on protobufs, included when SPIRV_BUILD_FUZZER is defined, so that they can be used by the (upcoming) spirv-fuzz tool. Also updated the kokoro build scripts, for relevant targets, to clone an appropriate tag of the protobufs repo, and to pass -DSPIRV_BUILD_FUZZER to the configurations for which we intend to ultimately build spirv-fuzz. (#2616) 4557d0858 Add in individual flags for Vulkan <-> WebGPU passes (#2615) 13f61bf85 Update vloadn and vstoren validation to match the OpenCL Extended Instruction Set Specification (#2599) d9c00e1d2 Add folding rules for OpQuantizeToF16 (#2614) 713da30b6 Disallow merge targeting block with OpLoopMerge (#2610) 60aaafbc7 Allows breaks selection breaks to switches (#2605) 0982f0212 Using the instruction folder to fold OpSpecConstantOp (#2598) 9f035269d Validate OpenCL environment rules for OpTypeImage (#2606) 47741f050 Validate OpenCL memory and addressing model environment rules (#2589) ff4feb44b Validate construct exits (#2459) 9dfd4b835 Bindless Validation: Instrument descriptor-based loads and stores (#2583) 7e7745fce Validate loop merge (#2579) fc7b5d8c6 Mem model spv 1.4 (#2565) 84aa4946e Start SPIRV-Tools v2019.4 ce19e217b Finalize SPIRV-Tools v2019.3 84503583c Handle id overflow in sroa better. (#2582) f815e6fe5 Update CHANGES e935dac9e Make pointers to isomorphic type interchangeable with option. (#2570) 2947e88f7 Update instrumentation passes to handle 1.4 interfaces (#2573) 06ce59b0b Instrument: Fix load type of pre-existing builtin (#2575) 87c4ef8a9 Do not fold floating point if float controls used (#2569) 45fb69666 Use last version (#2578) f6d9a1784 Add pass to fix some invalid unreachable blocks for WebGPU (#2563) 89fe836fe Fix clang-tidy warning about definition/declaration mismatch. (#2571) f2803c4a7 VK_KHR_uniform_buffer_standard_layout validation (#2562) cc3e93c4e Add tests for folding 1.4 selects (#2568) ea5e1b62e Update priv-to-local for SPIR-V 1.4 (#2567) d0a1f5a05 spvtest::Validate::CompileFailure: Don't leak the diagnostic (#2564) b74d92a8c ADCE support for SPIR-V 1.4 entry points (#2561) 2b65a71d4 Fix use of 'is' operator for comparison (#2547) 63f57d95d Support SPIR-V 1.4 (#2550) 106c98d0f Validate sign of int types. (#2549) eef11cdb7 Update README with links to build artifacts. (#2548) 5fc5303ee [spirv] Package and upload builds. (#2544) 6d04da22c Fix up type mismatches. (#2545) c8b09744c Add validation specific to OpExecutionModeId (#2536) a5da68d44 Remove stale comment (#2542) 32af42616 Change implementation of post order CFG traversal (#2543) 64faf6d9c Fix undefined bit shift in sroa. (#2532) dca3ea5e1 fix example.cpp (#2540) 2de3e3c02 Add spirv-lesspipe.sh into SPIRV_SKIP_EXECUTABLES umbrella (https://github.com/KhronosGroup/SPIRV-Tools/issues/2497) (#2504) fb08224f8 Fix spirv-headers link in the README. (#2516) b68af7ca8 Add support for Private & Output to initializer decompose flag (#2537) 736376dbf Remove Acquire, Release, and Relaxed from allowed Mem Sem bits for WebGPU (#2526) 07c4dd4b9 Reduce runtime of array layout checks (#2534) 7aad9653f Remove legacy utility functions (#2530) d754b7059 Shorten names of cmake targets (#2531) ac878fcbd Remove unreachable block validation (#2525) 21712068f Validate that SPIR-V binary is encoded as little endian for WebGPU (#2523) 3aad3e922 Change validation of memory semantics for OpAtomics* in WebGPU (#2519) 048dcd38c Implement WebGPU->Vulkan initializer conversion for 'Function' variables (#2513) 3335c6114 reduce: Add two branch reduction passes (#2507) 102e430a8 Add pass to legalize OpVectorShuffle for WebGPU (#2509) 07ac7dee5 SPIRV-Tools requires python3 (#2510) 98b3f26c2 Gate formatless checks on Vulkan env (#2486) 2b46521cd Add -fsantize to link flags. (#2506) 82ebbbba1 README: fix formatting of requiring Python 'future' (#2500) 9047de51c Accept OpBitCast in fix storage class. (#2505) d90aae9a5 reduce: miscellaneous fixes (#2494) 7ce37d66a Fix use of Logf to avoid format security warning (#2498) 0cb2d4079 Add WebGPU->Vulkan and Vulkan->WebGPU flags in spirv-opt (#2496) 9766b22b3 spirv-opt: Behave a bit better in the face of unknown instructions (#2487) 3a0bc9e72 Add fix storage class code. (#2434) e8c2d95ed Fix webgpu header file name in BUILD.gn (#2493) 26c1b8878 Update CHANGES 236bdc006 Change prioritization of unreachable merge and continue (#2460) 12e4a7b64 Handle variable pointer in some optimizations (#2490) 01964e325 Add pass to generate needed initializers for WebGPU (#2481) 4bd106b08 Handle dead infinite loops in DCE (#2471) 8129cf2f9 Remove merge assert in block calculation (#2489) e2ddb9371 reduce: add remove_selection_reduction_opportunity (#2485) c9874e509 Fix merge return in the face of breaks (#2466) 0300a464a Maintain inst to block mapping in merge return (#2469) 320a7de5c Validate that OpUnreacahble is not statically reachable (#2473) fcb845310 reduce: fix loop to selection pass for loops with combined header/continue block (#2480) 2ff54e34e Handle function decls in Structured CFG analysis (#2474) 42e6f1aa6 Add option to validate after each pass (#2462) fb0753640 reduce: fix loop to selection dominance query (#2477) 7d1b176c1 Improve reducer algorithm and other changes (#2472) ffbecae56 Check OpSampledImage is only passed into valid instructions (#2467) 2d52cbee4 Add some val options to reduce (#2401) 1f60f9896 reduce: remove unreferenced blocks pass (#2398) 08b54d9e4 Convert sampled consumers to being Instructions instead of IDs (#2464) e1a76269b Bindless Validation: Descriptor Initialization Check (#2419) 9244e6ff6 Reverting commit da5a780ff9fff7e226ca84728075adabc4d1608c da5a780ff Variable pointers cannot be an operand to OpArrayLength 2ac348b5c Repair test for unused storage buffer with descriptor (#2436) e54552214 Add --strip-atomic-counter-memory (#2413) bdcb15516 Relax function call parameter check (#2448) 5186ffedb Remove duplicates from list of interface IDs in OpEntryPoint instruction (#2449) 6df8a917a Add validation of storage classes for WebGPU (#2446) a5c06c903 Validator: no Storage comparison for pointer param (#2428) 9d29c37ac Removing decorations when doing constant propagation. (#2444) b75f4362f Add validation for ExecutionMode in WebGPU (#2443) b1ff15f22 Add missing DepthGreater case to Fragment only check (#2440) b12e7338e Implement WebGPU specific CFG validation (#2386) a2ef7be24 Add Linux ASAN bot configs. (#2427) 07f80c4df Fix python scripts to work with python3 (#2426) 86f6ac086 Add a test for two back-edges in a continue (#2418) 5fb83a970 Allow NonWritable to target struct members. (#2420) 32b0f6739 Use correct option in spvTextToBinary. (#2416) d800bbbac Handle back edges better in dead branch elim. (#2417) 002ef361c Add validation for SPV_NV_cooperative_matrix (#2404) fc3897b5f Validate: (data) Block can't appear within a Block (#2410) 37b584a73 Fixed undefined reference to 'clock_gettime' by linking rt library (#2409) a006cbc1d Non memory object as parameters. (#2415) 4c43afcad It is invalid to apply both Restrict and Aliased to the same <id> (#2408) fde69dcd8 Fix OpDot folding of half float vectors. (#2411) 8eddde2e7 Don't change type of input and output var in dead member elim (#2412) 76730a46a In Vulkan, disallow BufferBlock on StorageBuffer variables (#2380) 5994ae2a0 Start SPIRV-Tools 2019.3 61dfd8492 Finalize SPIRV-Tools 2019.2 bf23ed887 OpAtomicLoad, OpAtomicStore, OpAtomicExchange can operate on int or float value. Except for Vulkan environment that only operates on int value. (#2385) 80496f42a Update CHANGES 2f84b5de9 Bindless: Fix computation of set and binding for runtime bounds check (#2384) 528fea2b1 Fixup unused variables (#2402) 4b42cd19d BUILD.gn: Only build tests in Chromium. (#2392) 6d20f6257 Refactor webgpu-mode pass ran tests to be parameterized (#2395) 78ac954c4 Mark type id of unknown instructions at fully used. (#2399) 9540f2d98 Instrumentation: Fix instruction index when multiple functions (#2389) 1b0047f21 Add pass to remove dead members. (#2379) 0167a20b0 Move usage detection to after all instructions are registered (#2378) 0187c190b Fix BUILD.gn (#2381) 354205b3d Don't merge unreachable blocks (#2375) 40a7940e0 Fix merge blocks opportunity to check if still enabled (#2370) 12b3d7e9d Add strip-debug to webgpu-mode passes (#2368) a0ff7c512 Add better error message to ValidateInstructions (#2365) 34c5ac614 Fixes #2358. Added to the reducer the ability to remove a function t… (#2361) 10a7def6c Smoketest should use KhronosGroup glslang (#2363) 39bfb6b97 Make spvParseTargetEnv public (#2362) cf2114613 Expand bindless bounds checking to runtime-sized descriptor arrays (#2316) 9b6ba4d1c Allow arrayed storage images for NonWritable decoration (#2358) 117a1fd11 Validate variable pointer related function call rules (#2270) 0f4bf0720 Add flatten-decorations flag to webgpu-mode flags (#2348) 368567bc5 Convert deprecated GoogleTest fixture to the new version (#2357) adbbe2024 Mention the reducer tool and location in the README. (#2341) e3c64a374 Do not build spirv-reduce on iOS/tvOS/watchOS - it requires std::system which is not available on those platforms (#2355) 37861ac10 Merge blocks in reducer (#2353) 453b7c85c Fix up some test (#2351) 846d12afe Add whitelist for decorations in WebGPU (#2346) 63e032f91 Remove unused lambda capture (#2350) 3b6fee3da Fixes #2338. Added functionality to remove OpPhi instructions (replacing their uses) when merging blocks (#2339) 2acbf488b Add WebGPU specific validation for WorkgroupSize BuiltIn decoration (#2334) e2f462262 Add WebGPU specific validation for multiple BuiltIn decorations (#2333) 3d2afb78c Add whitelist of allowed BuiltIn decorations for WebGPU (#2337) d17fcf8ab Add WebGPU validation for LocalInvocationIndex BuiltIn decoration (#2335) 837153ccd Add WebGPU specific validation for FragDepth BuiltIn decoration (#2332) 0c14583f1 Add WebGPU specific validation for FragCoord BuiltIn decoration (#2331) b6698e0d8 Add WebGPU specific validation for FrontFacing BuiltIn decoration (#2330) 734def144 Add WebGPU specific validation for InstanceIndex BuiltIn decoration (#2329) b947ecfe7 Add WebGPU specific validation for VertexIndex BuiltIn decoration (#2328) 464111eae Remove use of deprecated googletest macro (#2286) 7f1a020ab Fix test_val_limits MSVC build (#2347) 5d6b4c4b1 Move CodeGenerator to be accessible by other validation tests (#2343) cf7834623 Add source/opt/block_merge_util.* to BUILD.gn (#2344) 7f3679a8b Validate NonWritable decoration (#2263) 9ab1c0ddd Remove code sinking for -O. (#2340) 98c67d385 Fixed names in ifdefs and GetName functions that had been forgotten in a previous refactoring. Also shortened names of test files as those files test both the new 'finder' classes introduced in the refactoring, as well as the 'reduction pass' class; the shorter names capture both. (#2336) 3345fe6a9 Extracted block merging functionality into its own utility file (#2325) cf011f990 More layout check fixes (#2315) e2279da71 Remove the static maps from CheckDecorationsCompatibility (#2327) 8915a7c8f spirv-val: Emit an error when an OpSwitch target is not an OpLabel (#2298) 1e3c589a6 Add WebGPU specific validation for Position BuiltIn decoration (#2309) 20b2e2b9f Add SpirvTools::IsValid(). (#2326) 86d0d9be2 Refactored reducer so that the 'finding' functionality of a reduction pass are separated from the generic functionality for tracking progress of a pass. With this change, we now have a ReductionOpportunityFinder abstract class, with many subclasses for each type of reduction, and just one ReductionPass class, which has an associated finder. (#2321) b1be6763f Add helper for 'is Vulkan or WebGPU' (#2324) 3d7102424 Added some documentation about the reducer. (#2318) 4a405eda5 Fix layout checks for nested struct in relaxed layout; and descriptor arrays (#2312) 3a3ad2ec5 Add utility to generate a logging string for a given environment (#2314) a64c651e1 Fix Constants Analyses bug inserted by #2302 (#2306) eab06d669 Check forward reference in OpTypeArray. (#2307) 8df947d2d Handle instructions not in blocks in code sinking. (#2308) git-subtree-dir: third_party/SPIRV-Tools git-subtree-split: 9559cdbdf011c487f67f89e2d694bd4a18d5c1e0
-
Ben Clayton authored
Commands: git subtree pull --prefix third_party/SPIRV-Headers https://github.com/KhronosGroup/SPIRV-Headers e4322e3be589e1ddd44afb20ea842a977c1319b8 --squash Bug: b/123642959 Change-Id: Iec85e0df84b60c9b02299aa2b21bbc874ce684ac
-
Ben Clayton authored
e4322e3be Merge pull request #123 from AaronHaganAMD/master 5bc5041bd Add SPV_KHR_shader_clock to spirv-headers 45c2cc372 Merge pull request #122 from mkinsner/array_init_loop_control_bit 7971055a8 Reserve additional loop control bit for upcoming update to SPV_INTEL_fpga_loop_controls extension 29c11140b Merge pull request #120 from antiagainst/mlir-serializer 123dc278f Merge pull request #121 from jeffbolznv/demote_to_helper_invocation dcce859e3 add SPV_EXT_demote_to_helper_invocation 739546b1c Reserve ID 23 for MLIR SPIR-V Serializer de99d4d83 Merge pull request #119 from dneto0/spirv-issue-476 9baa9e099 Add Volatile to Memory Semantics, for SPV_KHR_vulkan_memory_model 9cf7c3a7d Merge pull request #117 from ehsannas/UserTypeGOOGLE b1344c0d1 Add grammar and symbols for UserTypeGOOGLE extension to unified1. 9242862c8 Merge pull request #105 from mchiasson/cmake_install_config a7741727e Add missing "version" : "None" to a bunch of reserved enumerants. d5d33167d Add more detail about reserving tokens to the README. e88e050b2 Restore numerical order in enumerants. 8b911bd2b Merge pull request #114 from jeffbolznv/fsi 326779e4b Add SPV_EXT_fragment_shader_interlock 9280c0b4f Merge pull request #115 from dgkoch/SPV_NV_sm_shader_builts 630d06236 Add support for SPV_NV_sm_shader_builtins 903d447d9 OpenCL ext. inst. header: Support C in addition to C++. 7ac42f80c Merge pull request #112 from mkinsner/master d6936f933 Proposed LoopControl bitfield allocation mechanism in spir-v.xml 7f4277e21 Merge pull request #111 from Naghasan/codeplay-range 1edd6c43a Reserve token range for Codeplay ed8674d22 Update CMakeLists.txt 9674a1a54 Merge pull request #102 from ianromanick/INTEL_shader_integer_functions2 a08d4f0aa Merge pull request #107 from jeffbolznv/duplicate_enum_switch 9f50e659a Update HasResultAndType code generation to skip duplicate enum values. There weren't any until SPIR-V 1.4 release, now there are two. f7b06c277 updated as per code review 4b0985f29 Merge pull request #106 from alankemp/fix_json_writer 823750b56 Compare enum names rather than values to determine last element c5a291f7a cmake development configuration package Fixes #104 30ebd2f19 Merge pull request #103 from amdrexu/bugfix 30c51d36e Enable Groups capability by the extension SPV_AMD_shader_ballot 40798610d Add INTEL_shader_integer_functions2 c4f8f6579 Move to version 1.4 of SPIR-V. a5d33a253 Rationalize opcode ordering and a few spaces. 7af56c133 Merge pull request #101 from dneto0/clspv-generator 92d10249b Reserve generator 21 for Clspv 2434b8934 Merge pull request #100 from jeffbolznv/hasresult 9f7761857 Add a function that returns whether an opcode has a result and/or result type. Currently only implemented in C-based printers. 111a25e4a Merge pull request #99 from Naghasan/contact-update 0e0d1765e Update Codeplay's contact details 3beb2a037 Add ability to skip ranges of instructions; no impact to public headers 2d08d12d8 Sync to rev. 7 of headers from Khronos. f25b91a61 Merge pull request #98 from jeffbolznv/partitioned d20b78c77 Add GroupNonUniformPartitionedNV capability to all the GroupNonUniform instructions a946e7319 Header build for previous grammar update. 8f1cce947 Merge pull request #92 from PawelJurek/SPV_INTEL_device_side_avc_motion_estimation 03a081524 Make all "IdScope" be either Execution or Memory. dc3db3a5a Fix #96: Don't include a comment after #endif for the C header. d3752ea20 Merge pull request #95 from mkinsner/fpga_enum_block 2b3bbbc28 Reserve double SPIR-V enum block for upcoming Intel FPGA extension e74c389f8 Merge pull request #94 from jeffbolznv/cooperative_matrix 56decd41b Add SPV_NV_cooperative_matrix d0cc5acdf Grammar for SPV_INTEL_device_side_avc_motion_estimation extension. 8bea0a266 Update headers from previous SPV_INTEL_media_block_io grammar addition. 21f0d0744 Merge pull request #93 from PawelJurek/SPV_INTEL_media_block_io f2aef5d04 Grammar for SPV_INTEL_media_block_io extension f3abb280c Merge pull request #91 from LukasBanana/master b6a6dc041 Added '.DS_Store' (MacOS specific file) to gitignore. git-subtree-dir: third_party/SPIRV-Headers git-subtree-split: e4322e3be589e1ddd44afb20ea842a977c1319b8
-
Ben Clayton authored
The intrusive reference counting had no smart pointer, making it difficult to correctly manage reference counts. Most of the codebase did not call bind() and unbind() explictly, and relied on some other mechanism for keeping the routine alive. By switching to std::shared_ptr, we automatically get guarantees that routine cache eviction will not destroy the routine while it is in use. Bug: b/137524292 Bug: b/137649247 Change-Id: I38b5e8ba3ee084572a427a1de20f4f017ceaae5a Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/34168Tested-by:
Ben Clayton <bclayton@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
- 26 Jul, 2019 1 commit
-
-
Alexis Hetu authored
This cl makes a tradeoff of a one time conversion of the LRUCache to a constant unordered map to save time on a costly per pixel imageSampler fetch operation. When the renderer is idle, the device copies the LRUCache to an unordered map, which has faster fetch times. This cache is always constant throughout any rendering operation, so it can be fetched without a mutex. This copy operation happens only if the LRUCache was modified since the last copy occurred, so, if all sampling variations happened on the first frame, all subsequent frames can render much faster. On MacOS, the Glass demo goes from 2.6 FPS to 20 FPS. Bug b/129523279 b/137649247 Change-Id: I195ca8b2ead59eb5cc9e75e8b0dc5119c794d717 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/34348 Presubmit-Ready: Alexis Hétu <sugoi@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Tested-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Ben Clayton <bclayton@google.com>
-
- 24 Jul, 2019 1 commit
-
-
Sean Risser authored
We currently don't allow eglMakeCurrent to take an external buffer, which prevents IOSurfaces from being used as the default framebuffer. However, all the support for rendering to an IOSurface is in place already. It should be fine to remove the check against external buffers in eglMakeCurrent. Bug chromium:987289 Change-Id: I6342e553085f05914db0193500ea018961256a89 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/34388 Presubmit-Ready: Sean Risser <srisser@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com> Tested-by:
Sean Risser <srisser@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
-
- 19 Jul, 2019 5 commits
-
-
Alexis Hetu authored
GN follow up to the corresponding CMake change: https://swiftshader-review.googlesource.com/c/SwiftShader/+/32568 Bug b/134929443 Change-Id: Ic1eabafaef8e2eda92199434359456c1ba10e875 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/34110Tested-by:
Alexis Hétu <sugoi@google.com> Presubmit-Ready: Alexis Hétu <sugoi@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by:
Ben Clayton <bclayton@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
-
Nicolas Capens authored
The pointer to the structure containing clear values for the color, depth, and stencil aspects of the vkCmdClearColorImage() and vkCmdClearDepthStencilImage() functions is not an array to be indexed for each sub-resource range. Each of the ranges use the same clear values. Bug: b/118619338 Change-Id: I8ff6a46a68a30e93b652be0fc15210d6cec24832 Test: dEQP-VK.dynamic_state.ds_state.stencil_params_advanced Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/34308 Presubmit-Ready: Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Chris Forbes <chrisforbes@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com> Tested-by:
Nicolas Capens <nicolascapens@google.com>
-
Nicolas Capens authored
Suppress the "conversion from 'size_t' to 'type', possible loss of data" warning which gets treated as an error, to match the CMake build for MSVC, and other compilers. Bug: swiftshader:131 Change-Id: I2fb6695e5ed541b052e170b577fcaafb6ba169c4 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/34268 Presubmit-Ready: Nicolas Capens <nicolascapens@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
-
Nicolas Capens authored
When robustBufferAccess is disabled, applications must guarantee that no accesses will go out of bounds (statically or dynamically). For accesses with static equal or sequential offsets this means they'll be in-bounds for both active and inactive lanes. Hence we can omit all lane masking on such load operations. Bug: b/131224163 Bug: b/135609394 Change-Id: I8ef2d42b0159af0ee425bbd3ef5898ce971d8491 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/33928Tested-by:
Nicolas Capens <nicolascapens@google.com> Presubmit-Ready: Nicolas Capens <nicolascapens@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by:
Chris Forbes <chrisforbes@google.com> Reviewed-by:
Ben Clayton <bclayton@google.com>
-
Nicolas Capens authored
The required or desired behavior on out-of-bounds accesses depends on the robustness feature, storage class, static analysis, debugging state and paranoia level preference. Specifically, this change: - Omits bounds checks on local variable initialization. - Omits bounds checks on modf() and frexp() output variables. - Bounds checks on image read/write instead of using robustBufferAccess feature setting. - Bounds checks on OpCopyMemory instead of using robustBufferAccess feature setting. Bug: b/131224163 Change-Id: I199e73d42d9cce0645792dd1d876ea69d4ec3835 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/33988 Presubmit-Ready: Nicolas Capens <nicolascapens@google.com> Tested-by:
Nicolas Capens <nicolascapens@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by:
Ben Clayton <bclayton@google.com>
-
- 17 Jul, 2019 3 commits
-
-
Nicolas Capens authored
In https://swiftshader-review.googlesource.com/c/SwiftShader/+/33028 we modified the conversion of 8-bit color elements to 16-bit ones from duplicating the byte, to putting 0 in the lower byte, and adjusting the normalization factor from 0xFFFF to 0xFF00 accordingly. However, the latter wasn't being done for B8G8R8A8. Bug: chromium:979652 Bug: swiftshader:122 Change-Id: I621a600128e1b028b3303917acd826a7bf4630dd Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/34228 Presubmit-Ready: Nicolas Capens <nicolascapens@google.com> Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Chris Forbes <chrisforbes@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
-
Alexis Hetu authored
This cl implements the VK_MVK_macos_surface extension, which adds the vkCreateMacOSSurfaceMVK function on MacOS. According to the spec: "The VK_MVK_macos_surface extension is an instance extension. It provides a mechanism to create a VkSurfaceKHR object (defined by the VK_KHR_surface extension) that refers to an NSView, the native surface type of macOS, which is underpinned by a CAMetalLayer, to support rendering to the surface using Apple’s Metal framework." Bug b/137673628 Change-Id: Iacf7696b1d9e52d7349ea4efa01f0acdd09a6c8f Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/33848Reviewed-by:
Hernan Liatis <hliatis@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Chris Forbes <chrisforbes@google.com> Tested-by:
Alexis Hétu <sugoi@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
-
Ben Clayton authored
Not passing does not equal failing, and not failing does not equal passing, as there's the muddy waters of UNSUPPORTED and friends. Check for transitions of [not failing -> failing] and [not passing -> passing] as reasons to say something. Bug: b/137671242 Change-Id: Ibb612531da494738c411a1b3f1ac40a5c5078fdc Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/34188 Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Ben Clayton <bclayton@google.com>
-
- 16 Jul, 2019 2 commits
-
-
Alexis Hetu authored
The assert was firing off when there were already MAX_DESCRIPTOR_SET_COMBINED_BUFFERS_DYNAMIC dynamic descriptors (which is valid), while the last set layouts contained no dynamic descriptors, because the offset was already set to MAX_DESCRIPTOR_SET_COMBINED_BUFFERS_DYNAMIC, which shouldn't matter if there are no dynamic descriptors left. Bug b/118386749 b/123244275 Change-Id: I1536e6a47b7837c6b052d4e169a5396daf7d34cb Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/34148Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Alexis Hétu <sugoi@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
-
Alexis Hetu authored
- The SamplingRoutine cache is now owned by the Device and has the same lifetime as the device, which means it gets released when the device gets released. - Added a utility class, SamplingRoutineCache, to contain the cache and release all routine entries upon destruction. - Added a pointer to the current device in the sampler object in order to retrieve it during sampling, in order to access the routine cache - The cache is now internally an LRUCache, so it can't cache a large quantity of routines and take up a lot of memory. Bug b/129523279 b/137649247 b/137524292 chromium:971325 Change-Id: If4ff1fbc87962355d0a281b9d0acace4316a02b8 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/32688Tested-by:
Alexis Hétu <sugoi@google.com> Presubmit-Ready: Alexis Hétu <sugoi@google.com> Reviewed-by:
Chris Forbes <chrisforbes@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
-