-
Notifications
You must be signed in to change notification settings - Fork 279
Driver issues
Nicolas Silva edited this page Sep 28, 2020
·
105 revisions
See also:
#1157 - Varying structs
- Description: Using varying structs can cause shader errors.
- Workaround: Not use structs for varyings.
- OS: Windows (GL and ANGLE)
- Vendors: Intel, Nvidia
- Driver versions: NVIDIA 381.65, ???
- See also: Issue#1136
Servo#13953 - Mac glsl compiler bug.
- Description: GLSL complier fails to parse the function get_fetch_uv in prim_shared.glsl.
- Workaround: This particular function was turned into a
#define
macro. - OS: Mac
- Vendors:Intel
- Driver versions: Intel Iris 6100, Intel HD 5300, Intel HD 6000
??? - Mac glsl compiler bug realted to logical operators in #if
blocks.
- Description: Found the diff but not the detailed issue. Most likely a shader compiler error with logical opertors in
#if
conditions like#if FOO == 1 && BAR == 1
. - Workaround: Nest #if blocks instead.
- OS: Mac
- Vendors: ???
- Driver versions: ???
#105 - Inset shadow with border radius crash
- Workaround: issue, accidentally fixed, we don't know how.
- OS: Mac
#650 - Terrible performance of sub-texture uploads on some mobile devices.
- Description: glTexSubImage is extremely slow on some devices (usually old ones).
- Workaround: None (maybe driver blocklist?).
- OS: Android
- Devices: SGX540, SGX530, Adreno200, Adreno205, (...)
#1242 - LLVM hang during shader compilation
- Description: Heavy inlining of the shader code may cause a hangup in llvmpipe. Note: while this appears to be particularly bad in llvmpipe, other shader compilers are noticeably affected.
- Workaround: Move function invocations outside of the
switch/case
arms. - OS: Any
- Description: a GLSL return statement with a heavy struct constructor fails to compile
- Workaround: move the construction outside of the return
- OS: Windows 10 Fall Creators Update x64, other?
- Vendor: Intel
- Driver versions: Intel HD Graphics 530 version 22.20.16.4735, other?
#1285 - declarations in switch cases
- Description: declarations inside a
case
arm of aswitch
statement confuse the shader compiler. This also applies to ternary operators, which don't appear to be declarations but are actually expanded with the use of temporary variables by Angle. - Workaround: wrap the
case
handling code into curly{
braces}
as a block. - OS: Any
#1395 - TODO
#1403 - TODO
#1260 - Broken GL context reports max texture size equal to zero.
- Description: A maximum texture size of zero is reported which causes webrender to hit an assertion as soon as a it decides to allocate a page for the texture cache.
- Workaround: Detect this during initialization and cancel the initialization with a meaningful error message.
- Configurations: Some versions of the proprietary nvidia driver on linux (TODO: need details).
#1601 - GPR limit exceeded (shader requiring too many registers).
- Description: Shader compilation fails with error log:
EE r600_shader.c:3661 r600_shader_from_tgsi - GPR limit exceeded - shader requires 305 registers
EE r600_shader.c:183 r600_pipe_shader_create - translation from TGSI failed !
- Configurations: Radeon HD 2400 XT running Mesa 17.1.6 on Linux
#1694 - texelFetchOffset
is very buggy on some Android GPUs.
- Description: See https://bugs.chromium.org/p/chromium/issues/detail?id=642605
- Workaround: rewrite
texelFetchOfsset
totexelFetch
. - OS: Android
- Devices: Google Pixel, Nexus 6, (...)
- Description: e.g.
bvec2(glyph_index % 2 == 1)
- Workaround:
bvec2(glyph_index % 2 != 0)
- OS: macOS, ???
- Vendor: Intel
- Driver versions: Intel HD Graphics 530, 550, ???
#1810 - Incorrect integer arithmetic in shader on Mac under certain conditions.
- Description: reading from integer variables (or integer arguments) when doing any kind of integer calculation, in the right circumstances, produces incorrect results. Integer function arguments seem to be part of the circumstances.
- Workaround: Pass/store some values as floats and cast them to integers or move pieces of the code until the "right circumstances go away".
- Vendor: Intel
- Driver versions: Intel HD graphics 530, ???
pathfinder/#55 - Early return condition is never taken on macOS Nvidia
- Edit: This may actually be an instance of https://bugs.chromium.org/p/chromium/issues/detail?id=307751 since the condition did involve a short-circuiting operator.
- Description: Some early return if conditions are never taken when they should be, whether it crops up seems to also depend on control flow later on. Edit: it might be ones with short-circuiting logical operators.
- Workaround: Put the condition in a new
bool
variable and useif(myVar)
instead of putting the condition expression in the if statement. - Vendor: Nvidia/Apple
- Driver versions: Whatever is used for the Nvidia GT 750m in 2014 rMBPs
#2280 - Resizing with glTexImage3D
on ANGLE.
- Description: ANGLE is confused when calling
glTexImage3D
with similar parameters that the texture already has, causing some elements to flicker. - Workaround: Reset the 3d texture contents before resizing.
- OS: Windows
- Vendor: ANGLE.
- Versions: ??
- Upstream fix: https://chromium-review.googlesource.com/c/angle/angle/+/862256
- Description: When converting shaders to HLSL with SPIRV-Cross, any switch statement without
default
case fails to compile with error "Not all control paths return a value" - Workaround: Add
default
case. - OS: Windows
- Vendor: SPIRV-Cross
- Description: Angle doesn't update the driver metadata about samplers on program change. This metadata has
baseLevel
that is forcefully used in ourtextureSize
as Angle's internal workaround for some NVidia hardware. As a result,baseLevel
may turn out to be garbage, andtextureSize
returns zeroes at best, and crashes the driver at worst. - Workaround: Convince Angle that
sCacheXXX
samplers are always used in all shaders. - OS: Windows Angle
- Vendors: Nvidia
- Versions: ?
- Upstream fix: https://chromium-review.googlesource.com/c/angle/angle/+/949412
#2530 - Division by zero on SandyBridge in the fragment shader
- Description: https://bugzilla.mozilla.org/show_bug.cgi?id=1441025. We were unpremultiplying by dividing by the alpha component, applying a filter and then repremultiplying. It seems like Sandybridge doesn't guarantee that (x/0.)*0. = 0.
- Workaround: Don't divide by zero
- OS: Linux Mesa
- Vendors: Intel
- Versions: ?
#2623 - Unused vertex attributes in SPIR-V
- Description: unused vertex attributes are successfully compiled out by a driver's GLSL compiler. However, this is not the case for GLSL -> SPIRV shader pipelines we are going to use for supporting Vulkan, DX12, and Metal.
- Workaround: make sure that no vertex attribute declarations present in the shader code by accident/laziness
#2826 - Varying arrays
- Description: using varying arrays or matrices works fine for
OpenGL
,GLSL -> SPIRV -> Vulkan
andDX12
. But causes an error forMetal
:"The vertex function output structure may not include a matrix or array."
- Workaround: Don't use matrix or array in vertex output structure.
#2864 - Mac glsl compiler bug with integer comparisons.
- Description: GLSL compiler produces undefined results when comparing for equality with a reasonably large integer constant.
- Workaround: in our particular case, replacing "==" with ">=" worked
- OS: Mac
- Vendors:Intel
- Driver versions: Intel Graphics 550, 6100
#3540 - Mac glsl compiler bug with integer comparison (take two).
- Description: Might be the same as the previous item. The GLSL compiler produces undefined results when comparing for equality with a constant (not necessarily large).
- Workaround: Replaced the
if
branch with aswitch
statement. - OS: Mac (Mojave)
- Hardware: Intel HD Graphics 515 (not reproduced on Intel Iris Pro 1536 MB, Mac High Sierra)
#3004 - Slow flat varying implementation in ANGLE
- Description: Because D3D11 and GLES3 don't use the same provoking vertex, ANGLE generates a geometry shader to paper over the difference. See https://chromium-review.googlesource.com/c/angle/angle/+/309155 and https://bugs.chromium.org/p/angleproject/issues/detail?id=754
- Workaround: Don't use flat varyings the shaders.
- OS: Windows
Bug 1496168 - ANGLE generates mipmaps in places where we don't want them
- Description: (TODO)
- Workaround: Using glTexStorage where available.
- OS: Windows
Bug 1505664 - Increasing shared texture cache to 64 layers breaks rendering on mac intel OpenGL driver
- Description: https://searchfox.org/mozilla-central/rev/358f816f63da072145c593e9e2ac36b7250ecd25/gfx/wr/webrender/src/texture_cache.rs#526
- Workaround: Limit the shared texture cache to 32 layers on mac.
- OS: Mac (MBP, integrated Intel graphics (discrete Radeon GPU does not have this problem).
Bug 1505508 - glBlitFramebuffer and glCopyTex(Sub)Image* don't work correctly with texture arrays on Adreno
- Description: On Adreno GPUs glBlitFramebuffer always writes to the 0th layer of a texture array, regardless of which layer is actually bound to the draw framebuffer. Similarily, glCopyTex(Sub)Image* always reads from the 0th layer. This means we cannot copy texture data directly from one texture array to another using these methods.
- OS: Android
- Workaround: glBlitFramebuffer from src layer in to a renderbuffer, then glCopyTexSubImage3D from renderbuffer to dst layer. This is an extra copy but will work everywhere. glCopyImageSubData would be the optimal workaround, but is not always available.
Bug 1513185 Blitting from a texture array to the main framebuffer broken on Adreno 3xx
- Description: It seems like blitting layer i actually blits layers i..n, which means we're copying pixels a lot more times than we want to.
- OS Android
- Hardware: Adreno 3xx
- Workaround: At the moment we only blit from textrue arrays to framebuffer in the texture cache debug overlay. We might want to only ask it to blit layer 0 rather than 0..n.
Bug 1513185 Broken PBO uploads depending on stride on Adreno 3xx
- Description: PBO uploads where the stride is a multiple of 128 bytes always write the data to the 0th layer of a texture array.
- OS Android
- Hardware: Adreno 3xx
Bug 1505871 - Assignment to varying flat arrays inside switch statement of vertex shader suspected miscompile on Windows
- Description: On Windows there seems to be a miscompilation when assigning to a varying flat array inside a switch statement in a vertex shader. The assignments don't happen unless you do them outside the switch statement. See comment 34 of the bug for more details.
- Workaround: Move the assignment out of the switch statement.
- OS: Windows
Bug 1532245 - switch statement inside control flow inside switch statement fails to compile on some Android phones
- Description: On some Android phones you get a shader compile error if you have a switch statement inside some other control flow inside a switch statement: "ERROR: 0:1448: '' : No default label can be nested inside other control flow nested within their corresponding switch"
- Workaround: refactor the nested switch statement and/or control flow to a function
- OS: Android
Bug 1570736 - texture swizzling affects wrap modes on some Intel GPUs
- Description: On some Mac+Intel configurations, configuring the texture unit's
GL_TEXTURE_SWIZZLE_?
parameters changes the wrap modes, breaking any sampling from the texture. The platform affected reportsGL_ARB_texture_swizzle
to be supported. - OS: Mac
- Hardware: Intel HD4000 and HD3000.
- Workaround: don't use swizzling - set
RendererOptions::allow_texture_swizzling = false
via blocklist on affected configurations.
Bug 1555056 - Android emulator version 29 claims to support BGRA textures but errors for 3d textures
- Description: Previous versions of the android emulator did not claim to support GL_EXT_texture_format_BGRA8888, but version 29+ does. However, glTexImage3D always fails with a GL_INVALID_ENUM error. This has been reported upstream here. It has been fixed for the GPU backend, but not for the swiftshader backend yet.
- Workaround: Use swizzling (or use the GPU backend, or one day we might use only 2d textures)
Bug 1555002 - glBlitFramebuffer fails on the Android emulator when blitting to or from a 3D texture
- Description: glBlitFramebuffer fails and results in a GL_INVALID_OPERATION error when blitting to or from a framebuffer attached to a 3D texture layer. This only affects the swiftshader backend. It has been reported upstream here. It has been fixed in swiftshader, but the version of swiftshader used by the emulator has not yet been updated.
- Workaround: Use the emulator's GPU backend
Bug 1558167 - Texture uploads require the byte stride of 256 on AMD GPUs with macOS 10.15
- Description: We upload data to textures using PBOs. OpenGL allows any stride between lines, but in this case we see the data corruption if the stride is not aligned to 256 bytes.
- Workaround: Forcefully align the stride before uploading.
- OS: macOS 10.15
- Hardware: AMD
Bug 1603783 PBO uploads with non-zero broken on AMD MacOS 10.15
- Descrition: See https://bugzilla.mozilla.org/show_bug.cgi?id=1603783#c2
- OS: MacOS 10.15
- Hardware: AMD
Bug 1591945 - Android emulator crash reading non-null-terminated shader sources with length argument.
- Description: When the length argument in glShaderSource is not zero, the shader compiler should read up to the specified length instead of looking for
\0
. On the Android emulator this causes a crash. - Platform: Android emulator.
Bug 1598440 - Webrender on android emulator fails to initialize
- Description: On certain platforms (Linux with AMD for example), Webrender does not initialize on the android emulator even after forcing it as it requires OpenGL ES 3.0.
- Workaround: To force enable the emulator to allow OpenGL ES 3, you can run this on host:
echo "GLESDynamicVersion = on" >> ~/.android/advancedFeatures.ini
- Platform: Android emulator
Bug 1594128 - GLSL on macOS is confused by a function that just returns a constant.
- Description: using an empty function like
int vecs_per_brush() { return VECS_PER_SPECIFIC_BRUSH; }
doesn't produce the expected result - Workaround: use a define instead of a function
- Platform: macOS
Bug 1601060 - Shader compilation error when masking a signed integer.
- Description: If the bit mask is a literal that can't be represented as a signed integer, some shader compilers detect it and throw an error about the overflow.
- Workarounds: avoid masks that involve the sign bit or make sure the involved integers are unsigned.
- Platform: Z3C running LineageOS 16 (Android 9) Adreno 330
Bug 1613595 - Incorrect gradient rendering on Adreno 510.
- Description: Gradient render incorrectly. Changes to the shader code's structure lead to changes in the glitch.
- Platform: Adreno 510 (Xiaomi Redmi Note 3)
The number of layers in a texture array affects rendering (bug 1616901)
- Description: Changing the number of allocated layers in the texture cache's texture array caused a lot of fuzzy differences in reftests on Android and Mac. We suspect that it affects some arithmetic behind texture coordinates and sampling.
- Platforms: Android, Mac
Bug 1652763 - Glitches on macOS Intel with clears
- Description: when we stop using per-vertex attributes, scissored clears become occasionally broken.
- Workaround: use quad drawing instead of scissored clears
- OS: MacOS 10.15
- Hardware: Intel
Bug 1640960 - FBO readback is broken on macOS Intel in some contexts
- Description: when we stop using per-vertex attributes, FBO readbacks mostly don't work
- Workaround: bind a VAO with the first attribute enabled (per-vertex) before doing the readback
- OS: MacOS 10.15
- Hardware: Intel
Bug 1640960 - SSBO updates are sometimes broken on OsMesa
- Description: when enabling the SSBO path instead of instanced attributes, sometimes the data appears corrupted when read by shaders. Presumably, this happens if it exceeds a certain size.
- Workaround: don't use SSBO path on OsMesa
- Description: Not a bug per say, but impacts design decisions. Despite existing since 2011, we can't rely on base-instance everywhere, making it hard to group multiple batches into large vertex buffers.
- Workaround: Bug 1640960
Bug 1663355 and Bug 1558374 - Partial updates to offscreen render targets sometimes fail on Mali-Gxx
- Description: Partial updates to offscreen render targets can fail (leaving previous texture contents or a mixture of old and new behind). The pattern of stale content appears to be in small squares, perhaps 16x16 indicating a bug in Mali's tiler.
- Workaround: Clear entire render target (with scissor test disabled) before rendering
Bug 1663344 - brush_blend vertex shader switch statement miscompiles on Intel Gen6 when lowered to if chain by glslopt.
- Workaround manually lower the switch statement into an if chain to avoid glslopt doing it.