/
redgpu
/
clspv
Обзор
Документация
Войти
/
redgpu
/
clspv
Код
Запросы
0
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
test/VariablePointers/function_call_ssbo_subobject.cl
23 строки
994 B
Kévin Petit
Remove the option to emit assembly (#320)
02 апр 2019, 23:51
02 апр 2019, 23:51
e478690
Код
Авторство
О чём код?
// RUN: clspv %s -o %t.spv -no-dra -no-inline-single // RUN: spirv-dis -o %t2.spvasm %t.spv // RUN: FileCheck %s < %t2.spvasm // RUN: spirv-val --target-env vulkan1.0 %t.spv // Passing SSBO to function call requires VariablePointersStorageBuffer. // SSBO args do not require memory object declarations. int bar(global int* x) { return *x; } kernel void foo(global int* in, global int* out) { *out = bar(in + 1); } // CHECK-NOT: OpCapability VariablePointers // CHECK: OpCapability VariablePointersStorageBuffer // CHECK-NOT: OpCapability VariablePointers // CHECK: OpExtension "SPV_KHR_variable_pointers" // CHECK: [[uint:%[a-zA-Z0-9_]+]] = OpTypeInt 32 0 // CHECK: [[ptr:%[a-zA-Z0-9_]+]] = OpTypePointer StorageBuffer [[uint]] // CHECK: [[uint_0:%[a-zA-Z0-9_]+]] = OpConstant [[uint]] 0 // CHECK: [[uint_1:%[a-zA-Z0-9_]+]] = OpConstant [[uint]] 1 // CHECK: [[gep:%[a-zA-Z0-9_]+]] = OpAccessChain [[ptr]] {{.*}} [[uint_0]] [[uint_1]] // CHECK-NEXT: OpFunctionCall [[uint]] {{.*}} [[gep]]