OSDN Git Service

Implement dynamic indexing of temporaries.
authorNicolas Capens <capn@google.com>
Mon, 28 May 2018 17:22:07 +0000 (13:22 -0400)
committerNicolas Capens <nicolascapens@google.com>
Tue, 29 May 2018 13:59:43 +0000 (13:59 +0000)
commit4b74373aac5107233555ae00b6df2340251b5022
tree40bbdcb7da1325600d958c45f2d9a8300631b6ba
parent5bff4059d646fbd296818d8d17fb38c8590de8a7
Implement dynamic indexing of temporaries.

Previously only dynamic indexing of uniforms was supported.

Since this is essentially a gather operation within the register file,
it is slow. We optimize the common case of using the loop index
variable as relative address, where the index value would be the same
for all shader invocations running in lock-step across SIMD lanes.

Bug chromium:845103
Bug skia:7846

Change-Id: Idb36b512dd560d740ac9088691b633ff3a1561c1
Reviewed-on: https://swiftshader-review.googlesource.com/18968
Tested-by: Nicolas Capens <nicolascapens@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
src/OpenGL/compiler/OutputASM.cpp
src/OpenGL/compiler/OutputASM.h
src/Reactor/Reactor.hpp
src/Shader/PixelProgram.cpp
src/Shader/PixelProgram.hpp
src/Shader/Shader.hpp
src/Shader/VertexProgram.cpp
src/Shader/VertexProgram.hpp