mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-04-11 20:03:11 +00:00
[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:
parent
f08faee2ed
commit
866e1dc06a
1 changed files with 4 additions and 8 deletions
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue