mirror of
https://github.com/bkaradzic/bgfx.cmake.git
synced 2026-02-17 21:12:35 +01:00
Compare commits
7 Commits
v1.121.855
...
v1.124.866
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
871eed8f8a | ||
|
|
2f0e950b8f | ||
|
|
26af75d78b | ||
|
|
1f65bfcb44 | ||
|
|
875927a712 | ||
|
|
f46699bb4a | ||
|
|
6a8aba37ff |
2
bgfx
2
bgfx
Submodule bgfx updated: 8b6a6bdf0e...03a2c26457
2
bimg
2
bimg
Submodule bimg updated: ec02df824a...678b750128
2
bx
2
bx
Submodule bx updated: 198cd120e4...03fd6f4771
@@ -33,19 +33,6 @@ function(add_bgfx_shader FILE FOLDER)
|
||||
set(OUTPUTS_PRETTY "")
|
||||
|
||||
if(WIN32)
|
||||
# dx9
|
||||
if(NOT "${TYPE}" STREQUAL "COMPUTE")
|
||||
set(DX9_OUTPUT ${BGFX_DIR}/examples/runtime/shaders/dx9/${FILENAME}.bin)
|
||||
_bgfx_shaderc_parse(
|
||||
DX9 ${COMMON} WINDOWS
|
||||
PROFILE s_3_0
|
||||
O 3
|
||||
OUTPUT ${DX9_OUTPUT}
|
||||
)
|
||||
list(APPEND OUTPUTS "DX9")
|
||||
set(OUTPUTS_PRETTY "${OUTPUTS_PRETTY}DX9, ")
|
||||
endif()
|
||||
|
||||
# dx11
|
||||
set(DX11_OUTPUT ${BGFX_DIR}/examples/runtime/shaders/dx11/${FILENAME}.bin)
|
||||
if(NOT "${TYPE}" STREQUAL "COMPUTE")
|
||||
@@ -78,7 +65,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()
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
#include "@BGFX_DIR@/src/shader.cpp"
|
||||
#include "@BGFX_DIR@/src/shader_dx9bc.cpp"
|
||||
#include "@BGFX_DIR@/src/shader_dxbc.cpp"
|
||||
#include "@BGFX_DIR@/src/shader_spirv.cpp"
|
||||
#include "@BGFX_DIR@/src/shader_spirv.cpp"
|
||||
|
||||
@@ -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]
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -575,16 +581,8 @@ if(TARGET bgfx::shaderc)
|
||||
OR CYGWIN
|
||||
)
|
||||
set(PLATFORM WINDOWS)
|
||||
if(ARGS_TYPE STREQUAL "VERTEX" OR ARGS_TYPE STREQUAL "FRAGMENT")
|
||||
list(APPEND PROFILES s_3_0)
|
||||
list(APPEND PROFILES s_4_0)
|
||||
list(APPEND PROFILES s_5_0)
|
||||
elseif(ARGS_TYPE STREQUAL "COMPUTE")
|
||||
list(APPEND PROFILES s_4_0)
|
||||
list(APPEND PROFILES s_5_0)
|
||||
else()
|
||||
message(error "shaderc: Unsupported type")
|
||||
endif()
|
||||
list(APPEND PROFILES s_4_0)
|
||||
list(APPEND PROFILES s_5_0)
|
||||
else()
|
||||
message(error "shaderc: Unsupported platform")
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user