i965: Check result of make_surface() for intel_miptree_create_for_bo
authorChris Wilson <chris@chris-wilson.co.uk>
Mon, 31 Jul 2017 09:22:44 +0000 (10:22 +0100)
committerKenneth Graunke <kenneth@whitecape.org>
Wed, 2 Aug 2017 04:28:09 +0000 (21:28 -0700)
commitf28c2e225668ed7977b301100140f4f7e7bf55e6
tree027641a9748af604799585d02c894958c0273820
parent246690b683cbd1b3e596b8cc3ef1c86b65fb671e
i965: Check result of make_surface() for intel_miptree_create_for_bo

Since make_surface() can fail, if the format isn't support by hw or
simlar error, we need to check the result before dereferencing it.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/intel_mipmap_tree.c