From: Adam Jackson Date: Wed, 27 Jan 2021 19:23:17 +0000 (-0500) Subject: osmesa: Pacify MSVC in the test code X-Git-Tag: upstream/21.2.3~8149 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=88ca480c8babc684c22a6b53de4caaeb3bd9b0b9;p=platform%2Fupstream%2Fmesa.git osmesa: Pacify MSVC in the test code Not smart enough to think this is const, eh. Fixes: mesa/mesa#4119 Fixes: c5c1aa7c75c05927017325829cb3f354654d0b73 ("gallium/osmesa: Fix flushing and Y-flipping of the depth buffer.") Reviewed-by: Eric Anholt Part-of: --- diff --git a/src/gallium/targets/osmesa/test-render.cpp b/src/gallium/targets/osmesa/test-render.cpp index fbb0f3d..3b6531f 100644 --- a/src/gallium/targets/osmesa/test-render.cpp +++ b/src/gallium/targets/osmesa/test-render.cpp @@ -169,7 +169,7 @@ TEST(OSMesaRenderTest, depth) OSMesaCreateContextExt(OSMESA_RGB_565, 24, 8, 0, NULL), &OSMesaDestroyContext}; ASSERT_TRUE(ctx); - int w = 3, h = 2; + const int w = 3, h = 2; uint8_t pixels[4096 * h * 2] = {0}; /* different cpp from our depth! */ auto ret = OSMesaMakeCurrent(ctx.get(), &pixels, GL_UNSIGNED_SHORT_5_6_5, w, h); ASSERT_EQ(ret, GL_TRUE);