Add C++ samples to format_all script.
This commit is contained in:
Родитель
b96c3b002e
Коммит
5bfbe0dc36
|
@ -1,6 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
for file in spirv_*.{cpp,hpp} include/spirv_cross/*.{hpp,h}
|
||||
for file in spirv_*.{cpp,hpp} include/spirv_cross/*.{hpp,h} samples/cpp/*.cpp
|
||||
do
|
||||
echo "Formatting file: $file ..."
|
||||
clang-format -style=file -i $file
|
||||
|
|
|
@ -38,7 +38,7 @@ int main()
|
|||
// Create an instance of the shader interface.
|
||||
auto *shader = iface->construct();
|
||||
|
||||
// Build some input data for our compute shader.
|
||||
// Build some input data for our compute shader.
|
||||
#define NUM_WORKGROUPS 4
|
||||
float a[64 * NUM_WORKGROUPS];
|
||||
float b[64 * NUM_WORKGROUPS] = {};
|
||||
|
|
|
@ -38,7 +38,7 @@ int main()
|
|||
// Create an instance of the shader interface.
|
||||
auto *shader = iface->construct();
|
||||
|
||||
// Build some input data for our compute shader.
|
||||
// Build some input data for our compute shader.
|
||||
#define NUM_WORKGROUPS 4
|
||||
vec4 a[64 * NUM_WORKGROUPS];
|
||||
vec4 b[64 * NUM_WORKGROUPS];
|
||||
|
@ -85,9 +85,7 @@ int main()
|
|||
// TODO: Implement a test framework that asserts results computed.
|
||||
for (unsigned i = 0; i < 64 * NUM_WORKGROUPS; i++)
|
||||
{
|
||||
fprintf(stderr, "(%.1f, %.1f, %.1f, %.1f) * (%.1f, %.1f, %.1f, %.1f) => (%.1f, %.1f, %.1f, %.1f)\n",
|
||||
a[i].x, a[i].y, a[i].z, a[i].w,
|
||||
b[i].x, b[i].y, b[i].z, b[i].w,
|
||||
c[i].x, c[i].y, c[i].z, c[i].w);
|
||||
fprintf(stderr, "(%.1f, %.1f, %.1f, %.1f) * (%.1f, %.1f, %.1f, %.1f) => (%.1f, %.1f, %.1f, %.1f)\n", a[i].x,
|
||||
a[i].y, a[i].z, a[i].w, b[i].x, b[i].y, b[i].z, b[i].w, c[i].x, c[i].y, c[i].z, c[i].w);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -38,7 +38,7 @@ int main()
|
|||
// Create an instance of the shader interface.
|
||||
auto *shader = iface->construct();
|
||||
|
||||
// Build some input data for our compute shader.
|
||||
// Build some input data for our compute shader.
|
||||
#define NUM_WORKGROUPS 4
|
||||
float a[128 * NUM_WORKGROUPS];
|
||||
float b[NUM_WORKGROUPS] = {};
|
||||
|
|
Загрузка…
Ссылка в новой задаче