mesa/main: fix validation of GL_SAMPLES_PASSED
authorErik Faye-Lund <erik.faye-lund@collabora.com>
Wed, 7 Nov 2018 12:22:41 +0000 (13:22 +0100)
committerErik Faye-Lund <erik.faye-lund@collabora.com>
Fri, 23 Nov 2018 09:48:35 +0000 (10:48 +0100)
commitfff1738d5793eb57a1f024c46c583b2b295687d3
tree9aed24a0003ead3139ef19cacb5c6517da5ac547
parent9c13ad0ea403fa8699b505c05db6d4c0aeb870a6
mesa/main: fix validation of GL_SAMPLES_PASSED

ctx->Extensions.ARB_occlusion_query is set based on the driver-
capabilities, not based on the context type. We need to check against
_mesa_has_ARB_occlusion_query(ctx) instead to figure out if the
extension is really supported. We also need to check for
ARB_occlusion_query2, as ARB_occlusion_query isn't available in core
contexts.

This turns usage of GL_SAMPLES_PASSED into an error on ES 3, as is
required by the spec.

Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
src/mesa/main/queryobj.c