OSDN Git Service

main: check driver float texture support before upgrading to 16F/32F
authorIlia Mirkin <imirkin@alum.mit.edu>
Sun, 22 May 2016 20:09:53 +0000 (16:09 -0400)
committerIlia Mirkin <imirkin@alum.mit.edu>
Tue, 24 May 2016 00:00:39 +0000 (20:00 -0400)
commit2e8e1e89090ddfc95ae3b732b7b810d68c3217e5
tree2f4e9d097c88f4e834b0985ca1d03514bba2bb77
parent1e99a46b446522dbb12634139c2f2060d5dabf94
main: check driver float texture support before upgrading to 16F/32F

When passing in GL_RGBA or other base formats, we will try to upgrade
the format to whatever the passed in type was. However not all drivers
(notably nv30) support 32F textures, and so this would lead to crashes
down the line. Only upgrade when the relevant extensions are available.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Dave Airlie <airlied@redhat.com>
src/mesa/main/teximage.c