diff options
author | Dave Airlie <airlied@redhat.com> | 2015-04-08 02:58:24 +0000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2015-04-08 13:35:07 +1000 |
commit | 340357e93073224c764358705a9ca30a6844e50d (patch) | |
tree | b4ececc408b82b2094a7ed96eb2918fcf55c836b | |
parent | 1e0af1a8d8d69e5832b85e3283f6ea44e44fc513 (diff) |
arb_vertex_attrib_64bit: explicit attribute location test
This puts two dvec3 attributes into consecutive locations explicitly,
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Dave Airlie <airlied@redhat.com>
-rw-r--r-- | tests/spec/arb_vertex_attrib_64bit/execution/vs-test-attrib-location.shader_test | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/tests/spec/arb_vertex_attrib_64bit/execution/vs-test-attrib-location.shader_test b/tests/spec/arb_vertex_attrib_64bit/execution/vs-test-attrib-location.shader_test new file mode 100644 index 000000000..d67800528 --- /dev/null +++ b/tests/spec/arb_vertex_attrib_64bit/execution/vs-test-attrib-location.shader_test @@ -0,0 +1,44 @@ +# this tests that using explicit attributes +# that each dvec3/4 only takes up one location +# +[require] +GLSL >= 3.30 +GL_ARB_gpu_shader_fp64 +GL_ARB_vertex_attrib_64bit + +[vertex shader] +#version 330 +#extension GL_ARB_gpu_shader_fp64 : require +#extension GL_ARB_vertex_attrib_64bit : require +layout(location = 0) in dvec3 vertex; +layout(location = 1) in dvec3 incolor; +flat out dvec4 fscolor; +void main() +{ + gl_Position = vec4(vertex, 1.0); + fscolor = dvec4(incolor, 1.0lf); +} + +[fragment shader] +#version 150 +#extension GL_ARB_gpu_shader_fp64 : require + +flat in dvec4 fscolor; +out vec4 color; +void main() +{ + color = vec4(fscolor); +} + +[vertex data] +vertex/double/3 incolor/double/3 +-1.0 -1.0 0.0 0.0 1.0 0.0 + 1.0 -1.0 0.0 0.0 1.0 0.0 + 1.0 1.0 0.0 0.0 1.0 0.0 +-1.0 1.0 0.0 0.0 1.0 0.0 + +[test] +clear color 0.0 0.0 1.0 0.0 +clear +draw arrays GL_TRIANGLE_FAN 0 4 +probe rgba 0 0 0.0 1.0 0.0 1.0 |