Bug 217381 - REGRESSION: Fails array of uniform sampler2D
Summary: REGRESSION: Fails array of uniform sampler2D
Status: RESOLVED DUPLICATE of bug 215630
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebGL (show other bugs)
Version: Safari 14
Hardware: Mac macOS 10.15
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-10-06 05:56 PDT by konstantin.plotnikov
Modified: 2020-10-08 01:13 PDT (History)
3 users (show)

See Also:


Attachments
Code to reproduse see lines: 17 to 30 (8.54 KB, text/html)
2020-10-06 05:56 PDT, konstantin.plotnikov
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description konstantin.plotnikov 2020-10-06 05:56:55 PDT
Created attachment 410628 [details]
Code to reproduse see lines: 17 to 30

The issue seems to be the regression from Safari 13.

What goes wrong:
When there is a uniform sampler2d array in the shader safari 14 seems to use the wrong index within an array. The issue can't be reproduced in Safari 13

Steps to reporoduce:
In the attachment fragment shader uses a two element uniform sampler2d array. When the texture uses 0 slot and in the fragment shader 0 slot is being read, then it fails. Lines 23 to 25 the same but (sampler2d.length - 1) is read in the shader everything works as expected. If the texture is 1x1 pixels then everything works as expected (lines 28 to 30). FF and Chrome work in the similar way to Safari 13
Comment 1 Radar WebKit Bug Importer 2020-10-07 22:04:55 PDT
<rdar://problem/70079753>
Comment 2 Kimmo Kinnunen 2020-10-08 01:13:31 PDT
Thanks for the report!

To clarify:
Expected rendering is red-green rectangle when TEX_POSITION == TEX_POSITION_SHADER
Actual rendering is black.

Working case:
TEX_POSITION = 1
TEX_POSITION_SHADER = 1


Not-working case:
TEX_POSITION = 0
TEX_POSITION_SHADER = 0

Marking as duplicate of bug 215630.

*** This bug has been marked as a duplicate of bug 215630 ***