【发布时间】:2015-12-15 15:26:45
【问题描述】:
我知道在同一调度内的不同调用中使用 imageStore 并后跟 imageRead 需要正确读取 coherent 关键字。
但是,我可以在不使用coherent 的情况下在同一个调度中读取值吗?
或者换句话说,当我有这个时:
layout(r8ui) uniform uimage2D input_texture;
void main(){
ivec2 coords = ivec2(gl_GlobalInvocationID.xy);
imageStore(input_texture, coords, ivec4(128));
int value = imageLoad(input_texture, coords).r;
}
value 是否保证为 128,即使没有连贯的关键字?
【问题讨论】:
标签: opengl glsl textures compute-shader