@@ -3280,10 +3280,6 @@ TEST_P(GLSLTest_ES31, ArraysOfArraysSampler)
32803280// Test that structs containing arrays of samplers work as expected.
32813281TEST_P (GLSLTest_ES31, StructArraySampler)
32823282{
3283- // ASAN error on vulkan backend; ASAN tests only enabled on Mac Swangle
3284- // (http://crbug.com/1029378)
3285- ANGLE_SKIP_TEST_IF (IsOSX () && isSwiftshader ());
3286-
32873283 constexpr char kFS [] =
32883284 " #version 310 es\n "
32893285 " precision mediump float;\n "
@@ -3299,13 +3295,14 @@ TEST_P(GLSLTest_ES31, StructArraySampler)
32993295 glUseProgram (program.get ());
33003296 GLTexture textures[2 ];
33013297 GLColor expected = MakeGLColor (32 , 64 , 96 , 255 );
3298+ GLubyte data[6 ] = {}; // Two bytes of padding, so that texture can be initialized with 4 bytes
3299+ memcpy (data, expected.data (), sizeof (expected));
33023300 for (int i = 0 ; i < 2 ; i++)
33033301 {
33043302 glActiveTexture (GL_TEXTURE0 + i);
33053303 glBindTexture (GL_TEXTURE_2D, textures[i]);
33063304 // Each element provides two components.
3307- glTexImage2D (GL_TEXTURE_2D, 0 , GL_RGBA8, 1 , 1 , 0 , GL_RGBA, GL_UNSIGNED_BYTE,
3308- expected.data () + 2 * i);
3305+ glTexImage2D (GL_TEXTURE_2D, 0 , GL_RGBA8, 1 , 1 , 0 , GL_RGBA, GL_UNSIGNED_BYTE, data + 2 * i);
33093306 std::stringstream uniformName;
33103307 uniformName << " test.data[" << i << " ]" ;
33113308 // Then send it as a uniform
0 commit comments