mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-01-28 13:05:02 -08:00
vkd3d-shader/ir: Evaluate OUTCONTROLPOINT usage in the patch constant phase directly.
Instead of using DCL_INPUT. The main goal here is to eventually get rid of the I/O declaration instructions. A positive side effect is that we don't add a useless barrier to shaders which have a DCL_INPUT instruction in the patch constant phase but don't actually read OUTCONTROLPOINT registers.
This commit is contained in:
parent
1cfe23569c
commit
9e0c02a0ea
Notes:
Henri Verbeet
2024-11-27 14:12:13 +01:00
Approved-by: Giovanni Mascellani (@giomasce) Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1282
@ -2181,6 +2181,8 @@ static void shader_src_param_io_normalise(struct vkd3d_shader_src_param *src_par
|
||||
|
||||
case VKD3DSPR_OUTCONTROLPOINT:
|
||||
reg->type = VKD3DSPR_OUTPUT;
|
||||
if (io_normaliser_is_in_fork_or_join_phase(normaliser))
|
||||
normaliser->use_vocp = true;
|
||||
/* fall through */
|
||||
case VKD3DSPR_OUTPUT:
|
||||
reg_idx = reg->idx[reg->idx_count - 1].offset;
|
||||
@ -2231,9 +2233,6 @@ static void shader_instruction_normalise_io_params(struct vkd3d_shader_instructi
|
||||
{
|
||||
reg = &ins->declaration.dst.reg;
|
||||
|
||||
if (reg->type == VKD3DSPR_OUTCONTROLPOINT)
|
||||
normaliser->use_vocp = true;
|
||||
|
||||
/* We don't need to keep OUTCONTROLPOINT or PATCHCONST input declarations since their
|
||||
* equivalents were declared earlier, but INCONTROLPOINT may be the first occurrence. */
|
||||
if (reg->type == VKD3DSPR_OUTCONTROLPOINT || reg->type == VKD3DSPR_PATCHCONST)
|
||||
|
Loading…
x
Reference in New Issue
Block a user