diff --git a/dom/canvas/test/webgl-conf/generated-mochitest.ini b/dom/canvas/test/webgl-conf/generated-mochitest.ini index f569a0315a7f..dda7ff0930a8 100644 --- a/dom/canvas/test/webgl-conf/generated-mochitest.ini +++ b/dom/canvas/test/webgl-conf/generated-mochitest.ini @@ -5340,7 +5340,6 @@ fail-if = 1 subsuite = webgl2-core [generated/test_2_conformance2__rendering__instanced-rendering-large-divisor.html] subsuite = webgl2-core -skip-if = (os == 'win') [generated/test_2_conformance2__rendering__line-rendering-quality.html] subsuite = webgl2-core [generated/test_2_conformance2__rendering__multisampling-fragment-evaluation.html] diff --git a/dom/canvas/test/webgl-conf/mochitest-errata.ini b/dom/canvas/test/webgl-conf/mochitest-errata.ini index c68aad55fb2d..13552c2fd919 100644 --- a/dom/canvas/test/webgl-conf/mochitest-errata.ini +++ b/dom/canvas/test/webgl-conf/mochitest-errata.ini @@ -1172,6 +1172,3 @@ skip-if = (os == 'win') skip-if = (os == 'win') [generated/test_2_conformance__textures__misc__tex-video-using-tex-unit-non-zero.html] skip-if = (os == 'win') -[generated/test_2_conformance2__rendering__instanced-rendering-large-divisor.html] -# Assertion failed: static_cast(packedAttrib.divisor) == divisor, file z:/build/build/src/gfx/angle/checkout/src/libANGLE/renderer/d3d/d3d11/InputLayoutCache.cpp, line 89 -skip-if = (os == 'win') diff --git a/gfx/angle/checkout/out/gen/angle/id/commit.h b/gfx/angle/checkout/out/gen/angle/id/commit.h index 80c8f7a2a2ad..00d8083f5133 100644 --- a/gfx/angle/checkout/out/gen/angle/id/commit.h +++ b/gfx/angle/checkout/out/gen/angle/id/commit.h @@ -1,3 +1,3 @@ -#define ANGLE_COMMIT_HASH "598f2502e3a4" +#define ANGLE_COMMIT_HASH "790e8e6b4179" #define ANGLE_COMMIT_HASH_SIZE 12 -#define ANGLE_COMMIT_DATE "2018-10-09 13:54:05 -0700" +#define ANGLE_COMMIT_DATE "2018-10-09 17:41:46 -0700" diff --git a/gfx/angle/checkout/src/libANGLE/renderer/d3d/d3d11/InputLayoutCache.cpp b/gfx/angle/checkout/src/libANGLE/renderer/d3d/d3d11/InputLayoutCache.cpp index 934503f5798a..84d9681678cd 100644 --- a/gfx/angle/checkout/src/libANGLE/renderer/d3d/d3d11/InputLayoutCache.cpp +++ b/gfx/angle/checkout/src/libANGLE/renderer/d3d/d3d11/InputLayoutCache.cpp @@ -59,7 +59,8 @@ struct PackedAttribute uint8_t attribType; uint8_t semanticIndex; uint8_t vertexFormatType; - uint8_t divisor; + uint8_t dummyPadding; + uint32_t divisor; }; } // anonymous namespace @@ -81,17 +82,18 @@ void PackedAttributeLayout::addAttributeData(GLenum glType, packedAttrib.attribType = static_cast(attribType); packedAttrib.semanticIndex = static_cast(semanticIndex); packedAttrib.vertexFormatType = static_cast(vertexFormatType); - packedAttrib.divisor = static_cast(divisor); + packedAttrib.dummyPadding = 0u; + packedAttrib.divisor = static_cast(divisor); ASSERT(static_cast(packedAttrib.attribType) == attribType); ASSERT(static_cast(packedAttrib.semanticIndex) == semanticIndex); ASSERT(static_cast(packedAttrib.vertexFormatType) == vertexFormatType); ASSERT(static_cast(packedAttrib.divisor) == divisor); - static_assert(sizeof(uint32_t) == sizeof(PackedAttribute), - "PackedAttributes must be 32-bits exactly."); + static_assert(sizeof(uint64_t) == sizeof(PackedAttribute), + "PackedAttributes must be 64-bits exactly."); - attributeData[numAttributes++] = gl::bitCast(packedAttrib); + attributeData[numAttributes++] = gl::bitCast(packedAttrib); } bool PackedAttributeLayout::operator==(const PackedAttributeLayout &other) const diff --git a/gfx/angle/checkout/src/libANGLE/renderer/d3d/d3d11/InputLayoutCache.h b/gfx/angle/checkout/src/libANGLE/renderer/d3d/d3d11/InputLayoutCache.h index 4b1ebf575815..55fda46604e6 100644 --- a/gfx/angle/checkout/src/libANGLE/renderer/d3d/d3d11/InputLayoutCache.h +++ b/gfx/angle/checkout/src/libANGLE/renderer/d3d/d3d11/InputLayoutCache.h @@ -48,7 +48,7 @@ struct PackedAttributeLayout uint32_t numAttributes; uint32_t flags; - gl::AttribArray attributeData; + gl::AttribArray attributeData; }; } // namespace rx diff --git a/gfx/angle/cherry_picks.txt b/gfx/angle/cherry_picks.txt index 214d060acfb2..0045a11924e6 100644 --- a/gfx/angle/cherry_picks.txt +++ b/gfx/angle/cherry_picks.txt @@ -1,3 +1,23 @@ +commit 790e8e6b417905eca335d06c16ec54c977188110 +Author: Olli Etuaho +Date: Thu Sep 20 13:20:50 2018 +0300 + + Fix using a large vertex attrib divisor on D3D11 + + A divisor >= 256 used to trigger an assert on the D3D11 backend since + it couldn't fit into the input layout cache. Increase the space + reserved for the divisor in the input layout cache to make sure that + the correct input layout will get used and to fix the assert. + + BUG=angleproject:2832 + TEST=angle_end2end_tests + + Change-Id: I34eead6c4e8c4fea379bbafc8670b4e32a5b633b + Reviewed-on: https://chromium-review.googlesource.com/1236293 + Reviewed-by: Jamie Madill + Reviewed-by: Geoff Lang + Commit-Queue: Olli Etuaho + commit 598f2502e3a41b76d90037e7858c43c18e66399d Merge: 8212058a6 e15a25c6f Author: Jeff Gilbert