mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-04-13 05:43:18 -07:00
vkd3d-shader/hlsl: Parse the shader 'compile' syntax.
The hlsl_ir_compile node is introduced to represent the "compile" syntax, and later the CompileShader() and ConstructGSWithSO() constructs. It basically represents a function call that remembers its arguments using hlsl_srcs and keeps its own instruction block, which is discarded when working on non-effect shaders. For shader compilations it can be asserted that args_count is 1, and that this argument (and the last node in hlsl_ir_effect_call.instrs) is a regular hlsl_ir_call pointing to the declaration of the function to be compiled.
This commit is contained in:
committed by
Henri Verbeet
parent
379cd9b7b5
commit
45f18a7838
Notes:
Henri Verbeet
2024-09-04 18:48:35 +02:00
Approved-by: Elizabeth Figura (@zfigura) Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/943
@ -4050,6 +4050,7 @@ static bool dce(struct hlsl_ctx *ctx, struct hlsl_ir_node *instr, void *context)
|
||||
switch (instr->type)
|
||||
{
|
||||
case HLSL_IR_CONSTANT:
|
||||
case HLSL_IR_COMPILE:
|
||||
case HLSL_IR_EXPR:
|
||||
case HLSL_IR_INDEX:
|
||||
case HLSL_IR_LOAD:
|
||||
@ -4343,6 +4344,9 @@ static void compute_liveness_recurse(struct hlsl_block *block, unsigned int loop
|
||||
case HLSL_IR_CONSTANT:
|
||||
case HLSL_IR_STRING_CONSTANT:
|
||||
break;
|
||||
case HLSL_IR_COMPILE:
|
||||
/* Compile calls are skipped as they are only relevent to effects. */
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user