OSDN Git Service

Create SamplerCore on demand.
authorNicolas Capens <capn@google.com>
Tue, 7 Nov 2017 14:20:53 +0000 (09:20 -0500)
committerNicolas Capens <nicolascapens@google.com>
Tue, 7 Nov 2017 21:29:32 +0000 (21:29 +0000)
commitde9034496feb787ccf6680b83c56479b2eb2e4ce
tree7f053ac6fbad31b0a5976849fc365a1227773ff1
parentf878d50b65d70c883dd8c882e5096b14e2a9ae53
Create SamplerCore on demand.

Previously we dynamically allocated an array of SamplerCores. This
isn't necessary and we can just create one as a temporary object where
used. This has the added advantage that we could have Reactor variables
as class members and keep them short-lived.

Change-Id: Ifb2e6edbf275aa793bd7880bd35384e16000007d
Reviewed-on: https://swiftshader-review.googlesource.com/13548
Tested-by: Nicolas Capens <nicolascapens@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
src/Shader/PixelPipeline.cpp
src/Shader/PixelProgram.cpp
src/Shader/PixelRoutine.cpp
src/Shader/PixelRoutine.hpp
src/Shader/SamplerCore.hpp
src/Shader/VertexProgram.cpp
src/Shader/VertexProgram.hpp