OSDN Git Service

Fix textureSize for non-uniform samplers.
authorNicolas Capens <capn@google.com>
Tue, 27 Nov 2018 22:07:49 +0000 (17:07 -0500)
committerNicolas Capens <nicolascapens@google.com>
Wed, 28 Nov 2018 17:32:41 +0000 (17:32 +0000)
commit79d0e565b0013c80c45769065c15b26058057262
tree44ad34911df8711508c40b08d9315df772ba96c6
parent3b003a51bc9aaaabdc1329a0df59828969eb85f4
Fix textureSize for non-uniform samplers.

GLSL textureSize() calls that use a sampler that is not a uniform,
should not use the index of the register as the texture unit index.
Instead the index is the value stored in the register itself.

Bug chromium:904265

Change-Id: Iee1058e789daae15248ae5ffa940a0155dca61b5
Reviewed-on: https://swiftshader-review.googlesource.com/c/22910
Tested-by: Nicolas Capens <nicolascapens@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
src/Pipeline/PixelProgram.cpp
src/Pipeline/VertexProgram.cpp
src/Shader/PixelProgram.cpp
src/Shader/VertexProgram.cpp