Skip to content

Commit

Permalink
_bgfx_shaderc_parse: Must have profile specified.
Browse files Browse the repository at this point in the history
  • Loading branch information
bwrsandman committed Oct 1, 2023
1 parent 8f9cf62 commit 8bd846b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmake/bgfx/examples.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ function(add_bgfx_shader FILE FOLDER)
# essl
if(NOT "${TYPE}" STREQUAL "COMPUTE")
set(ESSL_OUTPUT ${BGFX_DIR}/examples/runtime/shaders/essl/${FILENAME}.bin)
_bgfx_shaderc_parse(ESSL ${COMMON} ANDROID OUTPUT ${ESSL_OUTPUT})
_bgfx_shaderc_parse(ESSL ${COMMON} ANDROID PROFILE 100_es OUTPUT ${ESSL_OUTPUT})
list(APPEND OUTPUTS "ESSL")
set(OUTPUTS_PRETTY "${OUTPUTS_PRETTY}ESSL, ")
endif()
Expand Down
8 changes: 7 additions & 1 deletion cmake/bgfxToolUtils.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ if(TARGET bgfx::shaderc)
# OUTPUT filename
# FRAGMENT|VERTEX|COMPUTE
# ANDROID|ASM_JS|IOS|LINUX|NACL|OSX|WINDOWS
# [PROFILE profile]
# PROFILE profile
# [O 0|1|2|3]
# [VARYINGDEF filename]
# [BIN2C filename]
Expand All @@ -392,6 +392,8 @@ if(TARGET bgfx::shaderc)
# -f
if(ARG_FILE)
list(APPEND CLI "-f" "${ARG_FILE}")
else()
message(SEND_ERROR "Call to _bgfx_shaderc_parse() must have an input file path specified.")
endif()

# -i
Expand All @@ -405,6 +407,8 @@ if(TARGET bgfx::shaderc)
# -o
if(ARG_OUTPUT)
list(APPEND CLI "-o" "${ARG_OUTPUT}")
else()
message(SEND_ERROR "Call to _bgfx_shaderc_parse() must have an output file path specified.")
endif()

# --bin2c
Expand Down Expand Up @@ -518,6 +522,8 @@ if(TARGET bgfx::shaderc)
# --profile
if(ARG_PROFILE)
list(APPEND CLI "--profile" "${ARG_PROFILE}")
else()
message(SEND_ERROR "Call to _bgfx_shaderc_parse() must have a shader profile.")
endif()

# -O
Expand Down

0 comments on commit 8bd846b

Please sign in to comment.