vkd3d-shader/hlsl: Improve SM1 support for non-float operations, part 2.
Patches with tests and other miscellaneous changes required before the remaining features in my sm1_logic branch. Includes some rebased spirv.c patches by Zeb.
Merge request reports
Activity
requested review from @fcasas
2/6 seems to have a stray FIXME in it.
I think 5/6 and 6/6 are fine but per discussion we may want them to be earlier lowering passes anyway?
Note also you'll need to manually accept this one since it has my commits in it.
+% The main objective of this test is to see if operations for SM1 vertex shaders work. +% Because they have a different instruction set that pixel shaders.
Dependent clauses should be separated by a comma, and "that" seems to be a typographical error.
After some checking, it seems that it is currently common in spirv.c to perform the casts inside the functions that handle each vsir instruction when the src and dst register types don't match, for instance in
spirv_compiler_emit_alu_instruction()
.So my impression now is that CMP, SLT, and SGE, are not so deserving of a normalization pass that only changes the
handler_idx
and appends a cast from bool to float.But if we do, do we have a vsir
handler_idx
to represent such casts (which will have to end up as SpvOpSelect)?
added 5 commits
- 929a1361 - vkd3d-shader/hlsl: Cast slt before multiplying on ternary operator.
- 9f3e1ef6 - tests: Test comparison and logic operators on SM1 vertex shaders.
- 3db845df - tests: Check that -0.0f is not less than 0.0f.
- 0ad9d2e3 - vkd3d-shader/spirv: Implement CMP.
- fd718f81 - vkd3d-shader/spirv: Implement SLT and SGE.
Toggle commit list- Resolved by Francisco Casas
Minor: the commit subject for 1/6 is lowercase.
1 % Check that -0.0f is not less than 0.0f 2 [pixel shader todo(sm<4)] 3 float a; 4 5 float4 main() : sv_target 6 { 7 return -0.0f < a; added 6 commits
- ee7c0b5f - tests/shader-runner: Pass uniforms to vertex shaders in d3d9 and d3d11.
- 30c362ec - vkd3d-shader/hlsl: Cast slt before multiplying on ternary operator.
- 5a4d79a9 - tests: Test comparison and logic operators on SM1 vertex shaders.
- 0b332de3 - tests: Check that -0.0f is not less than 0.0f.
- 08563026 - vkd3d-shader/spirv: Implement CMP.
- cd5bf58e - vkd3d-shader/spirv: Implement SLT and SGE.
Toggle commit listadded 48 commits
-
cd5bf58e...23259263 - 42 commits from branch
wine:master
- 5766554f - tests/shader-runner: Pass uniforms to vertex shaders in d3d9 and d3d11.
- d49b89a7 - vkd3d-shader/hlsl: Cast slt before multiplying on ternary operator.
- 113c3b2f - tests: Test comparison and logic operators on SM1 vertex shaders.
- 52d7213e - tests: Check that -0.0f is not less than 0.0f.
- 5b0a2e53 - vkd3d-shader/spirv: Implement CMP.
- 373c06d3 - vkd3d-shader/spirv: Implement SLT and SGE.
Toggle commit list-
cd5bf58e...23259263 - 42 commits from branch