mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-05-31 08:41:11 +00:00
[qfcc] Use array count, not the const id for array size
Double emission of a constant... that one had me puzzled for a bit: 374? That's not even a multiple of 32!
This commit is contained in:
parent
a8446cb87e
commit
a3f4649b27
1 changed files with 1 additions and 2 deletions
|
@ -624,8 +624,7 @@ static unsigned
|
||||||
spirv_TypeArray (const type_t *type, spirvctx_t *ctx)
|
spirv_TypeArray (const type_t *type, spirvctx_t *ctx)
|
||||||
{
|
{
|
||||||
auto ele_type = dereference_type (type);
|
auto ele_type = dereference_type (type);
|
||||||
auto count_expr = new_int_expr (type_count (type), false);
|
unsigned count = type_count (type);
|
||||||
unsigned count = spirv_value (count_expr, ctx);
|
|
||||||
unsigned tid = spirv_Type (ele_type, ctx);
|
unsigned tid = spirv_Type (ele_type, ctx);
|
||||||
return spirv_type_array (tid, count, ctx);
|
return spirv_type_array (tid, count, ctx);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue