diff --git a/examples/common/debugdraw/debugdraw.cpp b/examples/common/debugdraw/debugdraw.cpp index a48ab0bd2..3926acfda 100644 --- a/examples/common/debugdraw/debugdraw.cpp +++ b/examples/common/debugdraw/debugdraw.cpp @@ -288,6 +288,7 @@ static const bgfx::EmbeddedShader s_embeddedShaders[] = BGFX_EMBEDDED_SHADER(fs_debugdraw_fill), BGFX_EMBEDDED_SHADER(vs_debugdraw_fill_lit), BGFX_EMBEDDED_SHADER(fs_debugdraw_fill_lit), + BGFX_EMBEDDED_SHADER_END() }; diff --git a/examples/common/debugdraw/fs_debugdraw_fill.bin.h b/examples/common/debugdraw/fs_debugdraw_fill.bin.h index f265f7892..951a39fef 100644 --- a/examples/common/debugdraw/fs_debugdraw_fill.bin.h +++ b/examples/common/debugdraw/fs_debugdraw_fill.bin.h @@ -72,3 +72,5 @@ static const uint8_t fs_debugdraw_fill_mtl[425] = 0x33, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x5f, 0x6d, 0x74, // 3];. return _mt 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // l_o;.}... }; +extern const uint8_t* fs_debugdraw_fill_pssl; +extern const uint32_t fs_debugdraw_fill_pssl_size; diff --git a/examples/common/debugdraw/fs_debugdraw_fill_lit.bin.h b/examples/common/debugdraw/fs_debugdraw_fill_lit.bin.h index a5a9fc11f..2517a0053 100644 --- a/examples/common/debugdraw/fs_debugdraw_fill_lit.bin.h +++ b/examples/common/debugdraw/fs_debugdraw_fill_lit.bin.h @@ -166,3 +166,5 @@ static const uint8_t fs_debugdraw_fill_lit_mtl[862] = 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x33, 0x3b, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, // mpvar_3;. retur 0x6e, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // n _mtl_o;.}... }; +extern const uint8_t* fs_debugdraw_fill_lit_pssl; +extern const uint32_t fs_debugdraw_fill_lit_pssl_size; diff --git a/examples/common/debugdraw/fs_debugdraw_lines.bin.h b/examples/common/debugdraw/fs_debugdraw_lines.bin.h index ed35979c6..642c8b08c 100644 --- a/examples/common/debugdraw/fs_debugdraw_lines.bin.h +++ b/examples/common/debugdraw/fs_debugdraw_lines.bin.h @@ -68,3 +68,5 @@ static const uint8_t fs_debugdraw_lines_mtl[404] = 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, // return _mtl_o;. 0x7d, 0x0a, 0x0a, 0x00, // }... }; +extern const uint8_t* fs_debugdraw_lines_pssl; +extern const uint32_t fs_debugdraw_lines_pssl_size; diff --git a/examples/common/debugdraw/fs_debugdraw_lines_stipple.bin.h b/examples/common/debugdraw/fs_debugdraw_lines_stipple.bin.h index c672b38a7..2f8f71095 100644 --- a/examples/common/debugdraw/fs_debugdraw_lines_stipple.bin.h +++ b/examples/common/debugdraw/fs_debugdraw_lines_stipple.bin.h @@ -107,3 +107,5 @@ static const uint8_t fs_debugdraw_lines_stipple_mtl[555] = 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x5f, // lor0;. return _ 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // mtl_o;.}... }; +extern const uint8_t* fs_debugdraw_lines_stipple_pssl; +extern const uint32_t fs_debugdraw_lines_stipple_pssl_size; diff --git a/examples/common/debugdraw/vs_debugdraw_fill.bin.h b/examples/common/debugdraw/vs_debugdraw_fill.bin.h index 5af17a127..ec3254a2f 100644 --- a/examples/common/debugdraw/vs_debugdraw_fill.bin.h +++ b/examples/common/debugdraw/vs_debugdraw_fill.bin.h @@ -147,3 +147,5 @@ static const uint8_t vs_debugdraw_fill_mtl[685] = 0x61, 0x72, 0x5f, 0x31, 0x29, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, // ar_1));. return 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // _mtl_o;.}... }; +extern const uint8_t* vs_debugdraw_fill_pssl; +extern const uint32_t vs_debugdraw_fill_pssl_size; diff --git a/examples/common/debugdraw/vs_debugdraw_fill_lit.bin.h b/examples/common/debugdraw/vs_debugdraw_fill_lit.bin.h index 878a11bac..3415c6d5b 100644 --- a/examples/common/debugdraw/vs_debugdraw_fill_lit.bin.h +++ b/examples/common/debugdraw/vs_debugdraw_fill_lit.bin.h @@ -199,3 +199,5 @@ static const uint8_t vs_debugdraw_fill_lit_mtl[881] = 0x74, 0x75, 0x72, 0x6e, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, // turn _mtl_o;.}.. 0x00, // . }; +extern const uint8_t* vs_debugdraw_fill_lit_pssl; +extern const uint32_t vs_debugdraw_fill_lit_pssl_size; diff --git a/examples/common/debugdraw/vs_debugdraw_lines.bin.h b/examples/common/debugdraw/vs_debugdraw_lines.bin.h index 2b1f810b6..ae68c1afc 100644 --- a/examples/common/debugdraw/vs_debugdraw_lines.bin.h +++ b/examples/common/debugdraw/vs_debugdraw_lines.bin.h @@ -126,3 +126,5 @@ static const uint8_t vs_debugdraw_lines_mtl[673] = 0x74, 0x75, 0x72, 0x6e, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, // turn _mtl_o;.}.. 0x00, // . }; +extern const uint8_t* vs_debugdraw_lines_pssl; +extern const uint32_t vs_debugdraw_lines_pssl_size; diff --git a/examples/common/debugdraw/vs_debugdraw_lines_stipple.bin.h b/examples/common/debugdraw/vs_debugdraw_lines_stipple.bin.h index 562779598..bae843461 100644 --- a/examples/common/debugdraw/vs_debugdraw_lines_stipple.bin.h +++ b/examples/common/debugdraw/vs_debugdraw_lines_stipple.bin.h @@ -147,3 +147,5 @@ static const uint8_t vs_debugdraw_lines_stipple_mtl[771] = 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, 0x7d, // return _mtl_o;.} 0x0a, 0x0a, 0x00, // ... }; +extern const uint8_t* vs_debugdraw_lines_stipple_pssl; +extern const uint32_t vs_debugdraw_lines_stipple_pssl_size; diff --git a/examples/common/imgui/fs_imgui_color.bin.h b/examples/common/imgui/fs_imgui_color.bin.h index bdf229ca5..3f1d1c831 100644 --- a/examples/common/imgui/fs_imgui_color.bin.h +++ b/examples/common/imgui/fs_imgui_color.bin.h @@ -68,3 +68,5 @@ static const uint8_t fs_imgui_color_mtl[404] = 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, // return _mtl_o;. 0x7d, 0x0a, 0x0a, 0x00, // }... }; +extern const uint8_t* fs_imgui_color_pssl; +extern const uint32_t fs_imgui_color_pssl_size; diff --git a/examples/common/imgui/fs_imgui_cubemap.bin.h b/examples/common/imgui/fs_imgui_cubemap.bin.h index 370219845..ba8a5c2cc 100644 --- a/examples/common/imgui/fs_imgui_cubemap.bin.h +++ b/examples/common/imgui/fs_imgui_cubemap.bin.h @@ -138,3 +138,5 @@ static const uint8_t fs_imgui_cubemap_mtl[848] = 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x33, 0x3b, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x74, // tmpvar_3;. ret 0x75, 0x72, 0x6e, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // urn _mtl_o;.}... }; +extern const uint8_t* fs_imgui_cubemap_pssl; +extern const uint32_t fs_imgui_cubemap_pssl_size; diff --git a/examples/common/imgui/fs_imgui_image.bin.h b/examples/common/imgui/fs_imgui_image.bin.h index 1aef9c434..758a3bd4f 100644 --- a/examples/common/imgui/fs_imgui_image.bin.h +++ b/examples/common/imgui/fs_imgui_image.bin.h @@ -140,3 +140,5 @@ static const uint8_t fs_imgui_image_mtl[852] = 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, // return _mtl_o;. 0x7d, 0x0a, 0x0a, 0x00, // }... }; +extern const uint8_t* fs_imgui_image_pssl; +extern const uint32_t fs_imgui_image_pssl_size; diff --git a/examples/common/imgui/fs_imgui_image_swizz.bin.h b/examples/common/imgui/fs_imgui_image_swizz.bin.h index 7b2c8ee02..da164a440 100644 --- a/examples/common/imgui/fs_imgui_image_swizz.bin.h +++ b/examples/common/imgui/fs_imgui_image_swizz.bin.h @@ -173,3 +173,5 @@ static const uint8_t fs_imgui_image_swizz_mtl[1065] = 0x5f, 0x35, 0x3b, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x5f, 0x6d, 0x74, // _5;. return _mt 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // l_o;.}... }; +extern const uint8_t* fs_imgui_image_swizz_pssl; +extern const uint32_t fs_imgui_image_swizz_pssl_size; diff --git a/examples/common/imgui/fs_imgui_latlong.bin.h b/examples/common/imgui/fs_imgui_latlong.bin.h index 11e41bb52..12a6868c1 100644 --- a/examples/common/imgui/fs_imgui_latlong.bin.h +++ b/examples/common/imgui/fs_imgui_latlong.bin.h @@ -197,3 +197,5 @@ static const uint8_t fs_imgui_latlong_mtl[1139] = 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, 0x7d, // return _mtl_o;.} 0x0a, 0x0a, 0x00, // ... }; +extern const uint8_t* fs_imgui_latlong_pssl; +extern const uint32_t fs_imgui_latlong_pssl_size; diff --git a/examples/common/imgui/fs_imgui_texture.bin.h b/examples/common/imgui/fs_imgui_texture.bin.h index d1e110d86..e595a2e59 100644 --- a/examples/common/imgui/fs_imgui_texture.bin.h +++ b/examples/common/imgui/fs_imgui_texture.bin.h @@ -120,3 +120,5 @@ static const uint8_t fs_imgui_texture_mtl[754] = 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, 0x7d, 0x0a, // eturn _mtl_o;.}. 0x0a, 0x00, // .. }; +extern const uint8_t* fs_imgui_texture_pssl; +extern const uint32_t fs_imgui_texture_pssl_size; diff --git a/examples/common/imgui/fs_ocornut_imgui.bin.h b/examples/common/imgui/fs_ocornut_imgui.bin.h index 8b41c7a37..5d950fa0b 100644 --- a/examples/common/imgui/fs_ocornut_imgui.bin.h +++ b/examples/common/imgui/fs_ocornut_imgui.bin.h @@ -105,3 +105,5 @@ static const uint8_t fs_ocornut_imgui_mtl[640] = 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x29, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x74, // _color0));. ret 0x75, 0x72, 0x6e, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // urn _mtl_o;.}... }; +extern const uint8_t* fs_ocornut_imgui_pssl; +extern const uint32_t fs_ocornut_imgui_pssl_size; diff --git a/examples/common/imgui/imgui.cpp b/examples/common/imgui/imgui.cpp index 8326458f3..04935e54a 100644 --- a/examples/common/imgui/imgui.cpp +++ b/examples/common/imgui/imgui.cpp @@ -62,6 +62,8 @@ static const bgfx::EmbeddedShader s_embeddedShaders[] = BGFX_EMBEDDED_SHADER(vs_imgui_image), BGFX_EMBEDDED_SHADER(fs_imgui_image), BGFX_EMBEDDED_SHADER(fs_imgui_image_swizz), + + BGFX_EMBEDDED_SHADER_END() }; // embedded font diff --git a/examples/common/imgui/ocornut_imgui.cpp b/examples/common/imgui/ocornut_imgui.cpp index 6043677d8..d15f96f61 100644 --- a/examples/common/imgui/ocornut_imgui.cpp +++ b/examples/common/imgui/ocornut_imgui.cpp @@ -41,6 +41,8 @@ static const bgfx::EmbeddedShader s_embeddedShaders[] = { BGFX_EMBEDDED_SHADER(vs_ocornut_imgui), BGFX_EMBEDDED_SHADER(fs_ocornut_imgui), + + BGFX_EMBEDDED_SHADER_END() }; struct FontRangeMerge diff --git a/examples/common/imgui/vs_imgui_color.bin.h b/examples/common/imgui/vs_imgui_color.bin.h index 81e9f2f03..5cd89293c 100644 --- a/examples/common/imgui/vs_imgui_color.bin.h +++ b/examples/common/imgui/vs_imgui_color.bin.h @@ -122,3 +122,5 @@ static const uint8_t vs_imgui_color_mtl[674] = 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, 0x7d, 0x0a, // eturn _mtl_o;.}. 0x0a, 0x00, // .. }; +extern const uint8_t* vs_imgui_color_pssl; +extern const uint32_t vs_imgui_color_pssl_size; diff --git a/examples/common/imgui/vs_imgui_cubemap.bin.h b/examples/common/imgui/vs_imgui_cubemap.bin.h index 2ac0d8167..55a631bc7 100644 --- a/examples/common/imgui/vs_imgui_cubemap.bin.h +++ b/examples/common/imgui/vs_imgui_cubemap.bin.h @@ -126,3 +126,5 @@ static const uint8_t vs_imgui_cubemap_mtl[677] = 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x3b, // return _mtl_o; 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // .}... }; +extern const uint8_t* vs_imgui_cubemap_pssl; +extern const uint32_t vs_imgui_cubemap_pssl_size; diff --git a/examples/common/imgui/vs_imgui_image.bin.h b/examples/common/imgui/vs_imgui_image.bin.h index 635e613bd..fd1e81c01 100644 --- a/examples/common/imgui/vs_imgui_image.bin.h +++ b/examples/common/imgui/vs_imgui_image.bin.h @@ -122,3 +122,5 @@ static const uint8_t vs_imgui_image_mtl[686] = 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, // xcoord0;. retur 0x6e, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // n _mtl_o;.}... }; +extern const uint8_t* vs_imgui_image_pssl; +extern const uint32_t vs_imgui_image_pssl_size; diff --git a/examples/common/imgui/vs_imgui_latlong.bin.h b/examples/common/imgui/vs_imgui_latlong.bin.h index 0db504fd7..2c4c6e2eb 100644 --- a/examples/common/imgui/vs_imgui_latlong.bin.h +++ b/examples/common/imgui/vs_imgui_latlong.bin.h @@ -128,3 +128,5 @@ static const uint8_t vs_imgui_latlong_mtl[685] = 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, // coord0;. return 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // _mtl_o;.}... }; +extern const uint8_t* vs_imgui_latlong_pssl; +extern const uint32_t vs_imgui_latlong_pssl_size; diff --git a/examples/common/imgui/vs_imgui_texture.bin.h b/examples/common/imgui/vs_imgui_texture.bin.h index 879d22d79..6bfcf779a 100644 --- a/examples/common/imgui/vs_imgui_texture.bin.h +++ b/examples/common/imgui/vs_imgui_texture.bin.h @@ -142,3 +142,5 @@ static const uint8_t vs_imgui_texture_mtl[778] = 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x5f, 0x6d, // or0;. return _m 0x74, 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // tl_o;.}... }; +extern const uint8_t* vs_imgui_texture_pssl; +extern const uint32_t vs_imgui_texture_pssl_size; diff --git a/examples/common/imgui/vs_ocornut_imgui.bin.h b/examples/common/imgui/vs_ocornut_imgui.bin.h index c11115b33..f696d458f 100644 --- a/examples/common/imgui/vs_ocornut_imgui.bin.h +++ b/examples/common/imgui/vs_ocornut_imgui.bin.h @@ -160,3 +160,5 @@ static const uint8_t vs_ocornut_imgui_mtl[880] = 0x2e, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x74, // .a_color0;. ret 0x75, 0x72, 0x6e, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // urn _mtl_o;.}... }; +extern const uint8_t* vs_ocornut_imgui_pssl; +extern const uint32_t vs_ocornut_imgui_pssl_size; diff --git a/examples/common/nanovg/fs_nanovg_fill.bin.h b/examples/common/nanovg/fs_nanovg_fill.bin.h index e4c1ece7d..8e8f5d93c 100644 --- a/examples/common/nanovg/fs_nanovg_fill.bin.h +++ b/examples/common/nanovg/fs_nanovg_fill.bin.h @@ -670,3 +670,5 @@ static const uint8_t fs_nanovg_fill_mtl[3672] = 0x31, 0x3b, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x5f, 0x6d, 0x74, 0x6c, // 1;. return _mtl 0x5f, 0x6f, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // _o;.}... }; +extern const uint8_t* fs_nanovg_fill_pssl; +extern const uint32_t fs_nanovg_fill_pssl_size; diff --git a/examples/common/nanovg/nanovg_bgfx.cpp b/examples/common/nanovg/nanovg_bgfx.cpp index bff9e2400..3475f36d2 100644 --- a/examples/common/nanovg/nanovg_bgfx.cpp +++ b/examples/common/nanovg/nanovg_bgfx.cpp @@ -36,17 +36,19 @@ BX_PRAGMA_DIAGNOSTIC_IGNORED_MSVC(4244); // warning C4244: '=' : conversion from '' to '', possible loss of data -namespace -{ #include "vs_nanovg_fill.bin.h" #include "fs_nanovg_fill.bin.h" - static const bgfx::EmbeddedShader s_embeddedShaders[] = - { - BGFX_EMBEDDED_SHADER(vs_nanovg_fill), - BGFX_EMBEDDED_SHADER(fs_nanovg_fill), - }; +static const bgfx::EmbeddedShader s_embeddedShaders[] = +{ + BGFX_EMBEDDED_SHADER(vs_nanovg_fill), + BGFX_EMBEDDED_SHADER(fs_nanovg_fill), + BGFX_EMBEDDED_SHADER_END() +}; + +namespace +{ static bgfx::VertexDecl s_nvgDecl; enum GLNVGshaderType diff --git a/examples/common/nanovg/vs_nanovg_fill.bin.h b/examples/common/nanovg/vs_nanovg_fill.bin.h index 157bf6d7f..0b348c84f 100644 --- a/examples/common/nanovg/vs_nanovg_fill.bin.h +++ b/examples/common/nanovg/vs_nanovg_fill.bin.h @@ -165,3 +165,5 @@ static const uint8_t vs_nanovg_fill_mtl[904] = 0x31, 0x3b, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x5f, 0x6d, 0x74, 0x6c, // 1;. return _mtl 0x5f, 0x6f, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // _o;.}... }; +extern const uint8_t* vs_nanovg_fill_pssl; +extern const uint32_t vs_nanovg_fill_pssl_size; diff --git a/include/bgfx/embedded_shader.h b/include/bgfx/embedded_shader.h index 536e81220..da9f6c592 100644 --- a/include/bgfx/embedded_shader.h +++ b/include/bgfx/embedded_shader.h @@ -122,7 +122,7 @@ namespace bgfx { struct Data { - bgfx::RendererType::Enum type; + RendererType::Enum type; const uint8_t* data; uint32_t size; }; diff --git a/scripts/shader-embeded.mk b/scripts/shader-embeded.mk index 14cc9c23c..cf949e9bb 100644 --- a/scripts/shader-embeded.mk +++ b/scripts/shader-embeded.mk @@ -32,6 +32,8 @@ vs_%.bin.h : vs_%.sc -@cat $(SHADER_TMP) >> $(@) -$(SILENT) $(SHADERC) $(VS_FLAGS) --platform ios -p metal -O 3 -f $(<) -o $(SHADER_TMP) --bin2c $(basename $(<))_mtl -@cat $(SHADER_TMP) >> $(@) + -@echo extern const uint8_t* $(basename $(<))_pssl;>> $(@) + -@echo extern const uint32_t $(basename $(<))_pssl_size;>> $(@) fs_%.bin.h : fs_%.sc @echo [$(<)] @@ -43,6 +45,8 @@ fs_%.bin.h : fs_%.sc -@cat $(SHADER_TMP) >> $(@) -$(SILENT) $(SHADERC) $(FS_FLAGS) --platform ios -p metal -O 3 -f $(<) -o $(SHADER_TMP) --bin2c $(basename $(<))_mtl -@cat $(SHADER_TMP) >> $(@) + -@echo extern const uint8_t* $(basename $(<))_pssl;>> $(@) + -@echo extern const uint32_t $(basename $(<))_pssl_size;>> $(@) cs_%.bin.h : cs_%.sc @echo [$(<)] @@ -50,6 +54,8 @@ cs_%.bin.h : cs_%.sc @cat $(SHADER_TMP) > $(@) -$(SILENT) $(SHADERC) $(CS_FLAGS) --platform windows -p cs_5_0 -O 1 -f $(<) -o $(SHADER_TMP) --bin2c $(basename $(<))_dx11 -@cat $(SHADER_TMP) >> $(@) + -@echo extern const uint8_t* $(basename $(<))_pssl;>> $(@) + -@echo extern const uint32_t $(basename $(<))_pssl_size;>> $(@) .PHONY: all all: $(BIN)