1. 05 Jun, 2020 2 commits
    • ReinUsesLisp's avatar
      shader/texture: Join separate image and sampler pairs offline · 5b2b6d59
      ReinUsesLisp authored
      Games using D3D idioms can join images and samplers when a shader
      executes, instead of baking them into a combined sampler image. This is
      also possible on Vulkan.
      
      One approach to this solution would be to use separate samplers on
      Vulkan and leave this unimplemented on OpenGL, but we can't do this
      because there's no consistent way of determining which constant buffer
      holds a sampler and which one an image. We could in theory find the
      first bit and if it's in the TIC area, it's an image; but this falls
      apart when an image or sampler handle use an index of zero.
      
      The used approach is to track for a LOP.OR operation (this is done at an
      IR level, not at an ISA level), track again the constant buffers used as
      source and store this pair. Then, outside of shader execution, join
      the sample and image pair with a bitwise or operation.
      
      This approach won't work on games that truly use separate samplers in a
      meaningful way. For example, pooling textures in a 2D array and
      determining at runtime what sampler to use.
      
      This invalidates OpenGL's disk shader cache :)
      
      - Used mostly by D3D ports to Switch
      5b2b6d59
    • ReinUsesLisp's avatar
  2. 02 Jun, 2020 4 commits
  3. 01 Jun, 2020 5 commits
  4. 31 May, 2020 7 commits
  5. 30 May, 2020 4 commits
  6. 29 May, 2020 3 commits
  7. 28 May, 2020 8 commits
  8. 27 May, 2020 7 commits