| Summary: | ANGLE Metal: single-component swizzles do not compile | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Raúl <rloza> | ||||||||
| Component: | WebGL | Assignee: | Kimmo Kinnunen <kkinnunen> | ||||||||
| Status: | RESOLVED FIXED | ||||||||||
| Severity: | Normal | CC: | daveh, dino, eric.r, ews-watchlist, gman, kbr, kkinnunen, kondapallykalyan, kpiddington, markus, webkit-bug-importer | ||||||||
| Priority: | P2 | Keywords: | InRadar | ||||||||
| Version: | Other | ||||||||||
| Hardware: | Unspecified | ||||||||||
| OS: | Unspecified | ||||||||||
| See Also: | https://bugs.webkit.org/show_bug.cgi?id=230949 | ||||||||||
| Bug Depends on: | |||||||||||
| Bug Blocks: | 240433 | ||||||||||
| Attachments: |
|
||||||||||
|
Description
Raúl
2021-09-19 23:07:54 PDT
Created attachment 438645 [details]
translation and errors
program_source:106:12: error: no matching constructor for initialization of 'ANGLE_VectorElemRef<float, 3>'
return ANGLE_VectorElemRef<T, N>(vec, is);
^ ~~~~~~~
program_source:216:6: note: in instantiation of function template specialization 'ANGLE_swizzle_ref<float, 3>' requested here
aW(ANGLE_swizzle_ref(aQ, 0));
^
program_source:65:5: note: candidate constructor not viable: no known conversion from 'const int [1]' to 'int' for 2nd argument
ANGLE_VectorElemRef(thread metal::vec<T, N> &vec, int index)
^
program_source:59:8: note: candidate constructor (the implicit copy constructor) not viable: requires 1 argument, but 2 were provided
struct ANGLE_VectorElemRef
^
program_source:59:8: note: candidate constructor (the implicit copy constructor) not viable: requires 1 argument, but 2 were provided
program_source:59:8: note: candidate constructor (the implicit copy constructor) not viable: requires 1 argument, but 2 were provided
program_source:59:8: note: candidate constructor (the implicit copy constructor) not viable: requires 1 argument, but 2 were provided
program_source:59:8: note: candidate constructor (the implicit copy constructor) not viable: requires 1 argument, but 2 were provided
program_source:59:8: note: candidate constructor (the implicit copy constructor) not viable: requires 1 argument, but 2 were provided
Thanks for the report. Will post a fix shortly. Created attachment 438705 [details]
Patch
Note that there are important steps to take when updating ANGLE. See https://trac.webkit.org/wiki/UpdatingANGLE Committed r282800 (241932@main): <https://commits.webkit.org/241932@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 438705 [details]. Same issue with iOS and iPadOS 15.1 Beta 2 Safari. In MacOS Safari, FireFox, Chrome last versions works perfectly. Most of blend4web examples in they website don't work to. https://www.blend4web.com/apps/code_snippets/code_snippets.html?scene=material_api Console log: [Error] B4W ERROR: Shader compilation/linking error: main.glslv, main_stack.glslf, materials: "DEFAULT" d (output.5e52a835b47f.js:1:1026) Q (output.5e52a835b47f.js:29:288) ia (output.5e52a835b47f.js:14:1625) (función anónima) (output.5e52a835b47f.js:16:470) (función anónima) (output.5e52a835b47f.js:65:1694) a (output.5e52a835b47f.js:94:1050) (función anónima) (output.5e52a835b47f.js:94:2760) (función anónima) (output.5e52a835b47f.js:65:1526) aa (output.5e52a835b47f.js:87:888) *** Bug 230949 has been marked as a duplicate of this bug. *** Unfortunately the problem is present in the currently released iOS, but will be fixed in one of the upcoming releases.
If you are able to use a workaround, you could change the variables passed to inout parameters of the functions to not refer to swizzles.
before:
void f(inout float a) { ... }
void main() {
vec3 myvec = ...;
f(myvec.x);
}
after:
void f(inout float a) { ... }
void main() {
vec3 myvec = ...;
float myfloat = myvec.x;
f(myfloat);
myvec.x = myfloat;
}
Many thanks for the fix and follow up on this. The example code for the workaround doesn't seem to fit my needs though. It may be related to the fact that changing B4W engine is hard, but I don't see any function calls with swizzles, and I even removed all the code from the problematic shader (leaving only a plain out color), and it is still not working. So I hope it will be solved with this fix when actually released. info: iOS 15.1 Beta 3 still has the issue. thanks. Hi, iOS Beta 5 still not working. Anyone has any insights for when this would be added? Or at least, can you confirm the link I shared (https://testios15.made-to-order.com/) works with the patch? Our company really depends on our product configurator working properly on all devices, and it is becoming a huge concern for us now. (In reply to Raúl from comment #12) > Hi, > > iOS Beta 5 still not working. > Anyone has any insights for when this would be added? > Or at least, can you confirm the link I shared > (https://testios15.made-to-order.com/) works with the patch? I can confirm the site works with WebKit trunk version with the patch. I cannot confirm when the patch is released until it is released. For workaround, you could try to apply the suggestion about not using single value swizzles for targets of inout parameters, or ask the engine vendor to apply the workaround. Solved on iOS 15.2 Beta 2, thanks you. Hi, Thanks for everything, it seems the fix is coming soon to iOS. I have detected the same error on the macOS 15 beta, not sure if it is exactly the same error as I cannot see the full log as you do, but it fails at the same shader so it might be the same kind of error. Not sure if I should post another bug for this, or maybe you can take a look directly. Many thanks. BTW, it seems to work on Chrome but not Safari, in case that helps. (In reply to Raúl from comment #15) > Hi, > > Thanks for everything, it seems the fix is coming soon to iOS. > > I have detected the same error on the macOS 15 beta, not sure if it is > exactly the same error as I cannot see the full log as you do, but it fails > at the same shader so it might be the same kind of error. > Not sure if I should post another bug for this, or maybe you can take a look > directly. This fix for this particular issue, single-component swizzles do not compile, will also be fixed in one of the upcoming macOS releases. If you're reporting that your specific site that failed on iOS due to this issue is also failing on macOS, most likely it is the same issue and does not need to be reported. If you are observing an issue in some other content that probably is not due to this same root cause, feel free to file another issue. Alternatively please comment in this bug so I can file the issue. Please provide details on which site or preferably add some reproduction content. Please describe the hardware and software versions being used. The shader compilation bug error message is currently the same for all shader compilation bugs. *** Bug 234219 has been marked as a duplicate of this bug. *** *** Bug 234218 has been marked as a duplicate of this bug. *** *** Bug 234208 has been marked as a duplicate of this bug. *** Marking this as fixed again. For new errors we should have new bug entries. *** Bug 240433 has been marked as a duplicate of this bug. *** |