mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-04-07 01:42:04 +00:00
[qfcc] Support nil expressions in spir-v
This commit is contained in:
parent
1d0135be52
commit
76fcc2f1a9
1 changed files with 13 additions and 0 deletions
|
@ -1276,6 +1276,18 @@ spirv_matrix_value (const ex_value_t *value, spirvctx_t *ctx)
|
|||
return id;
|
||||
}
|
||||
|
||||
static unsigned
|
||||
spirv_nil (const expr_t *e, spirvctx_t *ctx)
|
||||
{
|
||||
unsigned tid = type_id (e->nil, ctx);
|
||||
unsigned id = spirv_id (ctx);
|
||||
auto globals = ctx->module->globals;
|
||||
auto insn = spirv_new_insn (SpvOpConstantNull, 3, globals);
|
||||
INSN (insn, 1) = tid;
|
||||
INSN (insn, 2) = id;
|
||||
return id;
|
||||
}
|
||||
|
||||
static unsigned
|
||||
spirv_value (const expr_t *e, spirvctx_t *ctx)
|
||||
{
|
||||
|
@ -1798,6 +1810,7 @@ spirv_emit_expr (const expr_t *e, spirvctx_t *ctx)
|
|||
[ex_uexpr] = spirv_uexpr,
|
||||
[ex_symbol] = spirv_symbol,
|
||||
[ex_temp] = spirv_temp,//FIXME don't want
|
||||
[ex_nil] = spirv_nil,
|
||||
[ex_value] = spirv_value,
|
||||
[ex_vector] = spirv_vector,
|
||||
[ex_compound] = spirv_compound,
|
||||
|
|
Loading…
Reference in a new issue