Commit f63c4e51 by Ben Clayton

Reactor: Don't auto-initialize Pointer<T> variables with null.

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: 's avatarNicolas Capens <nicolascapens@google.com> Tested-by: 's avatarBen Clayton <bclayton@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
parent 0697da05
...@@ -1253,9 +1253,9 @@ namespace sw ...@@ -1253,9 +1253,9 @@ namespace sw
struct SamplerCache struct SamplerCache
{ {
Pointer<Byte> imageDescriptor; Pointer<Byte> imageDescriptor = nullptr;
Pointer<Byte> sampler; Pointer<Byte> sampler = nullptr;
Pointer<Byte> function; Pointer<Byte> function = nullptr;
}; };
vk::PipelineLayout const * const pipelineLayout; vk::PipelineLayout const * const pipelineLayout;
......
...@@ -2818,10 +2818,7 @@ namespace rr ...@@ -2818,10 +2818,7 @@ namespace rr
} }
template<class T> template<class T>
Pointer<T>::Pointer() : alignment(1) Pointer<T>::Pointer() : alignment(1) {}
{
LValue<Pointer<T>>::storeValue(Nucleus::createNullPointer(T::getType()));
}
template<class T> template<class T>
Pointer<T>::Pointer(RValue<Pointer<T>> rhs) : alignment(1) Pointer<T>::Pointer(RValue<Pointer<T>> rhs) : alignment(1)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment