From a5f1733a09aa99379cf48ed326b4660fbc17cb25 Mon Sep 17 00:00:00 2001 From: omniscient <17525998+omnisci3nce@users.noreply.github.com> Date: Thu, 17 Oct 2024 19:20:04 +1100 Subject: clean up enum name --- examples/triangle.c | 4 ++-- include/celeritas.h | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/examples/triangle.c b/examples/triangle.c index c304562..401b5ac 100644 --- a/examples/triangle.c +++ b/examples/triangle.c @@ -31,13 +31,13 @@ int main() { .source = NULL, .is_spirv = false, .entry_point = "vertexShader", - .shader_stage = VISIBILITY_VERTEX, + .stage = STAGE_VERTEX, }, .fragment = { .source = NULL, .is_spirv = false, .entry_point = "fragmentShader", - .shader_stage = VISIBILITY_FRAGMENT, + .stage = STAGE_FRAGMENT, }, }; diff --git a/include/celeritas.h b/include/celeritas.h index d4dab98..14e39dd 100644 --- a/include/celeritas.h +++ b/include/celeritas.h @@ -319,16 +319,16 @@ typedef enum shader_binding_type { BINDING_COUNT } shader_binding_type; -typedef enum shader_vis { - VISIBILITY_VERTEX = 1 << 0, - VISIBILITY_FRAGMENT = 1 << 1, - VISIBILITY_COMPUTE = 1 << 2, -} shader_vis; +typedef enum shader_stage { + STAGE_VERTEX = 1 << 0, + STAGE_FRAGMENT = 1 << 1, + STAGE_COMPUTE = 1 << 2, +} shader_stage; typedef struct shader_binding { const char* label; shader_binding_type binding_type; - shader_vis vis; + shader_stage visibility; union { struct { u32 size; @@ -352,7 +352,7 @@ typedef struct shader_function { const char* source; bool is_spirv; const char* entry_point; - shader_vis shader_stage; + shader_stage stage; } shader_function; typedef enum cull_mode { CULL_BACK_FACE, CULL_FRONT_FACE } cull_mode; -- cgit v1.2.3-70-g09d2