1. 14 Dec, 2020 5 commits
  2. 12 Dec, 2020 1 commit
  3. 11 Dec, 2020 7 commits
  4. 10 Dec, 2020 4 commits
  5. 09 Dec, 2020 8 commits
  6. 07 Dec, 2020 2 commits
  7. 05 Dec, 2020 1 commit
  8. 04 Dec, 2020 7 commits
  9. 02 Dec, 2020 5 commits
    • Reactor: add Type* member to Value and remove vtable · bae138de
      Antonio Maiorano authored
      This change removes the virtual getType() function, and instead stores
      the Type* as a member in Variable. This change is important for when
      materialize() gets called from Variable constructors, such as in LValue,
      so that we do not call a virtual function from the constructor. Note
      that this is exactly what would happen when LValue's ctor calls
      materialize(), but it so happened that the most overridden getType() is
      in LValue, so it calls the correct version. However, if we ever override
      getType() in a class derived from LValue, this would fail to work
      properly.
      
      As getType was the only virtual function in Variable, note that the
      sizeof(Variable) does not change as we swapped the one vtable pointer
      for a Type pointer.
      
      Bug: b/174160049
      Change-Id: I8688fb9e9bd604e9839d3bac60761761bc969ae2
      Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/50848
      Kokoro-Result: kokoro <noreply+kokoro@google.com>
      Tested-by: 's avatarAntonio Maiorano <amaiorano@google.com>
      Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com>
    • Fix crash from rr::Array with ENABLE_RR_DEBUG_INFO enabled · 84c61e18
      Antonio Maiorano authored
      Fixes crash when using rr::Array with ENABLE_RR_DEBUG_INFO. This is
      because when the LValue ctor calls materialize, this would end up
      calling the virtual allocate() function, which would not call the
      overridden version in rr::Array as it was not fully constructed yet.
      Instead, we go back to having the size stored in Value, and passing it up the
      constructor chain.
      
      Note that this effectively reverts "Eliminate the array size from rr::Variable"
      (5e16bc45) with some modifications.
      
      Bug: b/174160049
      Change-Id: I83cec95a74f32ef7276ed60f979a4c32f571eb8a
      Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/50809
      Kokoro-Result: kokoro <noreply+kokoro@google.com>
      Tested-by: 's avatarAntonio Maiorano <amaiorano@google.com>
      Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com>
    • Guard VK_GOOGLE_SAMPLER_FILTERING_PRECISION · 95ffe036
      Jason Macnak authored
      ... to disable the extension on Cuttlefish in order
      to pass dEQP-VK.api.info.android#no_unknown_extensions
      on Cuttlefish.
      
      Bug: b/174028661
      Test: cts -m CtsDeqpTestCases
      Change-Id: I9af0194e724a738491f6820eb2ca8947ac202e5a
      Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/50688
      Presubmit-Ready: Jason Macnak <natsu@google.com>
      Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com>
      Tested-by: 's avatarJason Macnak <natsu@google.com>
    • LLVM: add option to emit asm file to aid debugging · 6f6ca293
      Antonio Maiorano authored
      Defining ENABLE_RR_EMIT_ASM_FILE will make it so that the LLVM backend
      outputs a unique asm file per routine that is generated. This file is
      further processed and updated so that each instruction is prefixed with
      the final resolved memory location.
      
      This is useful, for instance, when we get JIT callstacks and can't
      easily figure out which code it maps to. Furthermore, when this feature
      is coupled with ENABLE_RR_DEBUG_INFO, the emitted asm includes source
      location (file and line) information, making it easy to correlate the
      asm to the Reactor code.
      
      For example, running ReactorUnitTests.Sample with both
      ENABLE_RR_EMIT_ASM_FILE and ENABLE_RR_DEBUG_INFO enabled generates a
      file named swiftshader_jit_llvm_0000_ReactorUnitTests_Sample.asm, with
      partial output like so:
      
      ```
      	.file	2 "C:\\src\\SwiftShader2\\tests\\ReactorUnitTests\\ReactorUnitTests.cpp\\<unknown>"
      	.loc	2 53 0 prologue_end     # <unknown>:53:0
      [0x2B9D3358004] 	mov	qword ptr [rsp + 64], rcx # encoding: [0x48,0x89,0x4c,0x24,0x40]
      [0x2B9D3358009] 	mov	qword ptr [rsp + 72], rcx # encoding: [0x48,0x89,0x4c,0x24,0x48]
      	.loc	2 54 0                  # <unknown>:54:0
      [0x2B9D335800E] 	mov	eax, dword ptr [rcx - 4] # encoding: [0x8b,0x41,0xfc]
      [0x2B9D3358011] 	mov	dword ptr [rsp + 8], eax # encoding: [0x89,0x44,0x24,0x08]
      [0x2B9D3358015] 	mov	dword ptr [rsp + 16], eax # encoding: [0x89,0x44,0x24,0x10]
      	.loc	2 55 0                  # <unknown>:55:0
      [0x2B9D3358019] 	mov	dword ptr [rsp + 12], edx # encoding: [0x89,0x54,0x24,0x0c]
      [0x2B9D335801D] 	mov	dword ptr [rsp + 20], edx # encoding: [0x89,0x54,0x24,0x14]
      ```
      
      The "53", "54", and "55" are the line numbers of the respective Reactor
      code in ReactorUnitTests.cpp.
      
      CMake: enable REACTOR_EMIT_ASM_FILE to enable this feature.
      
      Bug: b/174358505
      Change-Id: I613a25fe0354a1343c49cb399875e82d5e806e29
      Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/50750
      Kokoro-Result: kokoro <noreply+kokoro@google.com>
      Tested-by: 's avatarAntonio Maiorano <amaiorano@google.com>
      Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com>
    • Coroutine: allow a name to be passed in for routine generation · 3fba1ac2
      Antonio Maiorano authored
      Add an optional parameter to Coroutine::finalize() to give the underlying
      routine a name. To support variadic args, we use a strongly-typed Name class.
      Note that giving a name to Coroutines is optional, but we may decide to force
      one to be given, as we do for Functions, as it's useful for debugging.
      
      - ReactorUnitTests Coroutine tests now pass in the test name
      - ComputeProgram now passes in "ComputeProgram" as a name
      
      Bug: b/174358505
      Change-Id: I899e8aab5dfd5d461bc7de0e54bc0e2b72e4b4a9
      Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/50791
      Kokoro-Result: kokoro <noreply+kokoro@google.com>
      Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com>
      Tested-by: 's avatarAntonio Maiorano <amaiorano@google.com>