Shader debugging

main
noah metz 2024-10-28 22:57:25 -06:00
parent 173b57859f
commit 2ec837442f
3 changed files with 3 additions and 3 deletions

@ -1,5 +1,5 @@
ROOT_DIR:=$(shell dirname $(realpath $(firstword $(MAKEFILE_LIST)))) ROOT_DIR:=$(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
CFLAGS = -I $(ROOT_DIR)/include -I/usr/local/include -O0 -g -Wall -Wextra -fsanitize=address CFLAGS = -I $(ROOT_DIR)/include -I/usr/local/include -O0 -g -Wall -Wextra
LDFLAGS = -lfreetype -lz -lglfw -lvulkan -ldl -Xlinker -rpath -Xlinker /opt/homebrew/lib LDFLAGS = -lfreetype -lz -lglfw -lvulkan -ldl -Xlinker -rpath -Xlinker /opt/homebrew/lib
SOURCES = src/main.c src/draw.c src/ui.c src/gpu.c lib/spng.c lib/vma.cpp SOURCES = src/main.c src/draw.c src/ui.c src/gpu.c lib/spng.c lib/vma.cpp

@ -14,7 +14,7 @@ void main() {
uint buffer_pos = atomicAdd(pc.layer.draw.instance_count, string.len); uint buffer_pos = atomicAdd(pc.layer.draw.instance_count, string.len);
vec2 pen = vec2(0.0, 0.0); vec2 pen = vec2(0.0, 0.0);
debugPrintfEXT("String[%d] length: %d", gID, string.len); debugPrintfEXT("Frame [%d] String[%d] length: %d\n", pc.frame, gID, string.len);
for(uint i = 0; i < string.len; i++) { for(uint i = 0; i < string.len; i++) {
uint code = pc.layer.codes.c[string.offset + i]; uint code = pc.layer.codes.c[string.offset + i];

@ -175,7 +175,7 @@ VkResult main_thread(ClientContext* context) {
LayerInput fps_layer = { LayerInput fps_layer = {
.num_strings = 1, .num_strings = 1,
.strings = &fps_string, .strings = &fps_string,
.max_codes = 10, .max_codes = 1000,
}; };
ContainerInput fps_container = { ContainerInput fps_container = {