https://bugs.winehq.org/show_bug.cgi?id=54660
Bug ID: 54660 Summary: Call of Juarez shows 'Assertion failed: deref->offset_regset == HLSL_REGSET_NUMERIC' Product: vkd3d Version: 1.6 Hardware: x86-64 OS: Linux Status: NEW Severity: normal Priority: P2 Component: hlsl Assignee: wine-bugs@winehq.org Reporter: andrey.goosev@gmail.com Distribution: ---
Assertion failed: deref->offset_regset == HLSL_REGSET_NUMERIC, file ../vkd3d/libs/vkd3d-shader/hlsl_codegen.c, line 3143
1.6-199-gda243570
https://bugs.winehq.org/show_bug.cgi?id=54660
--- Comment #1 from Nikolay Sivov bunglehead@gmail.com --- Please attach +d3dcompiler,+vkd3d log, I'd like to see what's happening in the shader to trigger this.
https://bugs.winehq.org/show_bug.cgi?id=54660
--- Comment #2 from Andrey Gusev andrey.goosev@gmail.com --- Created attachment 74192 --> https://bugs.winehq.org/attachment.cgi?id=74192 +d3dcompiler,+vkd3d
https://bugs.winehq.org/show_bug.cgi?id=54660
Francisco Casas fcasas@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |fcasas@codeweavers.com
--- Comment #3 from Francisco Casas fcasas@codeweavers.com --- In the log I see three shaders that fail to compile.
These relate to bugs #54647, #54648, and this one, respectively.
These are the first lines in the output assembly of the last one:
out half4 output : COLOR0 2: float2 | <input-TEXCOORD0> 3: | = (input.xy @2) ...
The problem is that, in this shader, the variable "input" is a struct, so it shouldn't be stored to directly (without indexation).
The assertion fails when the call to write_sm4_store() for instruction 3, calls write_sm4_store(), which calls sm4_register_from_deref().
Currently, deref->offset_regset is 0 for derefs to structs. Which makes sense since:
/* Instructions that directly refer to structs or arrays (instead of single-register components) * are removed later by dce. So it is not a problem to just cleanup their derefs. */
https://bugs.winehq.org/show_bug.cgi?id=54660
--- Comment #4 from Francisco Casas fcasas@codeweavers.com --- The problem is that we need support for input semantics in arrays, so that in a shader like this:
struct pixelInput { float2 uvTexcoords[8] : TEXCOORD0; };
void main(in pixelInput input) { ... }
uvTexcoords[0] is mapped to TEXCOORD0, uvTexcoords[1] to TEXCOORD1, uvTexcoords[2] to TEXCOORD2, and so on...
https://bugs.winehq.org/show_bug.cgi?id=54660
--- Comment #5 from Francisco Casas fcasas@codeweavers.com --- Properly supporting arrays (while at it, also multi-dimensional ones) in prepend_input_copy() and append_output_copy() solves that problem and derivative ones.
I am cleaning a patch series for that.
However, after fixing it, these fixmes arise when trying to compile this third shader:
E5017: Aborting due to not yet implemented feature: Dereference with non-constant offset of type HLSL_IR_EXPR. E5017: Aborting due to not yet implemented feature: SM4 combined sample expression. E5017: Aborting due to not yet implemented feature: SM4 cast to half.
https://bugs.winehq.org/show_bug.cgi?id=54660
--- Comment #6 from Nikolay Sivov bunglehead@gmail.com --- (In reply to Francisco Casas from comment #5)
Properly supporting arrays (while at it, also multi-dimensional ones) in prepend_input_copy() and append_output_copy() solves that problem and derivative ones.
I am cleaning a patch series for that.
However, after fixing it, these fixmes arise when trying to compile this third shader:
E5017: Aborting due to not yet implemented feature: Dereference with non-constant offset of type HLSL_IR_EXPR.
That's bug 54832.
E5017: Aborting due to not yet implemented feature: SM4 combined sample expression.
That's addressed with https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/209 once merged.
E5017: Aborting due to not yet implemented feature: SM4 cast to half.
This one should be fixed with https://source.winehq.org/git/vkd3d.git/commit/24c1eb562f1493f60e6e93514b2ef....
So right now, isnan() is definitely still missing (bug 54648).