vkd3d-shader/fx: Initial support for writing sample state objects.
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com
Merge request reports
Activity
added 6 commits
- 8eb12d85 - vkd3d-shader/hlsl: Transfer state_blocks to the uniform copy.
- 1378eed7 - vkd3d-shader/fx: Initial support for writing sample state objects.
- 21ad4b9e - vkd3d-shader/fx: Write depth stencil view object variables.
- 2a3b4c25 - vkd3d-shader/fx: Set RTV counter in the header.
- 6c435150 - vkd3d-shader/fx: Set texture count in the header.
- 393d1a04 - vkd3d-shader/fx: Fix shader counter in the header.
Toggle commit listadded 8 commits
- 3fbdb5db - vkd3d-shader/hlsl: Transfer state_blocks to the uniform copy.
- 7a5660e3 - vkd3d-shader/fx: Initial support for writing sample state objects.
- e3b5056f - vkd3d-shader/fx: Write depth stencil view object variables.
- 27d824d4 - vkd3d-shader/fx: Set RTV counter in the header.
- 2ea01323 - vkd3d-shader/fx: Set texture count in the header.
- 6dd4c1da - vkd3d-shader/fx: Fix shader counter in the header.
- 59fa8383 - vkd3d-shader/fx: Filter out unsupported object types.
- dec65a27 - vkd3d-shader/fx: Set UAV count in the header.
Toggle commit list- Resolved by Nikolay Sivov
1092 { "AddressV", HLSL_TYPE_SAMPLER, HLSL_TYPE_UINT, 1, 47, address_values }, 1093 { "AddressW", HLSL_TYPE_SAMPLER, HLSL_TYPE_UINT, 1, 48, address_values }, 1094 { "MipLODBias", HLSL_TYPE_SAMPLER, HLSL_TYPE_FLOAT, 1, 49 }, 1095 { "MaxAnisotropy", HLSL_TYPE_SAMPLER, HLSL_TYPE_UINT, 1, 50 }, 1096 { "ComparisonFunc", HLSL_TYPE_SAMPLER, HLSL_TYPE_UINT, 1, 51, compare_func_values }, 1097 { "BorderColor", HLSL_TYPE_SAMPLER, HLSL_TYPE_FLOAT, 4, 52 }, 1098 { "MinLOD", HLSL_TYPE_SAMPLER, HLSL_TYPE_FLOAT, 1, 53 }, 1099 { "MaxLOD", HLSL_TYPE_SAMPLER, HLSL_TYPE_FLOAT, 1, 54 }, 1100 { "Texture", HLSL_TYPE_SAMPLER, HLSL_TYPE_TEXTURE, 1, 55 }, 1101 }; 1102 1103 const struct hlsl_type *type = hlsl_get_multiarray_element_type(var->data_type); 1104 uint32_t i, value_offset = 0, assignment_type = 0, rhs_offset; 1105 uint32_t type_offset; 1106 struct vkd3d_bytecode_buffer *buffer = &fx->structured; 1107 struct hlsl_ir_node *value = *entry->args; changed this line in version 4 of the diff
- Resolved by Nikolay Sivov
added 24 commits
-
dec65a27...4a209efb - 15 commits from branch
wine:master
- cb18d8e2 - vkd3d-shader/hlsl: Turn hlsl_state_block_entry arguments into hlsl_src.
- 807b8f73 - vkd3d-shader/hlsl: Transfer state_blocks to the uniform copy.
- bd1c56bc - vkd3d-shader/fx: Write depth stencil view object variables.
- ab07a4c2 - vkd3d-shader/fx: Set RTV counter in the header.
- ab011925 - vkd3d-shader/fx: Set texture count in the header.
- bf763289 - vkd3d-shader/fx: Fix shader counter in the header.
- 177c5cd5 - vkd3d-shader/fx: Filter out unsupported object types.
- e3ec5eee - vkd3d-shader/fx: Set UAV count in the header.
- 6a26a4c1 - vkd3d-shader/fx: Initial support for writing sample state objects.
Toggle commit list-
dec65a27...4a209efb - 15 commits from branch
The code seems correct to me and after rebasing these patches on top of !813 (merged) the tests pass.
Albeit, I haven't compared side-by-side the binary output between native and what these patches write, I am assuming that is correct.
3/9 ("vkd3d-shader/hlsl: Transfer state_blocks to the uniform copy.") makes me wince a little.
What is the uniform copy getting us? It's mainly there in HLSL to deal with writes to uniforms (and frankly I'm not even convinced it's the best way of doing that anymore, but anyway.) Is that a concern for effects? I think last time I brought it up, the only real reason to have it is for populating extern_vars, but we can do that in other ways...
Eh. extern_vars exists as a way to collect together globals, entry point parameters, and the entry point retval, for the benefit of the multiple places which need to deal with vars with external linkage. But only globals are relevant to effects, as I understand, and as I kind of said in 443 I don't object to just using globals instead of extern_vars here.
On the other hand, we could use extern_vars but then manually populate it. Though that does seem a bit roundabout. While there is some measure of declarativeness in using extern_vars, I don't think we need to go out of our way to do so.
Well, 3/9 is a bit unfortunate [although, looking at it again, I think my main issue is that I don't see why it's a helper in hlsl.c and not just inline in prepend_uniform_copy()]. The use of a dummy block in fx_write_context_init() is also awkward.
Not using extern_vars turns out to be awkward after all, because hlsl_calculate_buffer_offsets() consumes it, but the attached diff simplifies the code a bit, I think, and it avoids the need for 3/9.
There is not a lot of cases like that, I think all can only appear in passes and will have to be handled manually, for example in OMSetRenderTargets() there has to be [1+1, 8+1] for number of arguments, where last one is a depth stencil view, and others are rtvs. My plan was to check for those cases, replace such entries with actual entries that are going to be written (order how those are written is also a bit weird). Now, it's possible to add names for such new entries, but then those will be in the list next to state names that can actually appear in sources. That's why I think having null names and ids instead is better.
Another case of such decomposition is assigning a value to an array field, that produces a number of assignment of individual elements to the same value. This is also cleanup up so that only the very last assignment to the same field is kept. Cases like that are very limited thankfully. So far I'm talking about fx_4/fx_5 only, I haven't looked at what happens in fx_2 where there is no state objects, maybe it's simply everything assigned at pass level, with similar cleanups.
added 31 commits
-
6a26a4c1...7b4a1fdf - 22 commits from branch
wine:master
- 293860fe - vkd3d-shader/hlsl: Turn hlsl_state_block_entry arguments into hlsl_src.
- f0ee1e90 - vkd3d-shader/hlsl: Transfer state_blocks to the uniform copy.
- 95c44efb - vkd3d-shader/fx: Write depth stencil view object variables.
- c266c493 - vkd3d-shader/fx: Set RTV counter in the header.
- e1053b02 - vkd3d-shader/fx: Set texture count in the header.
- 26cf42f2 - vkd3d-shader/fx: Fix shader counter in the header.
- 94d8961d - vkd3d-shader/fx: Filter out unsupported object types.
- a0ec8d8a - vkd3d-shader/fx: Set UAV count in the header.
- 0552c70a - vkd3d-shader/fx: Initial support for writing sample state objects.
Toggle commit list-
6a26a4c1...7b4a1fdf - 22 commits from branch
added 8 commits
- bce6ae6c - vkd3d-shader/fx: Skip uniform copy logic for global variables.
- 5ebc06e9 - vkd3d-shader/fx: Write depth stencil view object variables.
- 0f00f062 - vkd3d-shader/fx: Set RTV counter in the header.
- 54ea7100 - vkd3d-shader/fx: Set texture count in the header.
- 1dbbfd78 - vkd3d-shader/fx: Fix shader counter in the header.
- 80104834 - vkd3d-shader/fx: Filter out unsupported object types.
- 05db0f4d - vkd3d-shader/fx: Set UAV count in the header.
- 8e4bb992 - vkd3d-shader/fx: Initial support for writing sample state objects.
Toggle commit listadded 26 commits
-
8e4bb992...46fca3f9 - 17 commits from branch
wine:master
- 547e28a1 - vkd3d-shader/hlsl: Turn hlsl_state_block_entry arguments into hlsl_src.
- 27532bc9 - vkd3d-shader/fx: Skip uniform copy logic for global variables.
- a540598f - vkd3d-shader/fx: Write depth stencil view object variables.
- b4bdd08c - vkd3d-shader/fx: Set RTV counter in the header.
- 396ba197 - vkd3d-shader/fx: Set texture count in the header.
- fca25877 - vkd3d-shader/fx: Fix shader counter in the header.
- a86c68f8 - vkd3d-shader/fx: Filter out unsupported object types.
- 41948a64 - vkd3d-shader/fx: Set UAV count in the header.
- ff321944 - vkd3d-shader/fx: Initial support for writing sample state objects.
Toggle commit list-
8e4bb992...46fca3f9 - 17 commits from branch
added 85 commits
-
ff321944...cefd6f9d - 76 commits from branch
wine:master
- 700cbdf7 - vkd3d-shader/hlsl: Turn hlsl_state_block_entry arguments into hlsl_src.
- 2262120e - vkd3d-shader/fx: Skip uniform copy logic for global variables.
- bb1573eb - vkd3d-shader/fx: Write depth stencil view object variables.
- 21fb360e - vkd3d-shader/fx: Set RTV counter in the header.
- caacecf3 - vkd3d-shader/fx: Set texture count in the header.
- ba9272f6 - vkd3d-shader/fx: Fix shader counter in the header.
- 29cf50cd - vkd3d-shader/fx: Filter out unsupported object types.
- d9fa9826 - vkd3d-shader/fx: Set UAV count in the header.
- 9c2bb096 - vkd3d-shader/fx: Initial support for writing sample state objects.
Toggle commit list-
ff321944...cefd6f9d - 76 commits from branch
added 9 commits
- 68483d07 - vkd3d-shader/hlsl: Turn hlsl_state_block_entry arguments into hlsl_src.
- c2eb563e - vkd3d-shader/fx: Skip uniform copy logic for global variables.
- a879ac55 - vkd3d-shader/fx: Write depth stencil view object variables.
- 162d8760 - vkd3d-shader/fx: Set RTV counter in the header.
- cb1a2711 - vkd3d-shader/fx: Set texture count in the header.
- 9bbed149 - vkd3d-shader/fx: Fix shader counter in the header.
- 1a79d1e9 - vkd3d-shader/fx: Filter out unsupported object types.
- 3c6470e3 - vkd3d-shader/fx: Set UAV count in the header.
- 0053cc52 - vkd3d-shader/fx: Initial support for writing sample state objects.
Toggle commit list