Skip to content

Commit 311dc81

Browse files
committed
Set gl_PointSize in primitive restart tests for GL_POINTS.
Failing to set this was relying on currently-undefined behavior and causing the tests to fail on Apple's M1. Related to KhronosGroup#2818, KhronosGroup#2822 and KhronosGroup#3356.
1 parent b1f3776 commit 311dc81

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

sdk/tests/deqp/functional/gles3/es3fPrimitiveRestartTests.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -334,10 +334,15 @@ var gluTextureUtil = framework.opengl.gluTextureUtil;
334334
'\n' +
335335
'void main()\n' +
336336
' {\n' +
337-
' gl_Position = a_position;\n' +
338-
'}\n';
337+
' gl_Position = a_position;\n';
338+
339+
if (this.m_primType == es3fPrimitiveRestartTests.PrimitiveType.PRIMITIVE_POINTS) {
340+
vertShaderSource += ' gl_PointSize = 1.0;\n';
341+
}
342+
343+
vertShaderSource += '}\n';
339344

340-
/** @type {string} */ var fragShaderSource =
345+
/** @type {string} */ var fragShaderSource =
341346
'#version 300 es\n' +
342347
'layout(location = 0) out mediump vec4 o_color;\n' +
343348
'\n' +

0 commit comments

Comments
 (0)