/
redgpu
/
clspv
Обзор
Документация
Войти
/
redgpu
/
clspv
Код
Запросы
0
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
test/Coherent/selection.cl
23 строки
820 B
alan-baker
Coherent decoration for global variables (#272)
15 мар 2019, 17:25
Не верифицирован
15 мар 2019, 17:25
e930801
Код
Авторство
О чём код?
// RUN: clspv %s -o %t.spv -no-inline-single -no-dra // RUN: spirv-dis -o %t.spvasm %t.spv // RUN: FileCheck %s < %t.spvasm // RUN: spirv-val --target-env vulkan1.0 %t.spv // Both x's should be coherent. y should not be coherent because it is not read. void bar(global int* x, int y) { *x = y; } kernel void foo(global int* x, global int* y, int c) { int z = x[0]; barrier(CLK_GLOBAL_MEM_FENCE); global int* ptr = c ? x : y; bar(ptr + 1, z); } // CHECK: OpDecorate [[x:%[a-zA-Z0-9_]+]] DescriptorSet 0 // CHECK: OpDecorate [[x]] Binding 0 // CHECK: OpDecorate [[x]] Coherent // CHECK: OpDecorate [[y:%[a-zA-Z0-9_]+]] DescriptorSet 0 // CHECK: OpDecorate [[y]] Binding 1 // CHECK-NOT: OpDecorate [[y]] Coherent // CHECK: OpDecorate [[param:%[a-zA-Z0-9_]+]] Coherent // CHECK: [[param]] = OpFunctionParameter