diff options
| author | YONGH\yongh <yonghe@outlook.com> | 2017-10-25 17:59:45 -0400 |
|---|---|---|
| committer | YONGH\yongh <yonghe@outlook.com> | 2017-10-25 17:59:45 -0400 |
| commit | 52ceff4beee7cdc7d47eb9292a35e9f610a80bdc (patch) | |
| tree | 27178492317206dc1281b2d3caa31ab60bd35002 /tools/render-test/render-gl.cpp | |
| parent | 922c17be4c6d33243cb4876bea9a44e3c855f4bc (diff) | |
add new test mode: COMPARE_RENDER_COMPUTE, which runs a input vertex/fragment shader pair, but instead of comparing the resulting framebuffer, it expects the test shader to write results into a UAV, and compares the pixel shader UAV output to the reference output.
Diffstat (limited to 'tools/render-test/render-gl.cpp')
| -rw-r--r-- | tools/render-test/render-gl.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/tools/render-test/render-gl.cpp b/tools/render-test/render-gl.cpp index e983dad70..d19e71743 100644 --- a/tools/render-test/render-gl.cpp +++ b/tools/render-test/render-gl.cpp @@ -287,6 +287,7 @@ public: case Format::NAME: do { VertexAttributeFormat result = {COUNT, TYPE, NORMALIZED}; return result; } while (0) CASE(RGB_Float32, 3, GL_FLOAT, GL_FALSE); + CASE(RG_Float32, 2, GL_FLOAT, GL_FALSE); #undef CASE @@ -625,7 +626,7 @@ public: { ShaderInputType type; GLuint handle; - int binding; + List<int> binding; int bindTarget; int bufferSize; bool isOutput = false; @@ -789,14 +790,15 @@ public: switch (entry.type) { case ShaderInputType::Buffer: - glBindBufferBase(entry.bindTarget, entry.binding, entry.handle); + glBindBufferBase(entry.bindTarget, entry.binding[0], entry.handle); break; case ShaderInputType::Sampler: - glBindSampler(entry.binding, entry.handle); + for (auto b : entry.binding) + glBindSampler(b, entry.handle); break; case ShaderInputType::Texture: case ShaderInputType::CombinedTextureSampler: - glActiveTexture(GL_TEXTURE0 + entry.binding); + glActiveTexture(GL_TEXTURE0 + entry.binding[0]); glBindTexture(entry.bindTarget, entry.handle); break; } |
