Big changes

This commit is contained in:
2026-08-26 03:18:05 -07:00
parent d09f01402d
commit 99e06bbbb1
22 changed files with 1127 additions and 135 deletions
+6 -2
View File
@@ -21,7 +21,11 @@ add_executable(testbed main.cpp)
target_link_libraries(testbed PRIVATE deps)
target_include_directories(testbed PRIVATE
"${CMAKE_SOURCE_DIR}/engine/include"
target_include_directories(testbed PRIVATE
"${CMAKE_SOURCE_DIR}/engine/include"
"${CMAKE_SOURCE_DIR}/external/imgui"
)
target_compile_definitions(testbed PRIVATE
TESTBED_SHADER_DIR="${CMAKE_CURRENT_SOURCE_DIR}/shaders"
)
+12 -3
View File
@@ -1,5 +1,6 @@
#include <iostream>
#include <sophia/application.hpp>
// #include <sophia/application.hpp>
#include <sophia/compute_smoke_test.hpp>
#include <stdexcept>
int main(int argc, const char** argv) {
@@ -7,9 +8,17 @@ int main(int argc, const char** argv) {
(void)argv;
std::cout << __FILE__ << "::" << __LINE__ << '\n';
sophia::Application app{{.width = 750, .height = 1000, .name = "Testbed"}};
try {
sophia::runComputeSmokeTest(TESTBED_SHADER_DIR "/smoke_test.comp");
} catch (const std::exception& e) {
std::cerr << "Compute smoke test failed: " << e.what() << '\n';
return EXIT_FAILURE;
}
app.run();
// sophia::Application app{
// {.width = 750, .height = 1000, .name = "Testbed", .headless = true}};
// app.run();
return EXIT_SUCCESS;
}
+12
View File
@@ -0,0 +1,12 @@
#version 450
layout(local_size_x = 64) in;
layout(std430, binding = 0) buffer Data {
float values[];
};
void main() {
uint idx = gl_GlobalInvocationID.x;
values[idx] = values[idx] * 2.0;
}