mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-04-07 01:42:04 +00:00
[qfcc] Fix some errors in subpassLoad
Used the wrong generic type name for gvec4*, and missed @construct. Now gridplane.frag tries to generate spir-v again (fails due to the instruction names).
This commit is contained in:
parent
cb20153da5
commit
9dca83d40a
1 changed files with 16 additions and 8 deletions
|
@ -930,6 +930,8 @@ SRC_LINE
|
|||
"__imageAtomicCompSwap(uint)" "\n"
|
||||
"__imageAtomicCompSwap(int)" "\n"
|
||||
"};" "\n"
|
||||
"#undef gvec4" "\n"
|
||||
"#undef gvec4MS" "\n"
|
||||
"#undef IMAGE_PARAMS" "\n"
|
||||
"#undef IMAGE_PARAMS_MS""\n"
|
||||
"#undef _image" "\n"
|
||||
|
@ -994,23 +996,29 @@ SRC_LINE
|
|||
"#define writeonly" "\n"
|
||||
"#define __spI(t,m) @handle t##subpassInput##m" "\n"
|
||||
"#define _subpassInput(x,m) __spI(,m),__spI(i,m),__spI(u,m)" "\n"
|
||||
"#define gvec4 @vector(gimage.base_type, 4)" "\n"
|
||||
"#define gvec4MS @vector(gimageMS.base_type, 4)" "\n"
|
||||
"#define gvec4 @vector(gimage.base_type, 4)" "\n"
|
||||
"#define gvec4MS @vector(gimageMS.base_type, 4)" "\n"
|
||||
"#define gvec4 @vector(gsubpassInput.base_type, 4)" "\n"
|
||||
"#define gvec4MS @vector(gsubpassInputMS.base_type, 4)" "\n"
|
||||
"@generic(gsubpassInput=[_subpassInput(,)]," "\n"
|
||||
" gsubpassInputMS=[_subpassInput(,MS)]) {" "\n"
|
||||
"gvec4 subpassLoad(gsubpassInput subpass)" "\n"
|
||||
"{" "\n"
|
||||
" return imageLoad(subpass, gsubpassInput.coord_type(0));" "\n"
|
||||
" return imageLoad(subpass," "\n"
|
||||
" @construct(gsubpassInput.coord_type, 0));" "\n"
|
||||
"}" "\n"
|
||||
"gvec4MS subpassLoad(gsubpassInputMS subpass, int sample)" "\n"
|
||||
"{" "\n"
|
||||
" return imageLoad(subpass, gsubpassInputMS.coord_type(0), sample);" "\n"
|
||||
" return imageLoad(subpass," "\n"
|
||||
" @construct(gsubpassInputMS.coord_type, 0)," "\n"
|
||||
" sample);" "\n"
|
||||
"}" "\n"
|
||||
"};" "\n"
|
||||
"#undef _subpassInput" "\n"
|
||||
"#undef __spI" "\n"
|
||||
"#undef uint" "\n"
|
||||
"#undef readonly" "\n"
|
||||
"#undef writeonly" "\n"
|
||||
"#undef gvec4" "\n"
|
||||
"#undef gvec4MS" "\n"
|
||||
"#undef _subpassInput" "\n"
|
||||
"#undef __spI" "\n"
|
||||
;
|
||||
#if 0
|
||||
//shader invocation group functions
|
||||
|
|
Loading…
Reference in a new issue