From 48ed0cb903438a42fa871efcd5a7fa03da8d5679 Mon Sep 17 00:00:00 2001 From: sephiroth99 Date: Thu, 4 Jun 2015 23:32:37 -0400 Subject: [PATCH] gl4: fix glGetInteger of GL_SAMPLER_BINDING GL_SAMPLER_BINDING returns a single value. On AMD drivers, using the indexed version of glGetInteger to get that value causes a GL_INVALID_ENUM error. Use the non-indexed version. --- src/xenia/gpu/gl4/blitter.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/xenia/gpu/gl4/blitter.cc b/src/xenia/gpu/gl4/blitter.cc index b924c831e..ce4edd912 100644 --- a/src/xenia/gpu/gl4/blitter.cc +++ b/src/xenia/gpu/gl4/blitter.cc @@ -180,7 +180,7 @@ struct SavedState { glGetIntegerv(GL_PROGRAM_PIPELINE_BINDING, &program_pipeline); glGetIntegerv(GL_VERTEX_ARRAY_BINDING, &vertex_array); glGetIntegerv(GL_TEXTURE_BINDING_2D, &texture_0); - glGetIntegeri_v(GL_SAMPLER_BINDING, 0, &sampler_0); + glGetIntegerv(GL_SAMPLER_BINDING, &sampler_0); } void Restore() {