Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FXC requires ASCII HLSL code #5814

Open
teoxoy opened this issue Jun 14, 2024 · 4 comments
Open

FXC requires ASCII HLSL code #5814

teoxoy opened this issue Jun 14, 2024 · 4 comments
Labels
api: dx12 Issues with DX12 or DXGI area: correctness We're behaving incorrectly naga Shader Translator type: bug Something isn't working

Comments

@teoxoy
Copy link
Member

teoxoy commented Jun 14, 2024

pSourceName, pEntrypoint should also be ASCII.

See #5812 (comment) for all the details.

This needs work in naga to remap all non-ASCII identifiers to ASCII.

@teoxoy teoxoy added type: bug Something isn't working area: correctness We're behaving incorrectly api: dx12 Issues with DX12 or DXGI naga Shader Translator labels Jun 14, 2024
@workingjubilee
Copy link
Contributor

I guess we could basically punycode them? except _ instead of -, obviously.

@teoxoy
Copy link
Member Author

teoxoy commented Jul 18, 2024

That sounds like a good solution but we might not have to do this at all since we will probably drop support for FXC. @nical is working on adding the DXC dlls in Firefox.

@jimblandy
Copy link
Member

It's just identifiers, right? It should be easy to make the namer take care of this, it already rejects some characters so it might be doing this already.

It would be smart to add an assertion to the HLSL backend that the output is in fact ASCII.

On my phone, but, we probably have a bug in that we don't adjust entry point names for the namer's changes?

@teoxoy
Copy link
Member Author

teoxoy commented Jul 25, 2024

On my phone, but, we probably have a bug in that we don't adjust entry point names for the namer's changes?

That's a good point, looking a the code, I don't think we do. Could you open a new issue for it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: dx12 Issues with DX12 or DXGI area: correctness We're behaving incorrectly naga Shader Translator type: bug Something isn't working
Projects
Status: Todo
Development

No branches or pull requests

3 participants