/
redgpu
/
clspv
Обзор
Документация
Войти
/
redgpu
/
clspv
Код
Запросы
0
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
test/hack_inserts_constant.cl
27 строк
679 B
alan-baker
More test check simplifications (#399)
08 июл 2019, 17:52
Не верифицирован
08 июл 2019, 17:52
5cd4a4b
Код
Авторство
О чём код?
// Test the -hack-inserts option. // Check that we can remove partial chains of insertvalue // to avoid OpCompositeInsert entirely. // RUN: clspv %s -o %t.spv -hack-inserts -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 // CHECK-NOT: OpCompositeInsert // CHECK: OpCompositeConstruct // CHECK-NOT: OpCompositeInsert typedef struct { float a, b, c, d; } S; S boo(float a) { S result = {10.0f, 11.0f, 12.0f, 13.0f}; result.c = a+2.0f; result.b = a+1.0f; // Skip filling in result.a, result.d return result; } kernel void foo(global S* data, float f) { *data = boo(f); }