Update waitSync and the TIMEOUT_IGNORED constant to use signed integers.
authorMs2ger@igalia.com <Ms2ger@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 25 Sep 2017 13:38:57 +0000 (13:38 +0000)
committerMs2ger@igalia.com <Ms2ger@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 25 Sep 2017 13:38:57 +0000 (13:38 +0000)
https://bugs.webkit.org/show_bug.cgi?id=177239

Reviewed by Žan Doberšek.

This matches the specification.

Source/WebCore:

Test: fast/canvas/webgl/webgl2/constants.html

* html/canvas/WebGL2RenderingContext.cpp:
(WebCore::WebGL2RenderingContext::waitSync):
* html/canvas/WebGL2RenderingContext.h:
* html/canvas/WebGL2RenderingContext.idl:

LayoutTests:

* fast/canvas/webgl/webgl2/constants-expected.txt: Added.
* fast/canvas/webgl/webgl2/constants.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222444 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/fast/canvas/webgl/webgl2/constants-expected.txt [new file with mode: 0644]
LayoutTests/fast/canvas/webgl/webgl2/constants.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/html/canvas/WebGL2RenderingContext.cpp
Source/WebCore/html/canvas/WebGL2RenderingContext.h
Source/WebCore/html/canvas/WebGL2RenderingContext.idl

index 8d330b5..b549d88 100644 (file)
@@ -1,3 +1,15 @@
+2017-09-25  Ms2ger  <Ms2ger@igalia.com>
+
+        Update waitSync and the TIMEOUT_IGNORED constant to use signed integers.
+        https://bugs.webkit.org/show_bug.cgi?id=177239
+
+        Reviewed by Žan Doberšek.
+
+        This matches the specification.
+
+        * fast/canvas/webgl/webgl2/constants-expected.txt: Added.
+        * fast/canvas/webgl/webgl2/constants.html: Added.
+
 2017-09-25  Manuel Rego Casasnovas  <rego@igalia.com>
 
         [css-grid] fit-content() tracks shouldn't stretch
diff --git a/LayoutTests/fast/canvas/webgl/webgl2/constants-expected.txt b/LayoutTests/fast/canvas/webgl/webgl2/constants-expected.txt
new file mode 100644 (file)
index 0000000..22225a5
--- /dev/null
@@ -0,0 +1,266 @@
+
+PASS READ_BUFFER 
+PASS UNPACK_ROW_LENGTH 
+PASS UNPACK_SKIP_ROWS 
+PASS UNPACK_SKIP_PIXELS 
+PASS PACK_ROW_LENGTH 
+PASS PACK_SKIP_ROWS 
+PASS PACK_SKIP_PIXELS 
+PASS COLOR 
+PASS DEPTH 
+PASS STENCIL 
+PASS RED 
+PASS RGB8 
+PASS RGBA8 
+PASS RGB10_A2 
+PASS TEXTURE_BINDING_3D 
+PASS UNPACK_SKIP_IMAGES 
+PASS UNPACK_IMAGE_HEIGHT 
+PASS TEXTURE_3D 
+PASS TEXTURE_WRAP_R 
+PASS MAX_3D_TEXTURE_SIZE 
+PASS UNSIGNED_INT_2_10_10_10_REV 
+PASS MAX_ELEMENTS_VERTICES 
+PASS MAX_ELEMENTS_INDICES 
+PASS TEXTURE_MIN_LOD 
+PASS TEXTURE_MAX_LOD 
+PASS TEXTURE_BASE_LEVEL 
+PASS TEXTURE_MAX_LEVEL 
+PASS MIN 
+PASS MAX 
+PASS DEPTH_COMPONENT24 
+PASS MAX_TEXTURE_LOD_BIAS 
+PASS TEXTURE_COMPARE_MODE 
+PASS TEXTURE_COMPARE_FUNC 
+PASS CURRENT_QUERY 
+PASS QUERY_RESULT 
+PASS QUERY_RESULT_AVAILABLE 
+PASS STREAM_READ 
+PASS STREAM_COPY 
+PASS STATIC_READ 
+PASS STATIC_COPY 
+PASS DYNAMIC_READ 
+PASS DYNAMIC_COPY 
+PASS MAX_DRAW_BUFFERS 
+PASS DRAW_BUFFER0 
+PASS DRAW_BUFFER1 
+PASS DRAW_BUFFER2 
+PASS DRAW_BUFFER3 
+PASS DRAW_BUFFER4 
+PASS DRAW_BUFFER5 
+PASS DRAW_BUFFER6 
+PASS DRAW_BUFFER7 
+PASS DRAW_BUFFER8 
+PASS DRAW_BUFFER9 
+PASS DRAW_BUFFER10 
+PASS DRAW_BUFFER11 
+PASS DRAW_BUFFER12 
+PASS DRAW_BUFFER13 
+PASS DRAW_BUFFER14 
+PASS DRAW_BUFFER15 
+PASS MAX_FRAGMENT_UNIFORM_COMPONENTS 
+PASS MAX_VERTEX_UNIFORM_COMPONENTS 
+PASS SAMPLER_3D 
+PASS SAMPLER_2D_SHADOW 
+PASS FRAGMENT_SHADER_DERIVATIVE_HINT 
+PASS PIXEL_PACK_BUFFER 
+PASS PIXEL_UNPACK_BUFFER 
+PASS PIXEL_PACK_BUFFER_BINDING 
+PASS PIXEL_UNPACK_BUFFER_BINDING 
+PASS FLOAT_MAT2x3 
+PASS FLOAT_MAT2x4 
+PASS FLOAT_MAT3x2 
+PASS FLOAT_MAT3x4 
+PASS FLOAT_MAT4x2 
+PASS FLOAT_MAT4x3 
+PASS SRGB 
+PASS SRGB8 
+PASS SRGB8_ALPHA8 
+PASS COMPARE_REF_TO_TEXTURE 
+PASS RGBA32F 
+PASS RGB32F 
+PASS RGBA16F 
+PASS RGB16F 
+PASS VERTEX_ATTRIB_ARRAY_INTEGER 
+PASS MAX_ARRAY_TEXTURE_LAYERS 
+PASS MIN_PROGRAM_TEXEL_OFFSET 
+PASS MAX_PROGRAM_TEXEL_OFFSET 
+PASS MAX_VARYING_COMPONENTS 
+PASS TEXTURE_2D_ARRAY 
+PASS TEXTURE_BINDING_2D_ARRAY 
+PASS R11F_G11F_B10F 
+PASS UNSIGNED_INT_10F_11F_11F_REV 
+PASS RGB9_E5 
+PASS UNSIGNED_INT_5_9_9_9_REV 
+PASS TRANSFORM_FEEDBACK_BUFFER_MODE 
+PASS MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS 
+PASS TRANSFORM_FEEDBACK_VARYINGS 
+PASS TRANSFORM_FEEDBACK_BUFFER_START 
+PASS TRANSFORM_FEEDBACK_BUFFER_SIZE 
+PASS TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN 
+PASS RASTERIZER_DISCARD 
+PASS MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS 
+PASS MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS 
+PASS INTERLEAVED_ATTRIBS 
+PASS SEPARATE_ATTRIBS 
+PASS TRANSFORM_FEEDBACK_BUFFER 
+PASS TRANSFORM_FEEDBACK_BUFFER_BINDING 
+PASS RGBA32UI 
+PASS RGB32UI 
+PASS RGBA16UI 
+PASS RGB16UI 
+PASS RGBA8UI 
+PASS RGB8UI 
+PASS RGBA32I 
+PASS RGB32I 
+PASS RGBA16I 
+PASS RGB16I 
+PASS RGBA8I 
+PASS RGB8I 
+PASS RED_INTEGER 
+PASS RGB_INTEGER 
+PASS RGBA_INTEGER 
+PASS SAMPLER_2D_ARRAY 
+PASS SAMPLER_2D_ARRAY_SHADOW 
+PASS SAMPLER_CUBE_SHADOW 
+PASS UNSIGNED_INT_VEC2 
+PASS UNSIGNED_INT_VEC3 
+PASS UNSIGNED_INT_VEC4 
+PASS INT_SAMPLER_2D 
+PASS INT_SAMPLER_3D 
+PASS INT_SAMPLER_CUBE 
+PASS INT_SAMPLER_2D_ARRAY 
+PASS UNSIGNED_INT_SAMPLER_2D 
+PASS UNSIGNED_INT_SAMPLER_3D 
+PASS UNSIGNED_INT_SAMPLER_CUBE 
+PASS UNSIGNED_INT_SAMPLER_2D_ARRAY 
+PASS DEPTH_COMPONENT32F 
+PASS DEPTH32F_STENCIL8 
+PASS FLOAT_32_UNSIGNED_INT_24_8_REV 
+PASS FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING 
+PASS FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE 
+PASS FRAMEBUFFER_ATTACHMENT_RED_SIZE 
+PASS FRAMEBUFFER_ATTACHMENT_GREEN_SIZE 
+PASS FRAMEBUFFER_ATTACHMENT_BLUE_SIZE 
+PASS FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE 
+PASS FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE 
+PASS FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE 
+PASS FRAMEBUFFER_DEFAULT 
+PASS DEPTH_STENCIL_ATTACHMENT 
+PASS DEPTH_STENCIL 
+PASS UNSIGNED_INT_24_8 
+PASS DEPTH24_STENCIL8 
+PASS UNSIGNED_NORMALIZED 
+PASS DRAW_FRAMEBUFFER_BINDING 
+PASS READ_FRAMEBUFFER 
+PASS DRAW_FRAMEBUFFER 
+PASS READ_FRAMEBUFFER_BINDING 
+PASS RENDERBUFFER_SAMPLES 
+PASS FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER 
+PASS MAX_COLOR_ATTACHMENTS 
+PASS COLOR_ATTACHMENT1 
+PASS COLOR_ATTACHMENT2 
+PASS COLOR_ATTACHMENT3 
+PASS COLOR_ATTACHMENT4 
+PASS COLOR_ATTACHMENT5 
+PASS COLOR_ATTACHMENT6 
+PASS COLOR_ATTACHMENT7 
+PASS COLOR_ATTACHMENT8 
+PASS COLOR_ATTACHMENT9 
+PASS COLOR_ATTACHMENT10 
+PASS COLOR_ATTACHMENT11 
+PASS COLOR_ATTACHMENT12 
+PASS COLOR_ATTACHMENT13 
+PASS COLOR_ATTACHMENT14 
+PASS COLOR_ATTACHMENT15 
+PASS FRAMEBUFFER_INCOMPLETE_MULTISAMPLE 
+PASS MAX_SAMPLES 
+PASS HALF_FLOAT 
+PASS RG 
+PASS RG_INTEGER 
+PASS R8 
+PASS RG8 
+PASS R16F 
+PASS R32F 
+PASS RG16F 
+PASS RG32F 
+PASS R8I 
+PASS R8UI 
+PASS R16I 
+PASS R16UI 
+PASS R32I 
+PASS R32UI 
+PASS RG8I 
+PASS RG8UI 
+PASS RG16I 
+PASS RG16UI 
+PASS RG32I 
+PASS RG32UI 
+PASS VERTEX_ARRAY_BINDING 
+PASS R8_SNORM 
+PASS RG8_SNORM 
+PASS RGB8_SNORM 
+PASS RGBA8_SNORM 
+PASS SIGNED_NORMALIZED 
+PASS COPY_READ_BUFFER 
+PASS COPY_WRITE_BUFFER 
+PASS COPY_READ_BUFFER_BINDING 
+PASS COPY_WRITE_BUFFER_BINDING 
+PASS UNIFORM_BUFFER 
+PASS UNIFORM_BUFFER_BINDING 
+PASS UNIFORM_BUFFER_START 
+PASS UNIFORM_BUFFER_SIZE 
+PASS MAX_VERTEX_UNIFORM_BLOCKS 
+PASS MAX_FRAGMENT_UNIFORM_BLOCKS 
+PASS MAX_COMBINED_UNIFORM_BLOCKS 
+PASS MAX_UNIFORM_BUFFER_BINDINGS 
+PASS MAX_UNIFORM_BLOCK_SIZE 
+PASS MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS 
+PASS MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS 
+PASS UNIFORM_BUFFER_OFFSET_ALIGNMENT 
+PASS ACTIVE_UNIFORM_BLOCKS 
+PASS UNIFORM_TYPE 
+PASS UNIFORM_SIZE 
+PASS UNIFORM_BLOCK_INDEX 
+PASS UNIFORM_OFFSET 
+PASS UNIFORM_ARRAY_STRIDE 
+PASS UNIFORM_MATRIX_STRIDE 
+PASS UNIFORM_IS_ROW_MAJOR 
+PASS UNIFORM_BLOCK_BINDING 
+PASS UNIFORM_BLOCK_DATA_SIZE 
+PASS UNIFORM_BLOCK_ACTIVE_UNIFORMS 
+PASS UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES 
+PASS UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER 
+PASS UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER 
+PASS INVALID_INDEX 
+PASS MAX_VERTEX_OUTPUT_COMPONENTS 
+PASS MAX_FRAGMENT_INPUT_COMPONENTS 
+PASS MAX_SERVER_WAIT_TIMEOUT 
+PASS OBJECT_TYPE 
+PASS SYNC_CONDITION 
+PASS SYNC_STATUS 
+PASS SYNC_FLAGS 
+PASS SYNC_FENCE 
+PASS SYNC_GPU_COMMANDS_COMPLETE 
+PASS UNSIGNALED 
+PASS SIGNALED 
+PASS ALREADY_SIGNALED 
+PASS TIMEOUT_EXPIRED 
+PASS CONDITION_SATISFIED 
+PASS WAIT_FAILED 
+PASS SYNC_FLUSH_COMMANDS_BIT 
+PASS VERTEX_ATTRIB_ARRAY_DIVISOR 
+PASS ANY_SAMPLES_PASSED 
+PASS ANY_SAMPLES_PASSED_CONSERVATIVE 
+PASS SAMPLER_BINDING 
+PASS RGB10_A2UI 
+PASS INT_2_10_10_10_REV 
+PASS TRANSFORM_FEEDBACK 
+PASS TRANSFORM_FEEDBACK_PAUSED 
+PASS TRANSFORM_FEEDBACK_ACTIVE 
+PASS TRANSFORM_FEEDBACK_BINDING 
+PASS TEXTURE_IMMUTABLE_FORMAT 
+PASS MAX_ELEMENT_INDEX 
+PASS TEXTURE_IMMUTABLE_LEVELS 
+PASS TIMEOUT_IGNORED 
+
diff --git a/LayoutTests/fast/canvas/webgl/webgl2/constants.html b/LayoutTests/fast/canvas/webgl/webgl2/constants.html
new file mode 100644 (file)
index 0000000..49b1287
--- /dev/null
@@ -0,0 +1,292 @@
+<!DOCTYPE html>
+<meta charset=utf-8>
+<title>WebGL2RenderingContext: constants</title>
+<script src="../../../../resources/testharness.js"></script>
+<script src="../../../../resources/testharnessreport.js"></script>
+<div id="log"></div>
+<script>
+let constants = [
+  ["READ_BUFFER", 0x0C02],
+  ["UNPACK_ROW_LENGTH", 0x0CF2],
+  ["UNPACK_SKIP_ROWS", 0x0CF3],
+  ["UNPACK_SKIP_PIXELS", 0x0CF4],
+  ["PACK_ROW_LENGTH", 0x0D02],
+  ["PACK_SKIP_ROWS", 0x0D03],
+  ["PACK_SKIP_PIXELS", 0x0D04],
+  ["COLOR", 0x1800],
+  ["DEPTH", 0x1801],
+  ["STENCIL", 0x1802],
+  ["RED", 0x1903],
+  ["RGB8", 0x8051],
+  ["RGBA8", 0x8058],
+  ["RGB10_A2", 0x8059],
+  ["TEXTURE_BINDING_3D", 0x806A],
+  ["UNPACK_SKIP_IMAGES", 0x806D],
+  ["UNPACK_IMAGE_HEIGHT", 0x806E],
+  ["TEXTURE_3D", 0x806F],
+  ["TEXTURE_WRAP_R", 0x8072],
+  ["MAX_3D_TEXTURE_SIZE", 0x8073],
+  ["UNSIGNED_INT_2_10_10_10_REV", 0x8368],
+  ["MAX_ELEMENTS_VERTICES", 0x80E8],
+  ["MAX_ELEMENTS_INDICES", 0x80E9],
+  ["TEXTURE_MIN_LOD", 0x813A],
+  ["TEXTURE_MAX_LOD", 0x813B],
+  ["TEXTURE_BASE_LEVEL", 0x813C],
+  ["TEXTURE_MAX_LEVEL", 0x813D],
+  ["MIN", 0x8007],
+  ["MAX", 0x8008],
+  ["DEPTH_COMPONENT24", 0x81A6],
+  ["MAX_TEXTURE_LOD_BIAS", 0x84FD],
+  ["TEXTURE_COMPARE_MODE", 0x884C],
+  ["TEXTURE_COMPARE_FUNC", 0x884D],
+  ["CURRENT_QUERY", 0x8865],
+  ["QUERY_RESULT", 0x8866],
+  ["QUERY_RESULT_AVAILABLE", 0x8867],
+  ["STREAM_READ", 0x88E1],
+  ["STREAM_COPY", 0x88E2],
+  ["STATIC_READ", 0x88E5],
+  ["STATIC_COPY", 0x88E6],
+  ["DYNAMIC_READ", 0x88E9],
+  ["DYNAMIC_COPY", 0x88EA],
+  ["MAX_DRAW_BUFFERS", 0x8824],
+  ["DRAW_BUFFER0", 0x8825],
+  ["DRAW_BUFFER1", 0x8826],
+  ["DRAW_BUFFER2", 0x8827],
+  ["DRAW_BUFFER3", 0x8828],
+  ["DRAW_BUFFER4", 0x8829],
+  ["DRAW_BUFFER5", 0x882A],
+  ["DRAW_BUFFER6", 0x882B],
+  ["DRAW_BUFFER7", 0x882C],
+  ["DRAW_BUFFER8", 0x882D],
+  ["DRAW_BUFFER9", 0x882E],
+  ["DRAW_BUFFER10", 0x882F],
+  ["DRAW_BUFFER11", 0x8830],
+  ["DRAW_BUFFER12", 0x8831],
+  ["DRAW_BUFFER13", 0x8832],
+  ["DRAW_BUFFER14", 0x8833],
+  ["DRAW_BUFFER15", 0x8834],
+  ["MAX_FRAGMENT_UNIFORM_COMPONENTS", 0x8B49],
+  ["MAX_VERTEX_UNIFORM_COMPONENTS", 0x8B4A],
+  ["SAMPLER_3D", 0x8B5F],
+  ["SAMPLER_2D_SHADOW", 0x8B62],
+  ["FRAGMENT_SHADER_DERIVATIVE_HINT", 0x8B8B],
+  ["PIXEL_PACK_BUFFER", 0x88EB],
+  ["PIXEL_UNPACK_BUFFER", 0x88EC],
+  ["PIXEL_PACK_BUFFER_BINDING", 0x88ED],
+  ["PIXEL_UNPACK_BUFFER_BINDING", 0x88EF],
+  ["FLOAT_MAT2x3", 0x8B65],
+  ["FLOAT_MAT2x4", 0x8B66],
+  ["FLOAT_MAT3x2", 0x8B67],
+  ["FLOAT_MAT3x4", 0x8B68],
+  ["FLOAT_MAT4x2", 0x8B69],
+  ["FLOAT_MAT4x3", 0x8B6A],
+  ["SRGB", 0x8C40],
+  ["SRGB8", 0x8C41],
+  ["SRGB8_ALPHA8", 0x8C43],
+  ["COMPARE_REF_TO_TEXTURE", 0x884E],
+  ["RGBA32F", 0x8814],
+  ["RGB32F", 0x8815],
+  ["RGBA16F", 0x881A],
+  ["RGB16F", 0x881B],
+  ["VERTEX_ATTRIB_ARRAY_INTEGER", 0x88FD],
+  ["MAX_ARRAY_TEXTURE_LAYERS", 0x88FF],
+  ["MIN_PROGRAM_TEXEL_OFFSET", 0x8904],
+  ["MAX_PROGRAM_TEXEL_OFFSET", 0x8905],
+  ["MAX_VARYING_COMPONENTS", 0x8B4B],
+  ["TEXTURE_2D_ARRAY", 0x8C1A],
+  ["TEXTURE_BINDING_2D_ARRAY", 0x8C1D],
+  ["R11F_G11F_B10F", 0x8C3A],
+  ["UNSIGNED_INT_10F_11F_11F_REV", 0x8C3B],
+  ["RGB9_E5", 0x8C3D],
+  ["UNSIGNED_INT_5_9_9_9_REV", 0x8C3E],
+  ["TRANSFORM_FEEDBACK_BUFFER_MODE", 0x8C7F],
+  ["MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS", 0x8C80],
+  ["TRANSFORM_FEEDBACK_VARYINGS", 0x8C83],
+  ["TRANSFORM_FEEDBACK_BUFFER_START", 0x8C84],
+  ["TRANSFORM_FEEDBACK_BUFFER_SIZE", 0x8C85],
+  ["TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN", 0x8C88],
+  ["RASTERIZER_DISCARD", 0x8C89],
+  ["MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS", 0x8C8A],
+  ["MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS", 0x8C8B],
+  ["INTERLEAVED_ATTRIBS", 0x8C8C],
+  ["SEPARATE_ATTRIBS", 0x8C8D],
+  ["TRANSFORM_FEEDBACK_BUFFER", 0x8C8E],
+  ["TRANSFORM_FEEDBACK_BUFFER_BINDING", 0x8C8F],
+  ["RGBA32UI", 0x8D70],
+  ["RGB32UI", 0x8D71],
+  ["RGBA16UI", 0x8D76],
+  ["RGB16UI", 0x8D77],
+  ["RGBA8UI", 0x8D7C],
+  ["RGB8UI", 0x8D7D],
+  ["RGBA32I", 0x8D82],
+  ["RGB32I", 0x8D83],
+  ["RGBA16I", 0x8D88],
+  ["RGB16I", 0x8D89],
+  ["RGBA8I", 0x8D8E],
+  ["RGB8I", 0x8D8F],
+  ["RED_INTEGER", 0x8D94],
+  ["RGB_INTEGER", 0x8D98],
+  ["RGBA_INTEGER", 0x8D99],
+  ["SAMPLER_2D_ARRAY", 0x8DC1],
+  ["SAMPLER_2D_ARRAY_SHADOW", 0x8DC4],
+  ["SAMPLER_CUBE_SHADOW", 0x8DC5],
+  ["UNSIGNED_INT_VEC2", 0x8DC6],
+  ["UNSIGNED_INT_VEC3", 0x8DC7],
+  ["UNSIGNED_INT_VEC4", 0x8DC8],
+  ["INT_SAMPLER_2D", 0x8DCA],
+  ["INT_SAMPLER_3D", 0x8DCB],
+  ["INT_SAMPLER_CUBE", 0x8DCC],
+  ["INT_SAMPLER_2D_ARRAY", 0x8DCF],
+  ["UNSIGNED_INT_SAMPLER_2D", 0x8DD2],
+  ["UNSIGNED_INT_SAMPLER_3D", 0x8DD3],
+  ["UNSIGNED_INT_SAMPLER_CUBE", 0x8DD4],
+  ["UNSIGNED_INT_SAMPLER_2D_ARRAY", 0x8DD7],
+  ["DEPTH_COMPONENT32F", 0x8CAC],
+  ["DEPTH32F_STENCIL8", 0x8CAD],
+  ["FLOAT_32_UNSIGNED_INT_24_8_REV", 0x8DAD],
+  ["FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING", 0x8210],
+  ["FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE", 0x8211],
+  ["FRAMEBUFFER_ATTACHMENT_RED_SIZE", 0x8212],
+  ["FRAMEBUFFER_ATTACHMENT_GREEN_SIZE", 0x8213],
+  ["FRAMEBUFFER_ATTACHMENT_BLUE_SIZE", 0x8214],
+  ["FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE", 0x8215],
+  ["FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE", 0x8216],
+  ["FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE", 0x8217],
+  ["FRAMEBUFFER_DEFAULT", 0x8218],
+  ["DEPTH_STENCIL_ATTACHMENT", 0x821A],
+  ["DEPTH_STENCIL", 0x84F9],
+  ["UNSIGNED_INT_24_8", 0x84FA],
+  ["DEPTH24_STENCIL8", 0x88F0],
+  ["UNSIGNED_NORMALIZED", 0x8C17],
+  ["DRAW_FRAMEBUFFER_BINDING", 0x8CA6], /* Same as FRAMEBUFFER_BINDING */
+  ["READ_FRAMEBUFFER", 0x8CA8],
+  ["DRAW_FRAMEBUFFER", 0x8CA9],
+  ["READ_FRAMEBUFFER_BINDING", 0x8CAA],
+  ["RENDERBUFFER_SAMPLES", 0x8CAB],
+  ["FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER", 0x8CD4],
+  ["MAX_COLOR_ATTACHMENTS", 0x8CDF],
+  ["COLOR_ATTACHMENT1", 0x8CE1],
+  ["COLOR_ATTACHMENT2", 0x8CE2],
+  ["COLOR_ATTACHMENT3", 0x8CE3],
+  ["COLOR_ATTACHMENT4", 0x8CE4],
+  ["COLOR_ATTACHMENT5", 0x8CE5],
+  ["COLOR_ATTACHMENT6", 0x8CE6],
+  ["COLOR_ATTACHMENT7", 0x8CE7],
+  ["COLOR_ATTACHMENT8", 0x8CE8],
+  ["COLOR_ATTACHMENT9", 0x8CE9],
+  ["COLOR_ATTACHMENT10", 0x8CEA],
+  ["COLOR_ATTACHMENT11", 0x8CEB],
+  ["COLOR_ATTACHMENT12", 0x8CEC],
+  ["COLOR_ATTACHMENT13", 0x8CED],
+  ["COLOR_ATTACHMENT14", 0x8CEE],
+  ["COLOR_ATTACHMENT15", 0x8CEF],
+  ["FRAMEBUFFER_INCOMPLETE_MULTISAMPLE", 0x8D56],
+  ["MAX_SAMPLES", 0x8D57],
+  ["HALF_FLOAT", 0x140B],
+  ["RG", 0x8227],
+  ["RG_INTEGER", 0x8228],
+  ["R8", 0x8229],
+  ["RG8", 0x822B],
+  ["R16F", 0x822D],
+  ["R32F", 0x822E],
+  ["RG16F", 0x822F],
+  ["RG32F", 0x8230],
+  ["R8I", 0x8231],
+  ["R8UI", 0x8232],
+  ["R16I", 0x8233],
+  ["R16UI", 0x8234],
+  ["R32I", 0x8235],
+  ["R32UI", 0x8236],
+  ["RG8I", 0x8237],
+  ["RG8UI", 0x8238],
+  ["RG16I", 0x8239],
+  ["RG16UI", 0x823A],
+  ["RG32I", 0x823B],
+  ["RG32UI", 0x823C],
+  ["VERTEX_ARRAY_BINDING", 0x85B5],
+  ["R8_SNORM", 0x8F94],
+  ["RG8_SNORM", 0x8F95],
+  ["RGB8_SNORM", 0x8F96],
+  ["RGBA8_SNORM", 0x8F97],
+  ["SIGNED_NORMALIZED", 0x8F9C],
+  ["COPY_READ_BUFFER", 0x8F36],
+  ["COPY_WRITE_BUFFER", 0x8F37],
+  ["COPY_READ_BUFFER_BINDING", 0x8F36], /* Same as COPY_READ_BUFFER */
+  ["COPY_WRITE_BUFFER_BINDING", 0x8F37], /* Same as COPY_WRITE_BUFFER */
+  ["UNIFORM_BUFFER", 0x8A11],
+  ["UNIFORM_BUFFER_BINDING", 0x8A28],
+  ["UNIFORM_BUFFER_START", 0x8A29],
+  ["UNIFORM_BUFFER_SIZE", 0x8A2A],
+  ["MAX_VERTEX_UNIFORM_BLOCKS", 0x8A2B],
+  ["MAX_FRAGMENT_UNIFORM_BLOCKS", 0x8A2D],
+  ["MAX_COMBINED_UNIFORM_BLOCKS", 0x8A2E],
+  ["MAX_UNIFORM_BUFFER_BINDINGS", 0x8A2F],
+  ["MAX_UNIFORM_BLOCK_SIZE", 0x8A30],
+  ["MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS", 0x8A31],
+  ["MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS", 0x8A33],
+  ["UNIFORM_BUFFER_OFFSET_ALIGNMENT", 0x8A34],
+  ["ACTIVE_UNIFORM_BLOCKS", 0x8A36],
+  ["UNIFORM_TYPE", 0x8A37],
+  ["UNIFORM_SIZE", 0x8A38],
+  ["UNIFORM_BLOCK_INDEX", 0x8A3A],
+  ["UNIFORM_OFFSET", 0x8A3B],
+  ["UNIFORM_ARRAY_STRIDE", 0x8A3C],
+  ["UNIFORM_MATRIX_STRIDE", 0x8A3D],
+  ["UNIFORM_IS_ROW_MAJOR", 0x8A3E],
+  ["UNIFORM_BLOCK_BINDING", 0x8A3F],
+  ["UNIFORM_BLOCK_DATA_SIZE", 0x8A40],
+  ["UNIFORM_BLOCK_ACTIVE_UNIFORMS", 0x8A42],
+  ["UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES", 0x8A43],
+  ["UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER", 0x8A44],
+  ["UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER", 0x8A46],
+  ["INVALID_INDEX", 0xFFFFFFFF],
+  ["MAX_VERTEX_OUTPUT_COMPONENTS", 0x9122],
+  ["MAX_FRAGMENT_INPUT_COMPONENTS", 0x9125],
+  ["MAX_SERVER_WAIT_TIMEOUT", 0x9111],
+  ["OBJECT_TYPE", 0x9112],
+  ["SYNC_CONDITION", 0x9113],
+  ["SYNC_STATUS", 0x9114],
+  ["SYNC_FLAGS", 0x9115],
+  ["SYNC_FENCE", 0x9116],
+  ["SYNC_GPU_COMMANDS_COMPLETE", 0x9117],
+  ["UNSIGNALED", 0x9118],
+  ["SIGNALED", 0x9119],
+  ["ALREADY_SIGNALED", 0x911A],
+  ["TIMEOUT_EXPIRED", 0x911B],
+  ["CONDITION_SATISFIED", 0x911C],
+  ["WAIT_FAILED", 0x911D],
+  ["SYNC_FLUSH_COMMANDS_BIT", 0x00000001],
+  ["VERTEX_ATTRIB_ARRAY_DIVISOR", 0x88FE],
+  ["ANY_SAMPLES_PASSED", 0x8C2F],
+  ["ANY_SAMPLES_PASSED_CONSERVATIVE", 0x8D6A],
+  ["SAMPLER_BINDING", 0x8919],
+  ["RGB10_A2UI", 0x906F],
+  ["INT_2_10_10_10_REV", 0x8D9F],
+  ["TRANSFORM_FEEDBACK", 0x8E22],
+  ["TRANSFORM_FEEDBACK_PAUSED", 0x8E23],
+  ["TRANSFORM_FEEDBACK_ACTIVE", 0x8E24],
+  ["TRANSFORM_FEEDBACK_BINDING", 0x8E25],
+  ["TEXTURE_IMMUTABLE_FORMAT", 0x912F],
+  ["MAX_ELEMENT_INDEX", 0x8D6B],
+  ["TEXTURE_IMMUTABLE_LEVELS", 0x82DF],
+
+  ["TIMEOUT_IGNORED", -1],
+];
+
+let context;
+setup(function() {
+  window.internals.settings.setWebGL2Enabled(true);
+
+  context = document.createElement("canvas").getContext("webgl2");
+  if (!context) {
+    throw new Error("Could not create webgl2 context");
+  }
+});
+
+for (var [name, value] of constants) {
+  test(function() {
+    assert_equals(context[name], value);
+    assert_equals(WebGL2RenderingContext[name], value);
+  }, name);
+}
+</script>
index 7f9a2b6..951e826 100644 (file)
@@ -1,3 +1,19 @@
+2017-09-25  Ms2ger  <Ms2ger@igalia.com>
+
+        Update waitSync and the TIMEOUT_IGNORED constant to use signed integers.
+        https://bugs.webkit.org/show_bug.cgi?id=177239
+
+        Reviewed by Žan Doberšek.
+
+        This matches the specification.
+
+        Test: fast/canvas/webgl/webgl2/constants.html
+
+        * html/canvas/WebGL2RenderingContext.cpp:
+        (WebCore::WebGL2RenderingContext::waitSync):
+        * html/canvas/WebGL2RenderingContext.h:
+        * html/canvas/WebGL2RenderingContext.idl:
+
 2017-09-25  Nael Ouedraogo  <nael.ouedraogo@crf.canon.fr>
 
         Align Media Source Extension IDL with spec
index 6b96e24..6af5266 100644 (file)
@@ -838,7 +838,7 @@ GC3Denum WebGL2RenderingContext::clientWaitSync(WebGLSync&, GC3Dbitfield, GC3Dui
     return 0;
 }
 
-void WebGL2RenderingContext::waitSync(WebGLSync&, GC3Dbitfield, GC3Duint64)
+void WebGL2RenderingContext::waitSync(WebGLSync&, GC3Dbitfield, GC3Dint64)
 {
 }
 
index 852dbd6..23a8f0e 100644 (file)
@@ -138,7 +138,7 @@ public:
     GC3Dboolean isSync(WebGLSync*);
     void deleteSync(WebGLSync*);
     GC3Denum clientWaitSync(WebGLSync&, GC3Dbitfield flags, GC3Duint64 timeout);
-    void waitSync(WebGLSync&, GC3Dbitfield flags, GC3Duint64 timeout);
+    void waitSync(WebGLSync&, GC3Dbitfield flags, GC3Dint64 timeout);
     WebGLAny getSyncParameter(WebGLSync&, GC3Denum pname);
     
     // Transform feedback
index eb856d8..80a6630 100644 (file)
@@ -337,7 +337,7 @@ typedef (ImageData or HTMLImageElement or HTMLCanvasElement or HTMLVideoElement)
     const GLenum TEXTURE_IMMUTABLE_LEVELS                      = 0x82DF;
     const GLenum VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE             = 0x88FE;
 
-    const GLuint64 TIMEOUT_IGNORED                             = 0xFFFFFFFFFFFFFFFF;
+    const GLint64 TIMEOUT_IGNORED                              = -1;
 
     /* Buffer objects */
     void bufferData(GLenum target, ArrayBufferView data, GLenum usage, GLuint srcOffset, optional GLuint length = 0);
@@ -432,7 +432,7 @@ typedef (ImageData or HTMLImageElement or HTMLCanvasElement or HTMLVideoElement)
     GLboolean isSync(WebGLSync? sync);
     void deleteSync(WebGLSync? sync);
     GLenum clientWaitSync(WebGLSync sync, GLbitfield flags, GLuint64 timeout);
-    void waitSync(WebGLSync sync, GLbitfield flags, GLuint64 timeout);
+    void waitSync(WebGLSync sync, GLbitfield flags, GLint64 timeout);
     [OverrideIDLType=IDLWebGLAny] any getSyncParameter(WebGLSync sync, GLenum pname);
 
     /* Transform Feedback */