OSDN Git Service

mesa: Don't allow wrong type setters for matrix uniforms
authorIan Romanick <ian.d.romanick@intel.com>
Tue, 1 Sep 2015 01:44:42 +0000 (18:44 -0700)
committerEmil Velikov <emil.l.velikov@gmail.com>
Sun, 6 Sep 2015 17:58:06 +0000 (18:58 +0100)
commit1153420017873011a91367a4fd81cad6a3878023
treef9f06bc1b3ae110097a57477d5aa5459f69892a6
parent5704d473c8d4b58aa51b521d23a6e2fdd79a0bfc
mesa: Don't allow wrong type setters for matrix uniforms

Previously we would allow glUniformMatrix4fv on a dmat4 and
glUniformMatrix4dv on a mat4.  Both are illegal.  That later also
overwrites the storage for the mat4 and causes bad things to happen.

Should fix the (new) arb_gpu_shader_fp64-wrong-type-setter piglit test.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Timothy Arceri <t_arceri@yahoo.com.au>
Cc: Dave Airlie <airlied@redhat.com>
Cc: "10.6 11.0" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 7237c937af3b495191bee2f7240901e3a9daf1fb)
src/mesa/main/uniform_query.cpp