format: assert that the multi-sample check enters with a clean error state

In order to ensure that all the errors in the initialization are handled
before entering this routine assert on pre-existsing errors.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Jakob Bornecrantz <jakob@collabora.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
macos/master
Gert Wollny 6 years ago committed by Dave Airlie
parent c31e6facde
commit 1c113ddcd7
  1. 3
      src/vrend_formats.c

@ -475,6 +475,9 @@ unsigned vrend_renderer_query_multisample_caps(unsigned max_samples, struct virg
int out_buf_offsets[4] = {0,1,2,4};
int lowest_working_ms_count_idx = -1;
assert(glGetError() == GL_NO_ERROR &&
"Stale error state detected, please check for failures in initialization");
glGenFramebuffers( 1, &fbo );
memset(caps->sample_locations, 0, 8 * sizeof(uint32_t));

Loading…
Cancel
Save