vkd3d-shader/hlsl: Store original semantic name.
The issue here is that names like COLOR0 and COLOR are represented identically, and that's not going to work for effects, where original string is stored, and is used later for simple comparison lookups.
Merge request reports
Activity
I don't think I like that, no. I was hoping instead that we could do the parsing in e.g. hlsl_sm4_register_from_semantic(), probably using a helper.
Unfortunately there is prepend_input_copy() et al. which interpret the index, so I suppose that's not going to work, and just storing both copies is better...
Another option is to store original name, parsed index, and something like length of a name part after index was parsed. It is better in a sense that there is no duplication, but every place needs to handle that.
Maybe less intrusive way is to store a flag to indicate that "index" is 0 from parsed string. This way I only need to handle that in fx writing, by appending index part.
You're right. Not parsing it for fx makes sense, it's probably what I would do, but it's certainly not pretty, having parsed structure carry different meaning depending on profile is not great. Storing original string is unavoidable, the question remains if we need to store both or instead bother storing length of name part.
added 29 commits
-
997a2004...47d077e5 - 27 commits from branch
wine:master
- 1124ea46 - vkd3d-shader/hlsl: Store original semantic name.
- 72ddea60 - vkd3d-shader/fx: Use original full semantic name.
-
997a2004...47d077e5 - 27 commits from branch