From c8ea79c6b4200761c6a9abb113eddc49ec2d77b2 Mon Sep 17 00:00:00 2001 From: Steve K Date: Tue, 17 Mar 2015 10:18:08 -0600 Subject: fix cube demo for .spv filenames --- demos/CMakeLists.txt | 14 +++++++------- demos/cube.c | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/demos/CMakeLists.txt b/demos/CMakeLists.txt index 626e4f8a..237f0d5b 100644 --- a/demos/CMakeLists.txt +++ b/demos/CMakeLists.txt @@ -24,15 +24,15 @@ if(WIN32) endif() if(NOT WIN32) set (LIBRARIES "XGL") - add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/demos/cube-vert.bil - COMMAND ${GLSLANG_PREFIX}/build/install/bin/glslangValidator -s -b ${PROJECT_SOURCE_DIR}/demos/cube.vert - COMMAND mv vert.bil ${CMAKE_BINARY_DIR}/demos/cube-vert.bil + add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/demos/cube-vert.spv + COMMAND ${GLSLANG_PREFIX}/build/install/bin/glslangValidator -s -V ${PROJECT_SOURCE_DIR}/demos/cube.vert + COMMAND mv vert.spv ${CMAKE_BINARY_DIR}/demos/cube-vert.spv DEPENDS cube.vert ${GLSLANG_PREFIX}/build/install/bin/glslangValidator ) - add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/demos/cube-frag.bil - COMMAND ${GLSLANG_PREFIX}/build/install/bin/glslangValidator -s -b ${PROJECT_SOURCE_DIR}/demos/cube.frag - COMMAND mv frag.bil ${CMAKE_BINARY_DIR}/demos/cube-frag.bil + add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/demos/cube-frag.spv + COMMAND ${GLSLANG_PREFIX}/build/install/bin/glslangValidator -s -V ${PROJECT_SOURCE_DIR}/demos/cube.frag + COMMAND mv frag.spv ${CMAKE_BINARY_DIR}/demos/cube-frag.spv DEPENDS cube.frag ${GLSLANG_PREFIX}/build/install/bin/glslangValidator ) endif() @@ -62,7 +62,7 @@ add_executable(tri tri.c) target_link_libraries(tri ${LIBRARIES}) if(NOT WIN32) - add_executable(cube cube.c ${CMAKE_BINARY_DIR}/demos/cube-vert.bil ${CMAKE_BINARY_DIR}/demos/cube-frag.bil) + add_executable(cube cube.c ${CMAKE_BINARY_DIR}/demos/cube-vert.spv ${CMAKE_BINARY_DIR}/demos/cube-frag.spv) target_link_libraries(cube ${LIBRARIES}) else() if (CMAKE_CL_64) diff --git a/demos/cube.c b/demos/cube.c index 73a0c6a5..1da70b31 100644 --- a/demos/cube.c +++ b/demos/cube.c @@ -1238,7 +1238,7 @@ static XGL_SHADER demo_prepare_vs(struct demo *demo) void *vertShaderCode; size_t size; - vertShaderCode = demo_read_bil("cube-vert.bil", &size); + vertShaderCode = demo_read_bil("cube-vert.spv", &size); return demo_prepare_shader(demo, XGL_SHADER_STAGE_VERTEX, vertShaderCode, size); @@ -1274,7 +1274,7 @@ static XGL_SHADER demo_prepare_fs(struct demo *demo) void *fragShaderCode; size_t size; - fragShaderCode = demo_read_bil("cube-frag.bil", &size); + fragShaderCode = demo_read_bil("cube-frag.spv", &size); return demo_prepare_shader(demo, XGL_SHADER_STAGE_FRAGMENT, fragShaderCode, size); -- cgit v1.2.3