vkd3d-shader/hlsl: Add support for ConstantBuffer<> type.
This could wait for !865 (merged), so it can actually produce any output.
Merge request reports
Activity
My apologies for not reviewing the tests when they were submitted. They aren't particularly complete, though, and notably don't include any tests for a successful declaration and usage of a ConstantBuffer variable.
One thing I notice from manual tests is that "ConstantBuffer
a;" seems to be pretty much equivalent to "cbuffer a { struct s a; }". Do we even need a separate type class in that case?It appears to be separate, since you can declare local variables with it, even if nobody is going to use that. I think changes in this mr are pretty minimal, it simply declares a new type, but then immediately reduces it to a structure, wrapped in a new cbuffer.
One thing that's important and is also missing from the test is that you can use ConstantBuffer
variable as a function argument, of type "s".If
ConstantBuffer<s>
is turned to s in type_no_void, there is no way to tell later when declaring variables.Edited by Nikolay SivovAh, right...
I did more testing, and I guess making it a separate type like this is actually best. Declaring a variable with ConstantBuffer actually declares a variable of type apple, as this patch has it, but casting to ConstantBuffer is always illegal (even casting apple to ConstantBuffer fails); returning ConstantBuffer from a function does not "promote" the return type to apple either.
added 43 commits
-
a253bc53...d3ba810c - 42 commits from branch
wine:master
- b41ab7cd - vkd3d-shader/hlsl: Add support for ConstantBuffer<> type.
-
a253bc53...d3ba810c - 42 commits from branch
added 1 commit
- b650eddc - vkd3d-shader/hlsl: Add support for ConstantBuffer<> type.
requested review from @zfigura
added 14 commits
-
6fa77425...ccb6150a - 5 commits from branch
wine:master
- 8c711163 - tests: Add more register reservations tests.
- 8ece72db - vkd3d-shader/hlsl: Support expressions as register offsets.
- b5567eb5 - vkd3d-shader/hlsl: Pass a pointer to struct hlsl_reg_reservation in parse_reservation_index.
- 36cda1ec - vkd3d-shader/hlsl: Ignore bracket offsets for 'b' register types prior to SM 5.1.
- 4295a272 - vkd3d-shader/hlsl: Do not immediately fail parsing for malformed 'b' register reservations.
- dd6513b8 - vkd3d-shader/hlsl: Validate cbuffer register allocations.
- e6d278da - vkd3d-shader/hlsl: Reserve register slots for unused buffers.
- eb12e41f - tests: Add reflection tests for register expressions.
- 581df50c - vkd3d-shader/hlsl: Add support for ConstantBuffer<> type.
Toggle commit list-
6fa77425...ccb6150a - 5 commits from branch
added 9 commits
-
581df50c...44725a65 - 8 commits from branch
wine:master
- 48ff7de8 - vkd3d-shader/hlsl: Add support for ConstantBuffer<> type.
-
581df50c...44725a65 - 8 commits from branch