- Nov 07, 2023
-
-
-
-
-
-
-
-
-
-
-
-
Hull shaders have a different temps count for each phase, and the parser only reports the count for the patch constant phase. In order to properly check for temps count on hull shaders, we first need to decode its phases.
-
-
For relative addressing, the vkd3d_shader_registers must point to another vkd3d_shader_src_param. For now, use the sm4_instruction to save them, since the only purpose of this struct is to be used as paramter for write_sm4_instruction.
-
-
-
-
This function will also be required to encode rel_addr registers.
-
-
-
- Nov 06, 2023
-
-
-
RWBuffer objects would trigger a vkd3d_unreachable() in sm4_base_type(). It would be easy enough to add the required case there, but (manual, unfortunately) tests show that we aren't supposed to write constant buffer entries for objects in the first place, as you'd expect. This particular path ends up being exercised by vkd3d's internal UAV clear shaders, but unfortunately it looks like our RDEF data may have more issues; the ability to write tests for it would seem helpful.
-
-
Done with `LC_ALL=C sort -f`.
-
This is already handled by the preprocessor.
-
None of these currently have any meaning, and none of these can currently be parsed as distinct tokens either (i.e. they will generate a syntax error anyway).
-
Co-authored-by:
Evan Tang <etang@codeweavers.com> Evan Tang reported that new fixmes appeared on the shader_runner when running some of his tests after f50d0ae2. vkd3d:652593:fixme:shader_sm4_read_src_param Unhandled mask 0x4. The change to blame seems to be this added line in sm4_src_from_constant_value(). + src->swizzle = VKD3D_SHADER_NO_SWIZZLE; On tpf binaries the last 12 bits of each src register in an instruction specify the swizzle, and there are 5 possible combinations: Dimension NONE -------- 00 Dimension SCALAR -------- 01 Dimension VEC4, with a 4 bit writemask: ---- xxxx 00 01 Dimension VEC4, with an 8 bit swizzle: xx xx xx xx 01 01 Dimension VEC4, with a 2bit scalar dimension number: ------ xx 10 01 So far, we have only seen src registers use 4 bit writemasks in a single case: for vec4 constants, and it is always zero. So we expect this: ---- 0000 00 01 Now, I probably wanted to initialize src->swizzle to zero when writing constants, but VKD3D_SHADER_NO_SWIZZLE is not zero, it is actually the default swizzle: 11 10 01 00 And the last 4 bits (0x4) get written in the mask part, which causes the reader to complain.
-
-
The DXIL parser uses unsigned types even if the source code uses signed, so unsigned values may be negated.
-
-
-
-
According to a clang diagnostic, redefining a typedef is C11, and we want to stick with C99.
-
-
On macOS vkd3d_shader_global_flags has underlying type unsigned long, while uint64_t is defined as unsigned long long. This difference causes a few warnings to be raised.
-
If the build fails some artifact files might not exist, and we don't want the script to fail just because of that.
-
Otherwise we always output "dcl_temps 1" even when no temp registers were used.
-
This is taken care of by prior I/O lowering. We no longer need to deal with this here.
-
I/O normalization removes this register type.
-
The hull shader barrier used for this was broken by I/O normalization, since vocp is no longer exposed to the spirv backend. Restore this barrier by checking for vocp during normalization instead.
-
-