[qfcc] Remove the ptr temp

By default, spir-v doesn't allow pointer variables, so the result of
__imageTexel needs to be used directly.
This commit is contained in:
Bill Currie 2025-01-21 20:08:34 +09:00
parent f08faee2ed
commit 866e1dc06a

View file

@ -1227,13 +1227,11 @@ SRC_LINE
"#define __imageAtomic(op,type) \\" "\n"
"type imageAtomic##op(IMAGE_PARAMS, type data) \\" "\n"
"{ \\" "\n"
" auto ptr = __imageTexel(image, P, 0); \\" "\n"
" return atomic##op(*ptr, data); \\" "\n"
" return atomic##op(__imageTexel(image, P, 0), data); \\" "\n"
"} \\" "\n"
"type imageAtomic##op(IMAGE_PARAMS_MS, type data) \\" "\n"
"{ \\" "\n"
" auto ptr = __imageTexel(image, P, sample); \\" "\n"
" return atomic##op(*ptr, data); \\" "\n"
" return atomic##op(__imageTexel(image, P, sample), data); \\" "\n"
"}" "\n"
"#define imageAtomic(op) \\" "\n"
"__imageAtomic(op,uint) \\" "\n"
@ -1250,13 +1248,11 @@ SRC_LINE
"#define __imageAtomicCompSwap(type) \\" "\n"
"type imageAtomicCompSwap(IMAGE_PARAMS, type data) \\" "\n"
"{ \\" "\n"
" auto ptr = __imageTexel(image, P, 0); \\" "\n"
" return atomicCompSwap(*ptr, data); \\" "\n"
" return atomicCompSwap(__imageTexel(image, P, 0), data); \\" "\n"
"} \\" "\n"
"type imageAtomicCompSwap(IMAGE_PARAMS_MS, type data) \\" "\n"
"{ \\" "\n"
" auto ptr = __imageTexel(image, P, sample); \\" "\n"
" return atomicCompSwap(*ptr, data); \\" "\n"
" return atomicCompSwap(__imageTexel(image, P, sample), data); \\" "\n"
"}" "\n"
"__imageAtomicCompSwap(uint)" "\n"
"__imageAtomicCompSwap(int)" "\n"