mirror of
https://github.com/isledecomp/isle-portable.git
synced 2026-02-03 12:31:15 +00:00
Embed compiled shaders in miniwin
This commit is contained in:
parent
fc571fd283
commit
035ba477e7
@ -18,6 +18,9 @@ else()
|
|||||||
set(NOT_MINGW OFF)
|
set(NOT_MINGW OFF)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
find_program(SDL_SHADERCROSS_BIN NAMES "shadercross")
|
||||||
|
find_package(Python3 COMPONENTS Interpreter)
|
||||||
|
|
||||||
option(ISLE_BUILD_APP "Build isle application" ON)
|
option(ISLE_BUILD_APP "Build isle application" ON)
|
||||||
option(ISLE_ASAN "Enable Address Sanitizer" OFF)
|
option(ISLE_ASAN "Enable Address Sanitizer" OFF)
|
||||||
option(ISLE_UBSAN "Enable Undefined Behavior Sanitizer" OFF)
|
option(ISLE_UBSAN "Enable Undefined Behavior Sanitizer" OFF)
|
||||||
@ -26,6 +29,7 @@ option(ISLE_DEBUG "Enable imgui debug" ON)
|
|||||||
cmake_dependent_option(ISLE_USE_DX5 "Build with internal DirectX 5 SDK" "${NOT_MINGW}" "WIN32;CMAKE_SIZEOF_VOID_P EQUAL 4" OFF)
|
cmake_dependent_option(ISLE_USE_DX5 "Build with internal DirectX 5 SDK" "${NOT_MINGW}" "WIN32;CMAKE_SIZEOF_VOID_P EQUAL 4" OFF)
|
||||||
cmake_dependent_option(ISLE_MINIWIN "Use miniwin and minimfc" ON "NOT ISLE_USE_DX5" OFF)
|
cmake_dependent_option(ISLE_MINIWIN "Use miniwin and minimfc" ON "NOT ISLE_USE_DX5" OFF)
|
||||||
cmake_dependent_option(ISLE_BUILD_CONFIG "Build CONFIG.EXE application" ON "MSVC OR ISLE_MINIWIN" OFF)
|
cmake_dependent_option(ISLE_BUILD_CONFIG "Build CONFIG.EXE application" ON "MSVC OR ISLE_MINIWIN" OFF)
|
||||||
|
cmake_dependent_option(ISLE_COMPILE_SHADERS "Compile shaders" ON "SDL_SHADERCROSS_BIN;TARGET Python3::Interpreter" OFF)
|
||||||
option(CMAKE_POSITION_INDEPENDENT_CODE "Build with -fPIC" ON)
|
option(CMAKE_POSITION_INDEPENDENT_CODE "Build with -fPIC" ON)
|
||||||
option(ENABLE_CLANG_TIDY "Enable clang-tidy")
|
option(ENABLE_CLANG_TIDY "Enable clang-tidy")
|
||||||
option(DOWNLOAD_DEPENDENCIES "Download dependencies" ON)
|
option(DOWNLOAD_DEPENDENCIES "Download dependencies" ON)
|
||||||
@ -36,6 +40,7 @@ message(STATUS "Config app: ${ISLE_BUILD_CONFIG}")
|
|||||||
message(STATUS "Internal DirectX5 SDK: ${ISLE_USE_DX5}")
|
message(STATUS "Internal DirectX5 SDK: ${ISLE_USE_DX5}")
|
||||||
message(STATUS "Internal miniwin: ${ISLE_MINIWIN}")
|
message(STATUS "Internal miniwin: ${ISLE_MINIWIN}")
|
||||||
message(STATUS "Isle debugging: ${ISLE_DEBUG}")
|
message(STATUS "Isle debugging: ${ISLE_DEBUG}")
|
||||||
|
message(STATUS "Compile shaders: ${ISLE_COMPILE_SHADERS}")
|
||||||
|
|
||||||
if (DOWNLOAD_DEPENDENCIES)
|
if (DOWNLOAD_DEPENDENCIES)
|
||||||
# FetchContent downloads and configures dependencies
|
# FetchContent downloads and configures dependencies
|
||||||
@ -97,9 +102,94 @@ add_library(miniwin STATIC EXCLUDE_FROM_ALL
|
|||||||
target_compile_definitions(miniwin PRIVATE MINIWIN_PIXELFORMAT=SDL_PIXELFORMAT_RGB565)
|
target_compile_definitions(miniwin PRIVATE MINIWIN_PIXELFORMAT=SDL_PIXELFORMAT_RGB565)
|
||||||
target_include_directories(miniwin PUBLIC "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/miniwin/miniwin/include>")
|
target_include_directories(miniwin PUBLIC "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/miniwin/miniwin/include>")
|
||||||
target_include_directories(miniwin PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/miniwin/miniwin/src/include")
|
target_include_directories(miniwin PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/miniwin/miniwin/src/include")
|
||||||
|
target_include_directories(miniwin PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/miniwin/miniwin/shaders/generated")
|
||||||
target_compile_definitions(miniwin PUBLIC "MINIWIN")
|
target_compile_definitions(miniwin PUBLIC "MINIWIN")
|
||||||
target_link_libraries(miniwin PRIVATE SDL3::SDL3)
|
target_link_libraries(miniwin PRIVATE SDL3::SDL3)
|
||||||
|
|
||||||
|
set(shader_src_dir "${CMAKE_CURRENT_SOURCE_DIR}/miniwin/miniwin/shaders/src")
|
||||||
|
set(shader_gen_dir "${CMAKE_CURRENT_SOURCE_DIR}/miniwin/miniwin/shaders/generated")
|
||||||
|
set(py_gencshadersource "${CMAKE_CURRENT_SOURCE_DIR}/miniwin/miniwin/shaders/gencshadersource.py")
|
||||||
|
set(miniwin_shaders
|
||||||
|
"${shader_src_dir}/PositionColor.vert.hlsl"
|
||||||
|
"${shader_src_dir}/SolidColor.frag.hlsl"
|
||||||
|
)
|
||||||
|
target_sources(miniwin PRIVATE ${py_gencshadersource})
|
||||||
|
set(shader_variables )
|
||||||
|
set(shader_headers )
|
||||||
|
set(shader_stages )
|
||||||
|
foreach(shader_src IN LISTS miniwin_shaders)
|
||||||
|
get_filename_component(filename_wle "${shader_src}" NAME_WLE)
|
||||||
|
get_filename_component(shader_name "${filename_wle}" NAME_WLE)
|
||||||
|
get_filename_component(src_format_ext "${shader_src}" LAST_EXT)
|
||||||
|
get_filename_component(src_stage_ext "${filename_wle}" LAST_EXT)
|
||||||
|
string(MAKE_C_IDENTIFIER "${filename_wle}" shader_variable)
|
||||||
|
set(shader_json "${shader_src}.json")
|
||||||
|
if(src_format_ext STREQUAL ".hlsl")
|
||||||
|
set(src_format "HLSL")
|
||||||
|
else()
|
||||||
|
message(FATAL_ERROR "Unknown source format (${src_format_ext})")
|
||||||
|
endif()
|
||||||
|
if(src_stage_ext STREQUAL ".vert")
|
||||||
|
set(shader_stage "vertex")
|
||||||
|
elseif(src_stage_ext STREQUAL ".frag")
|
||||||
|
set(shader_stage "fragment")
|
||||||
|
elseif(src_stage_ext STREQUAL ".comp")
|
||||||
|
set(shader_stage "compute")
|
||||||
|
message(FATAL_ERROR "Compute shaders are not (yet) supported")
|
||||||
|
else()
|
||||||
|
message(FATAL_ERROR "Unknown stage (${src_stage_ext})")
|
||||||
|
endif()
|
||||||
|
set(compiled_bindir "${CMAKE_CURRENT_BINARY_DIR}/shaders/compiled")
|
||||||
|
set(compiled_srcdir "${CMAKE_CURRENT_SOURCE_DIR}/miniwin/miniwin/shaders/compiled")
|
||||||
|
set(dxil "${compiled_bindir}/dxil/${filename_wle}.dxil")
|
||||||
|
set(msl "${compiled_bindir}/msl/${filename_wle}.msl")
|
||||||
|
set(spirv "${compiled_bindir}/spirv/${filename_wle}.spv")
|
||||||
|
set(shader_filename "${filename_wle}.h")
|
||||||
|
set(shader_header "${shader_gen_dir}/${shader_filename}")
|
||||||
|
if(ISLE_COMPILE_SHADERS)
|
||||||
|
add_custom_command(OUTPUT "${dxil}"
|
||||||
|
COMMAND "${SDL_SHADERCROSS_BIN}" "${shader_src}" -o "${dxil}"
|
||||||
|
-s "${src_format}" -d "DXIL" -t "${shader_stage}"
|
||||||
|
DEPENDS "${shader_src}")
|
||||||
|
add_custom_command(OUTPUT "${msl}"
|
||||||
|
COMMAND "${SDL_SHADERCROSS_BIN}" "${shader_src}" -o "${msl}"
|
||||||
|
-s "${src_format}" -d "MSL" -t "${shader_stage}"
|
||||||
|
DEPENDS "${shader_src}")
|
||||||
|
add_custom_command(OUTPUT "${spirv}"
|
||||||
|
COMMAND "${SDL_SHADERCROSS_BIN}" "${shader_src}" -o "${spirv}"
|
||||||
|
-s "${src_format}" -d "SPIRV" -t "${shader_stage}"
|
||||||
|
DEPENDS "${shader_src}")
|
||||||
|
add_custom_command(OUTPUT "${shader_header}"
|
||||||
|
COMMAND Python3::Interpreter "${py_gencshadersource}" "header" "--output" "${shader_header}"
|
||||||
|
"--stage" "${shader_stage}" "--variable" "${shader_variable}"
|
||||||
|
"--dxil" "${dxil}" "--msl" "${msl}" "--spirv" "${spirv}"
|
||||||
|
DEPENDS "${py_gencshadersource}" "${dxil}" "${msl}" "${spirv}")
|
||||||
|
endif()
|
||||||
|
target_sources(miniwin PRIVATE "${shader_src}" "${shader_header}")
|
||||||
|
list(APPEND shader_names "${shader_name}")
|
||||||
|
list(APPEND shader_variables "${shader_variable}")
|
||||||
|
list(APPEND shader_headers "${shader_header}")
|
||||||
|
list(APPEND shader_stages "${shader_stage}")
|
||||||
|
list(APPEND shader_jsons "${shader_json}")
|
||||||
|
endforeach()
|
||||||
|
|
||||||
|
set(index_cpp "${shader_gen_dir}/ShaderIndex.cpp")
|
||||||
|
set(index_h "${shader_gen_dir}/ShaderIndex.h")
|
||||||
|
|
||||||
|
if(ISLE_COMPILE_SHADERS)
|
||||||
|
add_custom_command(OUTPUT "${index_h}" "${index_cpp}"
|
||||||
|
COMMAND Python3::Interpreter "${py_gencshadersource}" "index"
|
||||||
|
"--output" "${index_cpp}"
|
||||||
|
"--header" "${index_h}"
|
||||||
|
"--shader-names" ${shader_names}
|
||||||
|
"--shader-variables" ${shader_variables}
|
||||||
|
"--shader-headers" ${shader_headers}
|
||||||
|
"--shader-stages" ${shader_stages}
|
||||||
|
"--shader-jsons" ${shader_jsons}
|
||||||
|
DEPENDS "${py_gencshadersource}" ${shader_headers} ${shader_jsons})
|
||||||
|
endif()
|
||||||
|
target_sources(miniwin PRIVATE "${index}" "${index_cpp}")
|
||||||
|
|
||||||
add_library(minimfc STATIC EXCLUDE_FROM_ALL
|
add_library(minimfc STATIC EXCLUDE_FROM_ALL
|
||||||
miniwin/minimfc/src/minimfc.cpp
|
miniwin/minimfc/src/minimfc.cpp
|
||||||
)
|
)
|
||||||
|
|||||||
224
miniwin/miniwin/shaders/gencshadersource.py
Normal file
224
miniwin/miniwin/shaders/gencshadersource.py
Normal file
@ -0,0 +1,224 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
|
import argparse
|
||||||
|
import dataclasses
|
||||||
|
import enum
|
||||||
|
import itertools
|
||||||
|
import json
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
|
||||||
|
@dataclasses.dataclass
|
||||||
|
class ShaderJsonMetadata:
|
||||||
|
num_samplers: int
|
||||||
|
num_storage_textures: int
|
||||||
|
num_storage_buffers: int
|
||||||
|
num_uniform_buffers: int
|
||||||
|
|
||||||
|
@dataclasses.dataclass
|
||||||
|
class ShaderMetadata:
|
||||||
|
name: str
|
||||||
|
variable: str
|
||||||
|
json: ShaderJsonMetadata
|
||||||
|
|
||||||
|
class ShaderFormat(enum.StrEnum):
|
||||||
|
SPIRV = "SDL_GPU_SHADERFORMAT_SPIRV"
|
||||||
|
DXIL = "SDL_GPU_SHADERFORMAT_DXIL"
|
||||||
|
MSL = "SDL_GPU_SHADERFORMAT_MSL"
|
||||||
|
|
||||||
|
class ShaderStage(enum.StrEnum):
|
||||||
|
VERTEX = "SDL_GPU_SHADERSTAGE_VERTEX"
|
||||||
|
FRAGMENT = "SDL_GPU_SHADERSTAGE_FRAGMENT"
|
||||||
|
|
||||||
|
STR_TO_SHADERSTAGE = {
|
||||||
|
"vertex": ShaderStage.VERTEX,
|
||||||
|
"fragment": ShaderStage.FRAGMENT,
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
def write_generated_warning(f: "io") -> None:
|
||||||
|
f.write("// +==============================================+\n")
|
||||||
|
f.write("// | This file is auto-generated, do not edit it. |\n")
|
||||||
|
f.write("// +==============================================+\n")
|
||||||
|
f.write("\n")
|
||||||
|
|
||||||
|
def write_uint8_array(f: "io", variable: str, data: bytes) -> None:
|
||||||
|
f.write(f"static const Uint8 {variable}[{len(data)}] = {{\n")
|
||||||
|
for rowdata in itertools.batched(data, 16):
|
||||||
|
f.write(" "),
|
||||||
|
f.write(", ".join(f"0x{d:02x}" for d in rowdata))
|
||||||
|
f.write(",\n")
|
||||||
|
f.write(f"}};\n")
|
||||||
|
|
||||||
|
def write_gpushadercreateinfo(f: "io", shader_metadata: ShaderMetadata, entrypoint: str, suffix: str, format: ShaderFormat, stage: ShaderStage):
|
||||||
|
f.write(f" {{\n")
|
||||||
|
f.write(f" /* code_size */ sizeof({shader_metadata.variable}{suffix}),\n")
|
||||||
|
f.write(f" /* code */ {shader_metadata.variable}{suffix},\n")
|
||||||
|
f.write(f" /* entrypoint */ \"{entrypoint}\",\n")
|
||||||
|
f.write(f" /* format */ {format},\n")
|
||||||
|
f.write(f" /* stage */ {stage},\n")
|
||||||
|
f.write(f" /* num_samplers */ {shader_metadata.json.num_samplers},\n")
|
||||||
|
f.write(f" /* num_storage_textures */ {shader_metadata.json.num_storage_textures},\n")
|
||||||
|
f.write(f" /* num_storage_buffers */ {shader_metadata.json.num_storage_buffers},\n")
|
||||||
|
f.write(f" /* num_uniform_buffers */ {shader_metadata.json.num_uniform_buffers},\n")
|
||||||
|
f.write(f" }},\n")
|
||||||
|
|
||||||
|
def write_shader_switch(f: "io", suffix: str, capitalized_stage: str, shader_var_names: list[tuple[str, str]]) -> None:
|
||||||
|
f.write(f" switch (id) {{\n")
|
||||||
|
for name, var_name in shader_var_names:
|
||||||
|
f.write(f" case {capitalized_stage}ShaderId::{name}:\n")
|
||||||
|
f.write(f" *size = SDL_arraysize({var_name}{suffix});\n")
|
||||||
|
f.write(f" return {var_name}{suffix};\n")
|
||||||
|
f.write(f" default:\n")
|
||||||
|
f.write(f" SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Invalid {capitalized_stage} shader id: %d\", id);\n")
|
||||||
|
f.write(f" break;\n")
|
||||||
|
f.write(f" }}\n")
|
||||||
|
|
||||||
|
def main() -> None:
|
||||||
|
parser = argparse.ArgumentParser(allow_abbrev=False)
|
||||||
|
parser.set_defaults(subparser=None)
|
||||||
|
subparsers = parser.add_subparsers()
|
||||||
|
|
||||||
|
header_parser = subparsers.add_parser("header")
|
||||||
|
header_parser.add_argument("--stage", choices=("vertex", "fragment"), required=True)
|
||||||
|
header_parser.add_argument("--variable", required=True)
|
||||||
|
header_parser.add_argument("--dxil", type=Path, required=True)
|
||||||
|
header_parser.add_argument("--msl", type=Path, required=True)
|
||||||
|
header_parser.add_argument("--spirv", type=Path, required=True)
|
||||||
|
header_parser.add_argument("--output", "-o", type=Path, required=True)
|
||||||
|
header_parser.set_defaults(subparser="header")
|
||||||
|
|
||||||
|
index_parser = subparsers.add_parser("index")
|
||||||
|
index_parser.add_argument("--output", type=Path, required=True)
|
||||||
|
index_parser.add_argument("--header", type=Path, required=True)
|
||||||
|
index_parser.add_argument("--shader-headers", nargs="+", type=Path, required=True)
|
||||||
|
index_parser.add_argument("--shader-names", nargs="+", type=str, required=True)
|
||||||
|
index_parser.add_argument("--shader-variables", nargs="+", type=str, required=True)
|
||||||
|
index_parser.add_argument("--shader-stages", nargs="+", type=str, choices=("vertex", "fragment"), required=True)
|
||||||
|
index_parser.add_argument("--shader-jsons", nargs="+", type=Path, required=True)
|
||||||
|
index_parser.set_defaults(subparser="index")
|
||||||
|
|
||||||
|
args = parser.parse_args()
|
||||||
|
if args.subparser == "header":
|
||||||
|
variable = args.variable
|
||||||
|
if not variable.isidentifier():
|
||||||
|
parser.error(f"--variable must get an identifier ({variable})")
|
||||||
|
|
||||||
|
with args.output.open("w", newline="\n") as f:
|
||||||
|
f.write("#pragma once\n")
|
||||||
|
f.write("\n")
|
||||||
|
f.write("// clang-format off\n")
|
||||||
|
f.write("\n")
|
||||||
|
write_generated_warning(f)
|
||||||
|
f.write("#include <SDL3/SDL.h>\n")
|
||||||
|
f.write("\n")
|
||||||
|
f.write("// DXIL only makes sense on Windows platforms\n")
|
||||||
|
f.write("#if defined(SDL_PLATFORM_WINDOWS)\n")
|
||||||
|
write_uint8_array(f=f, data=args.dxil.read_bytes(), variable=variable + "_dxil")
|
||||||
|
f.write("#endif\n")
|
||||||
|
f.write("\n")
|
||||||
|
f.write("// MSL only makes sense on Apple platforms\n")
|
||||||
|
f.write("#if defined(SDL_PLATFORM_APPLE)\n")
|
||||||
|
write_uint8_array(f=f, data=args.msl.read_bytes(), variable=variable + "_msl")
|
||||||
|
f.write("#endif\n")
|
||||||
|
f.write("\n")
|
||||||
|
write_uint8_array(f=f, data=args.spirv.read_bytes(), variable=variable + "_spirv")
|
||||||
|
elif args.subparser == "index":
|
||||||
|
if len({len(args.shader_headers), len(args.shader_names), len(args.shader_variables), len(args.shader_stages), len(args.shader_jsons)}) != 1:
|
||||||
|
parser.error("--shader-headers, --shader-names, --shader-variables and --shader-stages must get same number of arguments")
|
||||||
|
|
||||||
|
stage_metadatas: dict[str,ShaderMetadata] = {
|
||||||
|
"vertex": [],
|
||||||
|
"fragment": [],
|
||||||
|
}
|
||||||
|
for str_stage, name, variable, json_path in zip(args.shader_stages, args.shader_names, args.shader_variables, args.shader_jsons):
|
||||||
|
try:
|
||||||
|
json_metadata = ShaderJsonMetadata(**json.loads(json_path.read_text()))
|
||||||
|
except IOError:
|
||||||
|
parser.error(f"Failed to open/read {json_path}")
|
||||||
|
stage_metadatas.get(str_stage).append(ShaderMetadata(name=name, variable=variable, json=json_metadata))
|
||||||
|
with args.header.open("w", newline="\n") as f:
|
||||||
|
f.write("#pragma once\n")
|
||||||
|
f.write("\n")
|
||||||
|
f.write("// clang-format off\n")
|
||||||
|
f.write("\n")
|
||||||
|
write_generated_warning(f)
|
||||||
|
f.write("#include <SDL3/SDL.h>\n")
|
||||||
|
f.write("\n")
|
||||||
|
for str_stage, shader_metadatas in stage_metadatas.items():
|
||||||
|
if not shader_metadatas:
|
||||||
|
continue
|
||||||
|
capitalized_stage = str_stage.capitalize()
|
||||||
|
f.write(f"enum {capitalized_stage}ShaderId {{\n")
|
||||||
|
for shader_metadata in shader_metadatas:
|
||||||
|
f.write(f" {shader_metadata.name},\n")
|
||||||
|
f.write("};\n\n")
|
||||||
|
for str_stage, shader_metadatas in stage_metadatas.items():
|
||||||
|
if not shader_metadatas:
|
||||||
|
continue
|
||||||
|
capitalized_stage = str_stage.capitalize()
|
||||||
|
f.write(f"const SDL_GPUShaderCreateInfo* Get{capitalized_stage}ShaderCode({capitalized_stage}ShaderId id, SDL_GPUShaderFormat formats);\n\n")
|
||||||
|
with args.output.open("w", newline="\n") as f:
|
||||||
|
f.write("// clang-format off\n")
|
||||||
|
f.write("\n")
|
||||||
|
write_generated_warning(f)
|
||||||
|
f.write(f"#include \"{args.header.name}\"\n\n")
|
||||||
|
for shader_header in args.shader_headers:
|
||||||
|
f.write(f"#include \"{shader_header.name}\"\n")
|
||||||
|
|
||||||
|
for str_stage, shader_metadatas in stage_metadatas.items():
|
||||||
|
if not shader_metadatas:
|
||||||
|
continue
|
||||||
|
capitalized_stage = str_stage.capitalize()
|
||||||
|
stage = STR_TO_SHADERSTAGE[str_stage]
|
||||||
|
f.write("\n")
|
||||||
|
f.write("#if defined(SDL_PLATFORM_WINDOWS)\n")
|
||||||
|
f.write(f"static const SDL_GPUShaderCreateInfo {capitalized_stage}ShaderDXILCodes[] = {{\n")
|
||||||
|
f.write(f" // {capitalized_stage}ShaderId::{shader_metadata.name}\n")
|
||||||
|
for shader_metadata in shader_metadatas:
|
||||||
|
write_gpushadercreateinfo(f, shader_metadata, entrypoint="main", suffix="_dxil", format=ShaderFormat.DXIL, stage=stage)
|
||||||
|
f.write(f"}};\n")
|
||||||
|
f.write("#endif\n")
|
||||||
|
f.write("\n")
|
||||||
|
f.write("#if defined(SDL_PLATFORM_APPLE)\n")
|
||||||
|
f.write(f"static const SDL_GPUShaderCreateInfo {capitalized_stage}ShaderMSLCodes[] = {{\n")
|
||||||
|
for shader_metadata in shader_metadatas:
|
||||||
|
write_gpushadercreateinfo(f, shader_metadata, entrypoint="main0", suffix="_msl", format=ShaderFormat.MSL, stage=stage)
|
||||||
|
f.write(f"}};\n")
|
||||||
|
f.write("#endif\n")
|
||||||
|
f.write("\n")
|
||||||
|
f.write(f"static const SDL_GPUShaderCreateInfo {capitalized_stage}ShaderSPIRVCodes[] = {{\n")
|
||||||
|
for shader_metadata in shader_metadatas:
|
||||||
|
write_gpushadercreateinfo(f, shader_metadata, entrypoint="main", suffix="_spirv", format=ShaderFormat.SPIRV, stage=stage)
|
||||||
|
f.write(f"}};\n")
|
||||||
|
for stage, shader_metadatas in stage_metadatas.items():
|
||||||
|
if not shader_metadatas:
|
||||||
|
continue
|
||||||
|
capitalized_stage = stage.capitalize()
|
||||||
|
f.write("\n")
|
||||||
|
f.write(f"const SDL_GPUShaderCreateInfo* Get{capitalized_stage}ShaderCode({capitalized_stage}ShaderId id, SDL_GPUShaderFormat formats) {{\n")
|
||||||
|
f.write(f"#if defined(SDL_PLATFORM_WINDOWS)\n")
|
||||||
|
f.write(f" if (formats & SDL_GPU_SHADERFORMAT_DXIL) {{\n")
|
||||||
|
f.write(f" SDL_assert(id < SDL_arraysize({capitalized_stage}ShaderDXILCodes));\n")
|
||||||
|
f.write(f" return &{capitalized_stage}ShaderDXILCodes[id];\n")
|
||||||
|
f.write(f" }}\n")
|
||||||
|
f.write(f"#endif\n")
|
||||||
|
f.write(f"#if defined(SDL_PLATFORM_APPLE)\n")
|
||||||
|
f.write(f" if (formats & SDL_GPU_SHADERFORMAT_MSL) {{\n")
|
||||||
|
f.write(f" SDL_assert(id < SDL_arraysize({capitalized_stage}ShaderMSLCodes));\n")
|
||||||
|
f.write(f" return &{capitalized_stage}ShaderMSLCodes[id];\n")
|
||||||
|
f.write(f" }}\n")
|
||||||
|
f.write(f"#endif\n")
|
||||||
|
f.write(f" if (formats & SDL_GPU_SHADERFORMAT_SPIRV) {{\n")
|
||||||
|
f.write(f" SDL_assert(id < SDL_arraysize({capitalized_stage}ShaderSPIRVCodes));\n")
|
||||||
|
f.write(f" return &{capitalized_stage}ShaderSPIRVCodes[id];\n")
|
||||||
|
f.write(f" }}\n")
|
||||||
|
f.write(f" SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Could not find {stage} shader code for id=%d and formats=0x%x\", id, formats);\n")
|
||||||
|
f.write(f" return nullptr;\n")
|
||||||
|
f.write(f"}}\n")
|
||||||
|
else:
|
||||||
|
parser.error("Invalid arguments")
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
raise SystemExit(main())
|
||||||
292
miniwin/miniwin/shaders/generated/PositionColor.vert.h
Normal file
292
miniwin/miniwin/shaders/generated/PositionColor.vert.h
Normal file
@ -0,0 +1,292 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
// clang-format off
|
||||||
|
|
||||||
|
// +==============================================+
|
||||||
|
// | This file is auto-generated, do not edit it. |
|
||||||
|
// +==============================================+
|
||||||
|
|
||||||
|
#include <SDL3/SDL.h>
|
||||||
|
|
||||||
|
// DXIL only makes sense on Windows platforms
|
||||||
|
#if defined(SDL_PLATFORM_WINDOWS)
|
||||||
|
static const Uint8 PositionColor_vert_dxil[3156] = {
|
||||||
|
0x44, 0x58, 0x42, 0x43, 0x53, 0xa3, 0xb7, 0xd9, 0xcb, 0x0b, 0xfc, 0x32, 0x70, 0xb9, 0xa0, 0x7f,
|
||||||
|
0x50, 0xe8, 0x3c, 0x29, 0x01, 0x00, 0x00, 0x00, 0x54, 0x0c, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00,
|
||||||
|
0x3c, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0xa8, 0x00, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00,
|
||||||
|
0xec, 0x01, 0x00, 0x00, 0xd0, 0x06, 0x00, 0x00, 0xec, 0x06, 0x00, 0x00, 0x53, 0x46, 0x49, 0x30,
|
||||||
|
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0x53, 0x47, 0x31,
|
||||||
|
0x54, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x07, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x48, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
|
||||||
|
0x01, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x45, 0x58, 0x43,
|
||||||
|
0x4f, 0x4f, 0x52, 0x44, 0x00, 0x00, 0x00, 0x00, 0x4f, 0x53, 0x47, 0x31, 0x60, 0x00, 0x00, 0x00,
|
||||||
|
0x02, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x51, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
|
||||||
|
0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44,
|
||||||
|
0x00, 0x53, 0x56, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x50, 0x53, 0x56, 0x30, 0xd4, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x02, 0x02, 0x00, 0x02, 0x02, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52,
|
||||||
|
0x44, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f,
|
||||||
|
0x4f, 0x52, 0x44, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x43, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00,
|
||||||
|
0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x44, 0x00, 0x03, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x44, 0x00, 0x03, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x44, 0x03, 0x03, 0x04, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
|
||||||
|
0x20, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
|
||||||
|
0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x53, 0x54, 0x41, 0x54,
|
||||||
|
0xdc, 0x04, 0x00, 0x00, 0x60, 0x00, 0x01, 0x00, 0x37, 0x01, 0x00, 0x00, 0x44, 0x58, 0x49, 0x4c,
|
||||||
|
0x00, 0x01, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0xc4, 0x04, 0x00, 0x00, 0x42, 0x43, 0xc0, 0xde,
|
||||||
|
0x21, 0x0c, 0x00, 0x00, 0x2e, 0x01, 0x00, 0x00, 0x0b, 0x82, 0x20, 0x00, 0x02, 0x00, 0x00, 0x00,
|
||||||
|
0x13, 0x00, 0x00, 0x00, 0x07, 0x81, 0x23, 0x91, 0x41, 0xc8, 0x04, 0x49, 0x06, 0x10, 0x32, 0x39,
|
||||||
|
0x92, 0x01, 0x84, 0x0c, 0x25, 0x05, 0x08, 0x19, 0x1e, 0x04, 0x8b, 0x62, 0x80, 0x10, 0x45, 0x02,
|
||||||
|
0x42, 0x92, 0x0b, 0x42, 0x84, 0x10, 0x32, 0x14, 0x38, 0x08, 0x18, 0x4b, 0x0a, 0x32, 0x42, 0x88,
|
||||||
|
0x48, 0x90, 0x14, 0x20, 0x43, 0x46, 0x88, 0xa5, 0x00, 0x19, 0x32, 0x42, 0xe4, 0x48, 0x0e, 0x90,
|
||||||
|
0x11, 0x22, 0xc4, 0x50, 0x41, 0x51, 0x81, 0x8c, 0xe1, 0x83, 0xe5, 0x8a, 0x04, 0x21, 0x46, 0x06,
|
||||||
|
0x51, 0x18, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x1b, 0x8c, 0xe0, 0xff, 0xff, 0xff, 0xff, 0x07,
|
||||||
|
0x40, 0x02, 0xa8, 0x0d, 0x84, 0xf0, 0xff, 0xff, 0xff, 0xff, 0x03, 0x20, 0x01, 0x00, 0x00, 0x00,
|
||||||
|
0x49, 0x18, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x13, 0x82, 0x60, 0x42, 0x20, 0x00, 0x00, 0x00,
|
||||||
|
0x89, 0x20, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x32, 0x22, 0x08, 0x09, 0x20, 0x64, 0x85, 0x04,
|
||||||
|
0x13, 0x22, 0xa4, 0x84, 0x04, 0x13, 0x22, 0xe3, 0x84, 0xa1, 0x90, 0x14, 0x12, 0x4c, 0x88, 0x8c,
|
||||||
|
0x0b, 0x84, 0x84, 0x4c, 0x10, 0x30, 0x23, 0x00, 0x25, 0x00, 0x8a, 0x19, 0x80, 0x39, 0x02, 0x30,
|
||||||
|
0x98, 0x23, 0x40, 0x8a, 0x31, 0x44, 0x54, 0x44, 0x56, 0x0c, 0x20, 0xa2, 0x1a, 0xc2, 0x81, 0x80,
|
||||||
|
0x54, 0x20, 0x00, 0x00, 0x13, 0x14, 0x72, 0xc0, 0x87, 0x74, 0x60, 0x87, 0x36, 0x68, 0x87, 0x79,
|
||||||
|
0x68, 0x03, 0x72, 0xc0, 0x87, 0x0d, 0xaf, 0x50, 0x0e, 0x6d, 0xd0, 0x0e, 0x7a, 0x50, 0x0e, 0x6d,
|
||||||
|
0x00, 0x0f, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0xa0,
|
||||||
|
0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x78, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e,
|
||||||
|
0x71, 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06, 0xe9, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73,
|
||||||
|
0x20, 0x07, 0x6d, 0x90, 0x0e, 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xd0, 0x06, 0xe6, 0x10,
|
||||||
|
0x07, 0x76, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x60, 0x0e, 0x73, 0x20, 0x07, 0x7a, 0x30, 0x07,
|
||||||
|
0x72, 0xd0, 0x06, 0xe6, 0x60, 0x07, 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x6d, 0xe0, 0x0e, 0x78,
|
||||||
|
0xa0, 0x07, 0x71, 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x43, 0x9e,
|
||||||
|
0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x86, 0x3c, 0x06, 0x10, 0x00,
|
||||||
|
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x79, 0x10, 0x20, 0x00, 0x04, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0xc8, 0x02, 0x01, 0x0d, 0x00, 0x00, 0x00, 0x32, 0x1e, 0x98, 0x14,
|
||||||
|
0x19, 0x11, 0x4c, 0x90, 0x8c, 0x09, 0x26, 0x47, 0xc6, 0x04, 0x43, 0xa2, 0x12, 0x18, 0x01, 0x28,
|
||||||
|
0x86, 0x32, 0x28, 0x87, 0xf2, 0x28, 0x90, 0x82, 0xa0, 0x2a, 0x89, 0x11, 0x80, 0x32, 0x28, 0x84,
|
||||||
|
0x22, 0xa0, 0x1d, 0x4b, 0x41, 0x10, 0x08, 0x0c, 0x40, 0x01, 0x08, 0x04, 0x02, 0x01, 0x00, 0x00,
|
||||||
|
0x79, 0x18, 0x00, 0x00, 0x62, 0x00, 0x00, 0x00, 0x1a, 0x03, 0x4c, 0x90, 0x46, 0x02, 0x13, 0xc4,
|
||||||
|
0x31, 0x20, 0xc3, 0x1b, 0x43, 0x81, 0x93, 0x4b, 0xb3, 0x0b, 0xa3, 0x2b, 0x4b, 0x01, 0x89, 0x71,
|
||||||
|
0xc1, 0x71, 0x81, 0x71, 0xa1, 0xb9, 0xc1, 0xc9, 0x01, 0x41, 0x11, 0xa3, 0xb9, 0x89, 0x89, 0xc1,
|
||||||
|
0x99, 0xc9, 0x29, 0x4b, 0xd9, 0x10, 0x04, 0x13, 0x04, 0x62, 0x98, 0x20, 0x10, 0xc4, 0x06, 0x61,
|
||||||
|
0x20, 0x36, 0x08, 0x04, 0x41, 0xc1, 0x6e, 0x6e, 0x82, 0x40, 0x14, 0x1b, 0x86, 0x03, 0x21, 0x26,
|
||||||
|
0x08, 0x02, 0xb0, 0x01, 0xd8, 0x30, 0x10, 0xcb, 0xb2, 0x21, 0x60, 0x36, 0x0c, 0x83, 0xd2, 0x4c,
|
||||||
|
0x10, 0x16, 0x68, 0x43, 0xf0, 0x90, 0x68, 0x0b, 0x4b, 0x73, 0x23, 0x42, 0x55, 0x84, 0x35, 0xf4,
|
||||||
|
0xf4, 0x24, 0x45, 0x34, 0x41, 0x28, 0x96, 0x09, 0x42, 0xc1, 0x6c, 0x08, 0x88, 0x09, 0x42, 0xd1,
|
||||||
|
0x4c, 0x10, 0x08, 0x63, 0x82, 0x40, 0x1c, 0x1b, 0x84, 0x0b, 0xdb, 0xb0, 0x10, 0xd2, 0x44, 0x55,
|
||||||
|
0xd4, 0x60, 0x11, 0x54, 0xb6, 0x21, 0x18, 0x26, 0x08, 0x85, 0x33, 0x41, 0x20, 0x90, 0x0d, 0xc2,
|
||||||
|
0xd5, 0x6d, 0x58, 0x06, 0x69, 0xa2, 0x36, 0x6a, 0xe0, 0x06, 0xca, 0xdb, 0x20, 0x68, 0xdf, 0x04,
|
||||||
|
0xa1, 0x78, 0x36, 0x2c, 0x84, 0x34, 0x51, 0x55, 0x18, 0x0c, 0x1c, 0x41, 0x79, 0x5c, 0xa6, 0xac,
|
||||||
|
0xbe, 0xa0, 0xde, 0xe6, 0xd2, 0xe8, 0xd2, 0xde, 0xdc, 0x36, 0x2c, 0xc3, 0x18, 0x4c, 0x56, 0xc5,
|
||||||
|
0x0d, 0xdc, 0x40, 0x79, 0x1b, 0x04, 0x31, 0x20, 0x83, 0x0d, 0x03, 0x18, 0x94, 0x01, 0xb0, 0xa1,
|
||||||
|
0x50, 0x22, 0x33, 0x00, 0x00, 0x16, 0x69, 0x6e, 0x73, 0x74, 0x73, 0x13, 0x04, 0x22, 0xa1, 0x31,
|
||||||
|
0x97, 0x76, 0xf6, 0xc5, 0x46, 0x46, 0x63, 0x2e, 0xed, 0xec, 0x6b, 0x8e, 0x6e, 0x82, 0x40, 0x28,
|
||||||
|
0x1b, 0x0c, 0x34, 0x48, 0x03, 0x35, 0xc0, 0xd6, 0x80, 0x0d, 0xaa, 0xb0, 0xb1, 0xd9, 0xb5, 0xb9,
|
||||||
|
0xa4, 0x91, 0x95, 0xb9, 0xd1, 0x4d, 0x09, 0x82, 0x2a, 0x64, 0x78, 0x2e, 0x76, 0x65, 0x72, 0x73,
|
||||||
|
0x69, 0x6f, 0x6e, 0x53, 0x02, 0xa2, 0x09, 0x19, 0x9e, 0x8b, 0x5d, 0x18, 0x9b, 0x5d, 0x99, 0xdc,
|
||||||
|
0x94, 0xa0, 0xa8, 0x43, 0x86, 0xe7, 0x32, 0x87, 0x16, 0x46, 0x56, 0x26, 0xd7, 0xf4, 0x46, 0x56,
|
||||||
|
0xc6, 0x36, 0x25, 0x40, 0x2a, 0x91, 0xe1, 0xb9, 0xd0, 0xe5, 0xc1, 0x95, 0x05, 0xb9, 0xb9, 0xbd,
|
||||||
|
0xd1, 0x85, 0xd1, 0xa5, 0xbd, 0xb9, 0xcd, 0x4d, 0x09, 0x9a, 0x3a, 0x64, 0x78, 0x2e, 0x76, 0x69,
|
||||||
|
0x65, 0x77, 0x49, 0x64, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x82, 0xa7, 0x0e, 0x19, 0x9e, 0x4b,
|
||||||
|
0x99, 0x1b, 0x9d, 0x5c, 0x1e, 0xd4, 0x5b, 0x9a, 0x1b, 0xdd, 0xdc, 0x94, 0xc0, 0x0c, 0xba, 0x90,
|
||||||
|
0xe1, 0xb9, 0x8c, 0xbd, 0xd5, 0xb9, 0xd1, 0x95, 0xc9, 0xcd, 0x4d, 0x09, 0xd8, 0x00, 0x00, 0x00,
|
||||||
|
0x79, 0x18, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x33, 0x08, 0x80, 0x1c, 0xc4, 0xe1, 0x1c, 0x66,
|
||||||
|
0x14, 0x01, 0x3d, 0x88, 0x43, 0x38, 0x84, 0xc3, 0x8c, 0x42, 0x80, 0x07, 0x79, 0x78, 0x07, 0x73,
|
||||||
|
0x98, 0x71, 0x0c, 0xe6, 0x00, 0x0f, 0xed, 0x10, 0x0e, 0xf4, 0x80, 0x0e, 0x33, 0x0c, 0x42, 0x1e,
|
||||||
|
0xc2, 0xc1, 0x1d, 0xce, 0xa1, 0x1c, 0x66, 0x30, 0x05, 0x3d, 0x88, 0x43, 0x38, 0x84, 0x83, 0x1b,
|
||||||
|
0xcc, 0x03, 0x3d, 0xc8, 0x43, 0x3d, 0x8c, 0x03, 0x3d, 0xcc, 0x78, 0x8c, 0x74, 0x70, 0x07, 0x7b,
|
||||||
|
0x08, 0x07, 0x79, 0x48, 0x87, 0x70, 0x70, 0x07, 0x7a, 0x70, 0x03, 0x76, 0x78, 0x87, 0x70, 0x20,
|
||||||
|
0x87, 0x19, 0xcc, 0x11, 0x0e, 0xec, 0x90, 0x0e, 0xe1, 0x30, 0x0f, 0x6e, 0x30, 0x0f, 0xe3, 0xf0,
|
||||||
|
0x0e, 0xf0, 0x50, 0x0e, 0x33, 0x10, 0xc4, 0x1d, 0xde, 0x21, 0x1c, 0xd8, 0x21, 0x1d, 0xc2, 0x61,
|
||||||
|
0x1e, 0x66, 0x30, 0x89, 0x3b, 0xbc, 0x83, 0x3b, 0xd0, 0x43, 0x39, 0xb4, 0x03, 0x3c, 0xbc, 0x83,
|
||||||
|
0x3c, 0x84, 0x03, 0x3b, 0xcc, 0xf0, 0x14, 0x76, 0x60, 0x07, 0x7b, 0x68, 0x07, 0x37, 0x68, 0x87,
|
||||||
|
0x72, 0x68, 0x07, 0x37, 0x80, 0x87, 0x70, 0x90, 0x87, 0x70, 0x60, 0x07, 0x76, 0x28, 0x07, 0x76,
|
||||||
|
0xf8, 0x05, 0x76, 0x78, 0x87, 0x77, 0x80, 0x87, 0x5f, 0x08, 0x87, 0x71, 0x18, 0x87, 0x72, 0x98,
|
||||||
|
0x87, 0x79, 0x98, 0x81, 0x2c, 0xee, 0xf0, 0x0e, 0xee, 0xe0, 0x0e, 0xf5, 0xc0, 0x0e, 0xec, 0x30,
|
||||||
|
0x03, 0x62, 0xc8, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xcc, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xdc, 0x61,
|
||||||
|
0x1c, 0xca, 0x21, 0x1c, 0xc4, 0x81, 0x1d, 0xca, 0x61, 0x06, 0xd6, 0x90, 0x43, 0x39, 0xc8, 0x43,
|
||||||
|
0x39, 0x98, 0x43, 0x39, 0xc8, 0x43, 0x39, 0xb8, 0xc3, 0x38, 0x94, 0x43, 0x38, 0x88, 0x03, 0x3b,
|
||||||
|
0x94, 0xc3, 0x2f, 0xbc, 0x83, 0x3c, 0xfc, 0x82, 0x3b, 0xd4, 0x03, 0x3b, 0xb0, 0xc3, 0x8c, 0xc8,
|
||||||
|
0x21, 0x07, 0x7c, 0x70, 0x03, 0x72, 0x10, 0x87, 0x73, 0x70, 0x03, 0x7b, 0x08, 0x07, 0x79, 0x60,
|
||||||
|
0x87, 0x70, 0xc8, 0x87, 0x77, 0xa8, 0x07, 0x7a, 0x98, 0x81, 0x3c, 0xe4, 0x80, 0x0f, 0x6e, 0x40,
|
||||||
|
0x0f, 0xe5, 0xd0, 0x0e, 0xf0, 0x00, 0x00, 0x00, 0x71, 0x20, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00,
|
||||||
|
0x16, 0x30, 0x0d, 0x97, 0xef, 0x3c, 0xfe, 0xe2, 0x00, 0x83, 0xd8, 0x3c, 0xd4, 0xe4, 0x17, 0xb7,
|
||||||
|
0x6d, 0x02, 0xd5, 0x70, 0xf9, 0xce, 0xe3, 0x4b, 0x93, 0x13, 0x11, 0x28, 0x35, 0x3d, 0xd4, 0xe4,
|
||||||
|
0x17, 0xb7, 0x6d, 0x00, 0x04, 0x03, 0x20, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x48, 0x41, 0x53, 0x48, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5d, 0xbb, 0xba, 0xfe,
|
||||||
|
0xcb, 0x0a, 0xd2, 0x7c, 0xaf, 0xc9, 0x76, 0x91, 0x2f, 0xa9, 0x19, 0x24, 0x44, 0x58, 0x49, 0x4c,
|
||||||
|
0x60, 0x05, 0x00, 0x00, 0x60, 0x00, 0x01, 0x00, 0x58, 0x01, 0x00, 0x00, 0x44, 0x58, 0x49, 0x4c,
|
||||||
|
0x00, 0x01, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x05, 0x00, 0x00, 0x42, 0x43, 0xc0, 0xde,
|
||||||
|
0x21, 0x0c, 0x00, 0x00, 0x4f, 0x01, 0x00, 0x00, 0x0b, 0x82, 0x20, 0x00, 0x02, 0x00, 0x00, 0x00,
|
||||||
|
0x13, 0x00, 0x00, 0x00, 0x07, 0x81, 0x23, 0x91, 0x41, 0xc8, 0x04, 0x49, 0x06, 0x10, 0x32, 0x39,
|
||||||
|
0x92, 0x01, 0x84, 0x0c, 0x25, 0x05, 0x08, 0x19, 0x1e, 0x04, 0x8b, 0x62, 0x80, 0x10, 0x45, 0x02,
|
||||||
|
0x42, 0x92, 0x0b, 0x42, 0x84, 0x10, 0x32, 0x14, 0x38, 0x08, 0x18, 0x4b, 0x0a, 0x32, 0x42, 0x88,
|
||||||
|
0x48, 0x90, 0x14, 0x20, 0x43, 0x46, 0x88, 0xa5, 0x00, 0x19, 0x32, 0x42, 0xe4, 0x48, 0x0e, 0x90,
|
||||||
|
0x11, 0x22, 0xc4, 0x50, 0x41, 0x51, 0x81, 0x8c, 0xe1, 0x83, 0xe5, 0x8a, 0x04, 0x21, 0x46, 0x06,
|
||||||
|
0x51, 0x18, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x1b, 0x8c, 0xe0, 0xff, 0xff, 0xff, 0xff, 0x07,
|
||||||
|
0x40, 0x02, 0xa8, 0x0d, 0x84, 0xf0, 0xff, 0xff, 0xff, 0xff, 0x03, 0x20, 0x01, 0x00, 0x00, 0x00,
|
||||||
|
0x49, 0x18, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x13, 0x82, 0x60, 0x42, 0x20, 0x00, 0x00, 0x00,
|
||||||
|
0x89, 0x20, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x32, 0x22, 0x08, 0x09, 0x20, 0x64, 0x85, 0x04,
|
||||||
|
0x13, 0x22, 0xa4, 0x84, 0x04, 0x13, 0x22, 0xe3, 0x84, 0xa1, 0x90, 0x14, 0x12, 0x4c, 0x88, 0x8c,
|
||||||
|
0x0b, 0x84, 0x84, 0x4c, 0x10, 0x30, 0x23, 0x00, 0x25, 0x00, 0x8a, 0x19, 0x80, 0x39, 0x02, 0x30,
|
||||||
|
0x98, 0x23, 0x40, 0x8a, 0x31, 0x44, 0x54, 0x44, 0x56, 0x0c, 0x20, 0xa2, 0x1a, 0xc2, 0x81, 0x80,
|
||||||
|
0x54, 0x20, 0x00, 0x00, 0x13, 0x14, 0x72, 0xc0, 0x87, 0x74, 0x60, 0x87, 0x36, 0x68, 0x87, 0x79,
|
||||||
|
0x68, 0x03, 0x72, 0xc0, 0x87, 0x0d, 0xaf, 0x50, 0x0e, 0x6d, 0xd0, 0x0e, 0x7a, 0x50, 0x0e, 0x6d,
|
||||||
|
0x00, 0x0f, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0xa0,
|
||||||
|
0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x78, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e,
|
||||||
|
0x71, 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06, 0xe9, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73,
|
||||||
|
0x20, 0x07, 0x6d, 0x90, 0x0e, 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xd0, 0x06, 0xe6, 0x10,
|
||||||
|
0x07, 0x76, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x60, 0x0e, 0x73, 0x20, 0x07, 0x7a, 0x30, 0x07,
|
||||||
|
0x72, 0xd0, 0x06, 0xe6, 0x60, 0x07, 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x6d, 0xe0, 0x0e, 0x78,
|
||||||
|
0xa0, 0x07, 0x71, 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x43, 0x9e,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x86, 0x3c, 0x06, 0x10, 0x00,
|
||||||
|
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x79, 0x10, 0x20, 0x00, 0x04, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0xc8, 0x02, 0x01, 0x0d, 0x00, 0x00, 0x00, 0x32, 0x1e, 0x98, 0x14,
|
||||||
|
0x19, 0x11, 0x4c, 0x90, 0x8c, 0x09, 0x26, 0x47, 0xc6, 0x04, 0x43, 0xa2, 0x12, 0x18, 0x01, 0x28,
|
||||||
|
0x88, 0x62, 0x28, 0x83, 0x72, 0x28, 0x0f, 0xaa, 0x92, 0x18, 0x01, 0x28, 0x83, 0x42, 0x28, 0x02,
|
||||||
|
0xda, 0xb1, 0x14, 0x04, 0x81, 0xc0, 0x00, 0x14, 0x80, 0x40, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x79, 0x18, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x1a, 0x03, 0x4c, 0x90, 0x46, 0x02, 0x13, 0xc4,
|
||||||
|
0x31, 0x20, 0xc3, 0x1b, 0x43, 0x81, 0x93, 0x4b, 0xb3, 0x0b, 0xa3, 0x2b, 0x4b, 0x01, 0x89, 0x71,
|
||||||
|
0xc1, 0x71, 0x81, 0x71, 0xa1, 0xb9, 0xc1, 0xc9, 0x01, 0x41, 0x11, 0xa3, 0xb9, 0x89, 0x89, 0xc1,
|
||||||
|
0x99, 0xc9, 0x29, 0x4b, 0xd9, 0x10, 0x04, 0x13, 0x04, 0x62, 0x98, 0x20, 0x10, 0xc4, 0x06, 0x61,
|
||||||
|
0x20, 0x26, 0x08, 0x44, 0xb1, 0x41, 0x18, 0x0c, 0x0a, 0x76, 0x73, 0x13, 0x04, 0xc2, 0xd8, 0x30,
|
||||||
|
0x20, 0x09, 0x31, 0x41, 0x58, 0x9e, 0x0d, 0xc1, 0x32, 0x41, 0x10, 0x00, 0x12, 0x6d, 0x61, 0x69,
|
||||||
|
0x6e, 0x44, 0xa8, 0x8a, 0xb0, 0x86, 0x9e, 0x9e, 0xa4, 0x88, 0x26, 0x08, 0x85, 0x32, 0x41, 0x28,
|
||||||
|
0x96, 0x0d, 0x01, 0x31, 0x41, 0x28, 0x98, 0x09, 0x02, 0x71, 0x4c, 0x10, 0x08, 0x64, 0x83, 0x40,
|
||||||
|
0x55, 0x1b, 0x16, 0xe2, 0x81, 0x22, 0x29, 0x1a, 0x26, 0x22, 0xb2, 0x36, 0x04, 0xc3, 0x04, 0xa1,
|
||||||
|
0x68, 0x26, 0x08, 0x44, 0xb2, 0x41, 0xa0, 0xb4, 0x0d, 0xcb, 0xf0, 0x40, 0x11, 0x16, 0x0d, 0xd9,
|
||||||
|
0x10, 0x6d, 0x1b, 0x84, 0x8b, 0x9b, 0x20, 0x14, 0xce, 0x86, 0x85, 0x78, 0xa0, 0x48, 0xf2, 0x86,
|
||||||
|
0x8c, 0x88, 0x36, 0x2e, 0x53, 0x56, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x1b,
|
||||||
|
0x96, 0x01, 0x0c, 0xa0, 0x49, 0xca, 0x86, 0x6c, 0x88, 0xb6, 0x0d, 0xc2, 0x17, 0x06, 0x1b, 0x86,
|
||||||
|
0x4e, 0x0c, 0x80, 0x0d, 0x45, 0xe3, 0x8c, 0x01, 0x00, 0x54, 0x61, 0x63, 0xb3, 0x6b, 0x73, 0x49,
|
||||||
|
0x23, 0x2b, 0x73, 0xa3, 0x9b, 0x12, 0x04, 0x55, 0xc8, 0xf0, 0x5c, 0xec, 0xca, 0xe4, 0xe6, 0xd2,
|
||||||
|
0xde, 0xdc, 0xa6, 0x04, 0x44, 0x13, 0x32, 0x3c, 0x17, 0xbb, 0x30, 0x36, 0xbb, 0x32, 0xb9, 0x29,
|
||||||
|
0x81, 0x51, 0x87, 0x0c, 0xcf, 0x65, 0x0e, 0x2d, 0x8c, 0xac, 0x4c, 0xae, 0xe9, 0x8d, 0xac, 0x8c,
|
||||||
|
0x6d, 0x4a, 0x90, 0xd4, 0x21, 0xc3, 0x73, 0xb1, 0x4b, 0x2b, 0xbb, 0x4b, 0x22, 0x9b, 0xa2, 0x0b,
|
||||||
|
0xa3, 0x2b, 0x9b, 0x12, 0x2c, 0x75, 0xc8, 0xf0, 0x5c, 0xca, 0xdc, 0xe8, 0xe4, 0xf2, 0xa0, 0xde,
|
||||||
|
0xd2, 0xdc, 0xe8, 0xe6, 0xa6, 0x04, 0x63, 0x00, 0x79, 0x18, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00,
|
||||||
|
0x33, 0x08, 0x80, 0x1c, 0xc4, 0xe1, 0x1c, 0x66, 0x14, 0x01, 0x3d, 0x88, 0x43, 0x38, 0x84, 0xc3,
|
||||||
|
0x8c, 0x42, 0x80, 0x07, 0x79, 0x78, 0x07, 0x73, 0x98, 0x71, 0x0c, 0xe6, 0x00, 0x0f, 0xed, 0x10,
|
||||||
|
0x0e, 0xf4, 0x80, 0x0e, 0x33, 0x0c, 0x42, 0x1e, 0xc2, 0xc1, 0x1d, 0xce, 0xa1, 0x1c, 0x66, 0x30,
|
||||||
|
0x05, 0x3d, 0x88, 0x43, 0x38, 0x84, 0x83, 0x1b, 0xcc, 0x03, 0x3d, 0xc8, 0x43, 0x3d, 0x8c, 0x03,
|
||||||
|
0x3d, 0xcc, 0x78, 0x8c, 0x74, 0x70, 0x07, 0x7b, 0x08, 0x07, 0x79, 0x48, 0x87, 0x70, 0x70, 0x07,
|
||||||
|
0x7a, 0x70, 0x03, 0x76, 0x78, 0x87, 0x70, 0x20, 0x87, 0x19, 0xcc, 0x11, 0x0e, 0xec, 0x90, 0x0e,
|
||||||
|
0xe1, 0x30, 0x0f, 0x6e, 0x30, 0x0f, 0xe3, 0xf0, 0x0e, 0xf0, 0x50, 0x0e, 0x33, 0x10, 0xc4, 0x1d,
|
||||||
|
0xde, 0x21, 0x1c, 0xd8, 0x21, 0x1d, 0xc2, 0x61, 0x1e, 0x66, 0x30, 0x89, 0x3b, 0xbc, 0x83, 0x3b,
|
||||||
|
0xd0, 0x43, 0x39, 0xb4, 0x03, 0x3c, 0xbc, 0x83, 0x3c, 0x84, 0x03, 0x3b, 0xcc, 0xf0, 0x14, 0x76,
|
||||||
|
0x60, 0x07, 0x7b, 0x68, 0x07, 0x37, 0x68, 0x87, 0x72, 0x68, 0x07, 0x37, 0x80, 0x87, 0x70, 0x90,
|
||||||
|
0x87, 0x70, 0x60, 0x07, 0x76, 0x28, 0x07, 0x76, 0xf8, 0x05, 0x76, 0x78, 0x87, 0x77, 0x80, 0x87,
|
||||||
|
0x5f, 0x08, 0x87, 0x71, 0x18, 0x87, 0x72, 0x98, 0x87, 0x79, 0x98, 0x81, 0x2c, 0xee, 0xf0, 0x0e,
|
||||||
|
0xee, 0xe0, 0x0e, 0xf5, 0xc0, 0x0e, 0xec, 0x30, 0x03, 0x62, 0xc8, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c,
|
||||||
|
0xcc, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xdc, 0x61, 0x1c, 0xca, 0x21, 0x1c, 0xc4, 0x81, 0x1d, 0xca,
|
||||||
|
0x61, 0x06, 0xd6, 0x90, 0x43, 0x39, 0xc8, 0x43, 0x39, 0x98, 0x43, 0x39, 0xc8, 0x43, 0x39, 0xb8,
|
||||||
|
0xc3, 0x38, 0x94, 0x43, 0x38, 0x88, 0x03, 0x3b, 0x94, 0xc3, 0x2f, 0xbc, 0x83, 0x3c, 0xfc, 0x82,
|
||||||
|
0x3b, 0xd4, 0x03, 0x3b, 0xb0, 0xc3, 0x8c, 0xc8, 0x21, 0x07, 0x7c, 0x70, 0x03, 0x72, 0x10, 0x87,
|
||||||
|
0x73, 0x70, 0x03, 0x7b, 0x08, 0x07, 0x79, 0x60, 0x87, 0x70, 0xc8, 0x87, 0x77, 0xa8, 0x07, 0x7a,
|
||||||
|
0x98, 0x81, 0x3c, 0xe4, 0x80, 0x0f, 0x6e, 0x40, 0x0f, 0xe5, 0xd0, 0x0e, 0xf0, 0x00, 0x00, 0x00,
|
||||||
|
0x71, 0x20, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x16, 0x30, 0x0d, 0x97, 0xef, 0x3c, 0xfe, 0xe2,
|
||||||
|
0x00, 0x83, 0xd8, 0x3c, 0xd4, 0xe4, 0x17, 0xb7, 0x6d, 0x02, 0xd5, 0x70, 0xf9, 0xce, 0xe3, 0x4b,
|
||||||
|
0x93, 0x13, 0x11, 0x28, 0x35, 0x3d, 0xd4, 0xe4, 0x17, 0xb7, 0x6d, 0x00, 0x04, 0x03, 0x20, 0x0d,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x61, 0x20, 0x00, 0x00, 0x35, 0x00, 0x00, 0x00, 0x13, 0x04, 0x41, 0x2c,
|
||||||
|
0x10, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x54, 0x25, 0x40, 0x54, 0x0a, 0x85, 0x30, 0x03,
|
||||||
|
0x40, 0x33, 0x46, 0x00, 0x82, 0x20, 0x88, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x23, 0x06, 0x09, 0x00,
|
||||||
|
0x82, 0x60, 0x60, 0x50, 0x83, 0x14, 0x29, 0xc2, 0x88, 0x41, 0x02, 0x80, 0x20, 0x18, 0x18, 0x15,
|
||||||
|
0x31, 0x49, 0xc6, 0x30, 0x62, 0x90, 0x00, 0x20, 0x08, 0x06, 0x86, 0x55, 0x50, 0x53, 0x42, 0x8c,
|
||||||
|
0x18, 0x24, 0x00, 0x08, 0x82, 0x81, 0x71, 0x19, 0x15, 0xc5, 0x14, 0x23, 0x06, 0x09, 0x00, 0x82,
|
||||||
|
0x60, 0x60, 0x60, 0x47, 0x55, 0x39, 0xc6, 0x88, 0x41, 0x02, 0x80, 0x20, 0x18, 0x18, 0x19, 0x62,
|
||||||
|
0x59, 0xca, 0x31, 0x62, 0x90, 0x00, 0x20, 0x08, 0x06, 0x86, 0x96, 0x5c, 0x57, 0x83, 0x8c, 0x18,
|
||||||
|
0x24, 0x00, 0x08, 0x82, 0x01, 0xa2, 0x2d, 0x18, 0x16, 0x1d, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60,
|
||||||
|
0x80, 0x68, 0x0b, 0x86, 0x31, 0xc6, 0x88, 0x41, 0x02, 0x80, 0x20, 0x18, 0x20, 0xda, 0x82, 0x61,
|
||||||
|
0x4e, 0x31, 0x62, 0x90, 0x00, 0x20, 0x08, 0x06, 0x88, 0xb6, 0x60, 0x18, 0x44, 0x8c, 0x18, 0x24,
|
||||||
|
0x00, 0x08, 0x82, 0x01, 0xa2, 0x2d, 0x19, 0x16, 0x0d, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x80,
|
||||||
|
0x68, 0x4b, 0x86, 0x31, 0xc2, 0x88, 0x41, 0x02, 0x80, 0x20, 0x18, 0x20, 0xda, 0x92, 0x61, 0x4e,
|
||||||
|
0x30, 0x62, 0x90, 0x00, 0x20, 0x08, 0x06, 0x88, 0xb6, 0x64, 0x18, 0x84, 0x20, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00,
|
||||||
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// MSL only makes sense on Apple platforms
|
||||||
|
#if defined(SDL_PLATFORM_APPLE)
|
||||||
|
static const Uint8 PositionColor_vert_msl[491] = {
|
||||||
|
0x23, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x20, 0x3c, 0x6d, 0x65, 0x74, 0x61, 0x6c, 0x5f,
|
||||||
|
0x73, 0x74, 0x64, 0x6c, 0x69, 0x62, 0x3e, 0x0a, 0x23, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65,
|
||||||
|
0x20, 0x3c, 0x73, 0x69, 0x6d, 0x64, 0x2f, 0x73, 0x69, 0x6d, 0x64, 0x2e, 0x68, 0x3e, 0x0a, 0x0a,
|
||||||
|
0x75, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x20,
|
||||||
|
0x6d, 0x65, 0x74, 0x61, 0x6c, 0x3b, 0x0a, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x6d,
|
||||||
|
0x61, 0x69, 0x6e, 0x30, 0x5f, 0x6f, 0x75, 0x74, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x66,
|
||||||
|
0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x6f, 0x75, 0x74, 0x5f, 0x76, 0x61, 0x72, 0x5f, 0x54, 0x45,
|
||||||
|
0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x30, 0x20, 0x5b, 0x5b, 0x75, 0x73, 0x65, 0x72, 0x28, 0x6c,
|
||||||
|
0x6f, 0x63, 0x6e, 0x30, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f,
|
||||||
|
0x61, 0x74, 0x34, 0x20, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20,
|
||||||
|
0x5b, 0x5b, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5d, 0x5d, 0x3b, 0x0a, 0x7d, 0x3b,
|
||||||
|
0x0a, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x6d, 0x61, 0x69, 0x6e, 0x30, 0x5f, 0x69,
|
||||||
|
0x6e, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x33, 0x20, 0x69,
|
||||||
|
0x6e, 0x5f, 0x76, 0x61, 0x72, 0x5f, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x30, 0x20,
|
||||||
|
0x5b, 0x5b, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x28, 0x30, 0x29, 0x5d, 0x5d,
|
||||||
|
0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x69, 0x6e, 0x5f,
|
||||||
|
0x76, 0x61, 0x72, 0x5f, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x31, 0x20, 0x5b, 0x5b,
|
||||||
|
0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x28, 0x31, 0x29, 0x5d, 0x5d, 0x3b, 0x0a,
|
||||||
|
0x7d, 0x3b, 0x0a, 0x0a, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x20, 0x6d, 0x61, 0x69, 0x6e, 0x30,
|
||||||
|
0x5f, 0x6f, 0x75, 0x74, 0x20, 0x6d, 0x61, 0x69, 0x6e, 0x30, 0x28, 0x6d, 0x61, 0x69, 0x6e, 0x30,
|
||||||
|
0x5f, 0x69, 0x6e, 0x20, 0x69, 0x6e, 0x20, 0x5b, 0x5b, 0x73, 0x74, 0x61, 0x67, 0x65, 0x5f, 0x69,
|
||||||
|
0x6e, 0x5d, 0x5d, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6d, 0x61, 0x69, 0x6e, 0x30,
|
||||||
|
0x5f, 0x6f, 0x75, 0x74, 0x20, 0x6f, 0x75, 0x74, 0x20, 0x3d, 0x20, 0x7b, 0x7d, 0x3b, 0x0a, 0x20,
|
||||||
|
0x20, 0x20, 0x20, 0x6f, 0x75, 0x74, 0x2e, 0x6f, 0x75, 0x74, 0x5f, 0x76, 0x61, 0x72, 0x5f, 0x54,
|
||||||
|
0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x30, 0x20, 0x3d, 0x20, 0x69, 0x6e, 0x2e, 0x69, 0x6e,
|
||||||
|
0x5f, 0x76, 0x61, 0x72, 0x5f, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x31, 0x3b, 0x0a,
|
||||||
|
0x20, 0x20, 0x20, 0x20, 0x6f, 0x75, 0x74, 0x2e, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74,
|
||||||
|
0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x28, 0x69, 0x6e, 0x2e,
|
||||||
|
0x69, 0x6e, 0x5f, 0x76, 0x61, 0x72, 0x5f, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x30,
|
||||||
|
0x2c, 0x20, 0x31, 0x2e, 0x30, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75,
|
||||||
|
0x72, 0x6e, 0x20, 0x6f, 0x75, 0x74, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a,
|
||||||
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
|
static const Uint8 PositionColor_vert_spirv[624] = {
|
||||||
|
0x03, 0x02, 0x23, 0x07, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x16, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x03, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x01, 0x00, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
|
||||||
|
0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x03, 0x00, 0x03, 0x00,
|
||||||
|
0x05, 0x00, 0x00, 0x00, 0x58, 0x02, 0x00, 0x00, 0x05, 0x00, 0x07, 0x00, 0x02, 0x00, 0x00, 0x00,
|
||||||
|
0x69, 0x6e, 0x2e, 0x76, 0x61, 0x72, 0x2e, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x30,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x07, 0x00, 0x03, 0x00, 0x00, 0x00, 0x69, 0x6e, 0x2e, 0x76,
|
||||||
|
0x61, 0x72, 0x2e, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x31, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x05, 0x00, 0x07, 0x00, 0x04, 0x00, 0x00, 0x00, 0x6f, 0x75, 0x74, 0x2e, 0x76, 0x61, 0x72, 0x2e,
|
||||||
|
0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x30, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00,
|
||||||
|
0x01, 0x00, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00,
|
||||||
|
0x05, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00,
|
||||||
|
0x02, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00,
|
||||||
|
0x03, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00,
|
||||||
|
0x04, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0x00, 0x03, 0x00,
|
||||||
|
0x06, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x06, 0x00, 0x00, 0x00,
|
||||||
|
0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x17, 0x00, 0x04, 0x00, 0x08, 0x00, 0x00, 0x00,
|
||||||
|
0x06, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x09, 0x00, 0x00, 0x00,
|
||||||
|
0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x0a, 0x00, 0x00, 0x00,
|
||||||
|
0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00,
|
||||||
|
0x01, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00,
|
||||||
|
0x03, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x13, 0x00, 0x02, 0x00, 0x0d, 0x00, 0x00, 0x00,
|
||||||
|
0x21, 0x00, 0x03, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00,
|
||||||
|
0x09, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00,
|
||||||
|
0x0b, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00,
|
||||||
|
0x0c, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00,
|
||||||
|
0x0c, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x36, 0x00, 0x05, 0x00,
|
||||||
|
0x0d, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00,
|
||||||
|
0xf8, 0x00, 0x02, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x08, 0x00, 0x00, 0x00,
|
||||||
|
0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0a, 0x00, 0x00, 0x00,
|
||||||
|
0x11, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x06, 0x00, 0x00, 0x00,
|
||||||
|
0x12, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00,
|
||||||
|
0x06, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
|
||||||
|
0x51, 0x00, 0x05, 0x00, 0x06, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
|
||||||
|
0x02, 0x00, 0x00, 0x00, 0x50, 0x00, 0x07, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00,
|
||||||
|
0x12, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00,
|
||||||
|
0x3e, 0x00, 0x03, 0x00, 0x04, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00,
|
||||||
|
0x05, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00,
|
||||||
|
};
|
||||||
146
miniwin/miniwin/shaders/generated/ShaderIndex.cpp
Normal file
146
miniwin/miniwin/shaders/generated/ShaderIndex.cpp
Normal file
@ -0,0 +1,146 @@
|
|||||||
|
// clang-format off
|
||||||
|
|
||||||
|
// +==============================================+
|
||||||
|
// | This file is auto-generated, do not edit it. |
|
||||||
|
// +==============================================+
|
||||||
|
|
||||||
|
#include "ShaderIndex.h"
|
||||||
|
|
||||||
|
#include "PositionColor.vert.h"
|
||||||
|
#include "SolidColor.frag.h"
|
||||||
|
|
||||||
|
#if defined(SDL_PLATFORM_WINDOWS)
|
||||||
|
static const SDL_GPUShaderCreateInfo VertexShaderDXILCodes[] = {
|
||||||
|
// VertexShaderId::SolidColor
|
||||||
|
{
|
||||||
|
/* code_size */ sizeof(PositionColor_vert_dxil),
|
||||||
|
/* code */ PositionColor_vert_dxil,
|
||||||
|
/* entrypoint */ "main",
|
||||||
|
/* format */ SDL_GPU_SHADERFORMAT_DXIL,
|
||||||
|
/* stage */ SDL_GPU_SHADERSTAGE_VERTEX,
|
||||||
|
/* num_samplers */ 0,
|
||||||
|
/* num_storage_textures */ 0,
|
||||||
|
/* num_storage_buffers */ 0,
|
||||||
|
/* num_uniform_buffers */ 0,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(SDL_PLATFORM_APPLE)
|
||||||
|
static const SDL_GPUShaderCreateInfo VertexShaderMSLCodes[] = {
|
||||||
|
{
|
||||||
|
/* code_size */ sizeof(PositionColor_vert_msl),
|
||||||
|
/* code */ PositionColor_vert_msl,
|
||||||
|
/* entrypoint */ "main0",
|
||||||
|
/* format */ SDL_GPU_SHADERFORMAT_MSL,
|
||||||
|
/* stage */ SDL_GPU_SHADERSTAGE_VERTEX,
|
||||||
|
/* num_samplers */ 0,
|
||||||
|
/* num_storage_textures */ 0,
|
||||||
|
/* num_storage_buffers */ 0,
|
||||||
|
/* num_uniform_buffers */ 0,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
|
static const SDL_GPUShaderCreateInfo VertexShaderSPIRVCodes[] = {
|
||||||
|
{
|
||||||
|
/* code_size */ sizeof(PositionColor_vert_spirv),
|
||||||
|
/* code */ PositionColor_vert_spirv,
|
||||||
|
/* entrypoint */ "main",
|
||||||
|
/* format */ SDL_GPU_SHADERFORMAT_SPIRV,
|
||||||
|
/* stage */ SDL_GPU_SHADERSTAGE_VERTEX,
|
||||||
|
/* num_samplers */ 0,
|
||||||
|
/* num_storage_textures */ 0,
|
||||||
|
/* num_storage_buffers */ 0,
|
||||||
|
/* num_uniform_buffers */ 0,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
#if defined(SDL_PLATFORM_WINDOWS)
|
||||||
|
static const SDL_GPUShaderCreateInfo FragmentShaderDXILCodes[] = {
|
||||||
|
// FragmentShaderId::PositionColor
|
||||||
|
{
|
||||||
|
/* code_size */ sizeof(SolidColor_frag_dxil),
|
||||||
|
/* code */ SolidColor_frag_dxil,
|
||||||
|
/* entrypoint */ "main",
|
||||||
|
/* format */ SDL_GPU_SHADERFORMAT_DXIL,
|
||||||
|
/* stage */ SDL_GPU_SHADERSTAGE_FRAGMENT,
|
||||||
|
/* num_samplers */ 0,
|
||||||
|
/* num_storage_textures */ 0,
|
||||||
|
/* num_storage_buffers */ 0,
|
||||||
|
/* num_uniform_buffers */ 0,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(SDL_PLATFORM_APPLE)
|
||||||
|
static const SDL_GPUShaderCreateInfo FragmentShaderMSLCodes[] = {
|
||||||
|
{
|
||||||
|
/* code_size */ sizeof(SolidColor_frag_msl),
|
||||||
|
/* code */ SolidColor_frag_msl,
|
||||||
|
/* entrypoint */ "main0",
|
||||||
|
/* format */ SDL_GPU_SHADERFORMAT_MSL,
|
||||||
|
/* stage */ SDL_GPU_SHADERSTAGE_FRAGMENT,
|
||||||
|
/* num_samplers */ 0,
|
||||||
|
/* num_storage_textures */ 0,
|
||||||
|
/* num_storage_buffers */ 0,
|
||||||
|
/* num_uniform_buffers */ 0,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
|
static const SDL_GPUShaderCreateInfo FragmentShaderSPIRVCodes[] = {
|
||||||
|
{
|
||||||
|
/* code_size */ sizeof(SolidColor_frag_spirv),
|
||||||
|
/* code */ SolidColor_frag_spirv,
|
||||||
|
/* entrypoint */ "main",
|
||||||
|
/* format */ SDL_GPU_SHADERFORMAT_SPIRV,
|
||||||
|
/* stage */ SDL_GPU_SHADERSTAGE_FRAGMENT,
|
||||||
|
/* num_samplers */ 0,
|
||||||
|
/* num_storage_textures */ 0,
|
||||||
|
/* num_storage_buffers */ 0,
|
||||||
|
/* num_uniform_buffers */ 0,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
const SDL_GPUShaderCreateInfo* GetVertexShaderCode(VertexShaderId id, SDL_GPUShaderFormat formats) {
|
||||||
|
#if defined(SDL_PLATFORM_WINDOWS)
|
||||||
|
if (formats & SDL_GPU_SHADERFORMAT_DXIL) {
|
||||||
|
SDL_assert(id < SDL_arraysize(VertexShaderDXILCodes));
|
||||||
|
return &VertexShaderDXILCodes[id];
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#if defined(SDL_PLATFORM_APPLE)
|
||||||
|
if (formats & SDL_GPU_SHADERFORMAT_MSL) {
|
||||||
|
SDL_assert(id < SDL_arraysize(VertexShaderMSLCodes));
|
||||||
|
return &VertexShaderMSLCodes[id];
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
if (formats & SDL_GPU_SHADERFORMAT_SPIRV) {
|
||||||
|
SDL_assert(id < SDL_arraysize(VertexShaderSPIRVCodes));
|
||||||
|
return &VertexShaderSPIRVCodes[id];
|
||||||
|
}
|
||||||
|
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Could not find vertex shader code for id=%d and formats=0x%x", id, formats);
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
const SDL_GPUShaderCreateInfo* GetFragmentShaderCode(FragmentShaderId id, SDL_GPUShaderFormat formats) {
|
||||||
|
#if defined(SDL_PLATFORM_WINDOWS)
|
||||||
|
if (formats & SDL_GPU_SHADERFORMAT_DXIL) {
|
||||||
|
SDL_assert(id < SDL_arraysize(FragmentShaderDXILCodes));
|
||||||
|
return &FragmentShaderDXILCodes[id];
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#if defined(SDL_PLATFORM_APPLE)
|
||||||
|
if (formats & SDL_GPU_SHADERFORMAT_MSL) {
|
||||||
|
SDL_assert(id < SDL_arraysize(FragmentShaderMSLCodes));
|
||||||
|
return &FragmentShaderMSLCodes[id];
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
if (formats & SDL_GPU_SHADERFORMAT_SPIRV) {
|
||||||
|
SDL_assert(id < SDL_arraysize(FragmentShaderSPIRVCodes));
|
||||||
|
return &FragmentShaderSPIRVCodes[id];
|
||||||
|
}
|
||||||
|
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Could not find fragment shader code for id=%d and formats=0x%x", id, formats);
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
22
miniwin/miniwin/shaders/generated/ShaderIndex.h
Normal file
22
miniwin/miniwin/shaders/generated/ShaderIndex.h
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
// clang-format off
|
||||||
|
|
||||||
|
// +==============================================+
|
||||||
|
// | This file is auto-generated, do not edit it. |
|
||||||
|
// +==============================================+
|
||||||
|
|
||||||
|
#include <SDL3/SDL.h>
|
||||||
|
|
||||||
|
enum VertexShaderId {
|
||||||
|
PositionColor,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum FragmentShaderId {
|
||||||
|
SolidColor,
|
||||||
|
};
|
||||||
|
|
||||||
|
const SDL_GPUShaderCreateInfo* GetVertexShaderCode(VertexShaderId id, SDL_GPUShaderFormat formats);
|
||||||
|
|
||||||
|
const SDL_GPUShaderCreateInfo* GetFragmentShaderCode(FragmentShaderId id, SDL_GPUShaderFormat formats);
|
||||||
|
|
||||||
247
miniwin/miniwin/shaders/generated/SolidColor.frag.h
Normal file
247
miniwin/miniwin/shaders/generated/SolidColor.frag.h
Normal file
@ -0,0 +1,247 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
// clang-format off
|
||||||
|
|
||||||
|
// +==============================================+
|
||||||
|
// | This file is auto-generated, do not edit it. |
|
||||||
|
// +==============================================+
|
||||||
|
|
||||||
|
#include <SDL3/SDL.h>
|
||||||
|
|
||||||
|
// DXIL only makes sense on Windows platforms
|
||||||
|
#if defined(SDL_PLATFORM_WINDOWS)
|
||||||
|
static const Uint8 SolidColor_frag_dxil[2828] = {
|
||||||
|
0x44, 0x58, 0x42, 0x43, 0xd9, 0xf2, 0xa3, 0x93, 0x8b, 0x37, 0xdb, 0xdf, 0xf2, 0x56, 0x1b, 0x56,
|
||||||
|
0x84, 0x00, 0xb4, 0x71, 0x01, 0x00, 0x00, 0x00, 0x0c, 0x0b, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00,
|
||||||
|
0x3c, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x88, 0x00, 0x00, 0x00, 0xc4, 0x00, 0x00, 0x00,
|
||||||
|
0x58, 0x01, 0x00, 0x00, 0x10, 0x06, 0x00, 0x00, 0x2c, 0x06, 0x00, 0x00, 0x53, 0x46, 0x49, 0x30,
|
||||||
|
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0x53, 0x47, 0x31,
|
||||||
|
0x34, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x45, 0x58, 0x43,
|
||||||
|
0x4f, 0x4f, 0x52, 0x44, 0x00, 0x00, 0x00, 0x00, 0x4f, 0x53, 0x47, 0x31, 0x34, 0x00, 0x00, 0x00,
|
||||||
|
0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x54, 0x61, 0x72, 0x67, 0x65,
|
||||||
|
0x74, 0x00, 0x00, 0x00, 0x50, 0x53, 0x56, 0x30, 0x8c, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x01,
|
||||||
|
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x54, 0x45, 0x58,
|
||||||
|
0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x01, 0x00, 0x44, 0x00, 0x03, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x01, 0x00, 0x44, 0x10, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
|
||||||
|
0x04, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x53, 0x54, 0x41, 0x54, 0xb0, 0x04, 0x00, 0x00,
|
||||||
|
0x60, 0x00, 0x00, 0x00, 0x2c, 0x01, 0x00, 0x00, 0x44, 0x58, 0x49, 0x4c, 0x00, 0x01, 0x00, 0x00,
|
||||||
|
0x10, 0x00, 0x00, 0x00, 0x98, 0x04, 0x00, 0x00, 0x42, 0x43, 0xc0, 0xde, 0x21, 0x0c, 0x00, 0x00,
|
||||||
|
0x23, 0x01, 0x00, 0x00, 0x0b, 0x82, 0x20, 0x00, 0x02, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00,
|
||||||
|
0x07, 0x81, 0x23, 0x91, 0x41, 0xc8, 0x04, 0x49, 0x06, 0x10, 0x32, 0x39, 0x92, 0x01, 0x84, 0x0c,
|
||||||
|
0x25, 0x05, 0x08, 0x19, 0x1e, 0x04, 0x8b, 0x62, 0x80, 0x10, 0x45, 0x02, 0x42, 0x92, 0x0b, 0x42,
|
||||||
|
0x84, 0x10, 0x32, 0x14, 0x38, 0x08, 0x18, 0x4b, 0x0a, 0x32, 0x42, 0x88, 0x48, 0x90, 0x14, 0x20,
|
||||||
|
0x43, 0x46, 0x88, 0xa5, 0x00, 0x19, 0x32, 0x42, 0xe4, 0x48, 0x0e, 0x90, 0x11, 0x22, 0xc4, 0x50,
|
||||||
|
0x41, 0x51, 0x81, 0x8c, 0xe1, 0x83, 0xe5, 0x8a, 0x04, 0x21, 0x46, 0x06, 0x51, 0x18, 0x00, 0x00,
|
||||||
|
0x06, 0x00, 0x00, 0x00, 0x1b, 0x8c, 0xe0, 0xff, 0xff, 0xff, 0xff, 0x07, 0x40, 0x02, 0xa8, 0x0d,
|
||||||
|
0x84, 0xf0, 0xff, 0xff, 0xff, 0xff, 0x03, 0x20, 0x01, 0x00, 0x00, 0x00, 0x49, 0x18, 0x00, 0x00,
|
||||||
|
0x02, 0x00, 0x00, 0x00, 0x13, 0x82, 0x60, 0x42, 0x20, 0x00, 0x00, 0x00, 0x89, 0x20, 0x00, 0x00,
|
||||||
|
0x0f, 0x00, 0x00, 0x00, 0x32, 0x22, 0x08, 0x09, 0x20, 0x64, 0x85, 0x04, 0x13, 0x22, 0xa4, 0x84,
|
||||||
|
0x04, 0x13, 0x22, 0xe3, 0x84, 0xa1, 0x90, 0x14, 0x12, 0x4c, 0x88, 0x8c, 0x0b, 0x84, 0x84, 0x4c,
|
||||||
|
0x10, 0x30, 0x23, 0x00, 0x25, 0x00, 0x8a, 0x19, 0x80, 0x39, 0x02, 0x30, 0x98, 0x23, 0x40, 0x8a,
|
||||||
|
0x31, 0x44, 0x54, 0x44, 0x56, 0x0c, 0x20, 0xa2, 0x1a, 0xc2, 0x81, 0x80, 0x34, 0x20, 0x00, 0x00,
|
||||||
|
0x13, 0x14, 0x72, 0xc0, 0x87, 0x74, 0x60, 0x87, 0x36, 0x68, 0x87, 0x79, 0x68, 0x03, 0x72, 0xc0,
|
||||||
|
0x87, 0x0d, 0xaf, 0x50, 0x0e, 0x6d, 0xd0, 0x0e, 0x7a, 0x50, 0x0e, 0x6d, 0x00, 0x0f, 0x7a, 0x30,
|
||||||
|
0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0xa0, 0x07, 0x73, 0x20, 0x07,
|
||||||
|
0x6d, 0x90, 0x0e, 0x78, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0x60, 0x07, 0x7a,
|
||||||
|
0x30, 0x07, 0x72, 0xd0, 0x06, 0xe9, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90,
|
||||||
|
0x0e, 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xd0, 0x06, 0xe6, 0x10, 0x07, 0x76, 0xa0, 0x07,
|
||||||
|
0x73, 0x20, 0x07, 0x6d, 0x60, 0x0e, 0x73, 0x20, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06, 0xe6,
|
||||||
|
0x60, 0x07, 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x6d, 0xe0, 0x0e, 0x78, 0xa0, 0x07, 0x71, 0x60,
|
||||||
|
0x07, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x43, 0x9e, 0x00, 0x08, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x86, 0x3c, 0x06, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x0c, 0x79, 0x10, 0x20, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0xc8, 0x02, 0x01, 0x0b, 0x00, 0x00, 0x00, 0x32, 0x1e, 0x98, 0x14, 0x19, 0x11, 0x4c, 0x90,
|
||||||
|
0x8c, 0x09, 0x26, 0x47, 0xc6, 0x04, 0x43, 0xa2, 0x12, 0x18, 0x01, 0x28, 0x86, 0x32, 0x28, 0x8f,
|
||||||
|
0x92, 0x28, 0x04, 0xaa, 0x92, 0x18, 0x01, 0x28, 0x82, 0x42, 0x28, 0x10, 0xda, 0xb1, 0x0c, 0x82,
|
||||||
|
0x08, 0x04, 0x02, 0x01, 0x79, 0x18, 0x00, 0x00, 0x59, 0x00, 0x00, 0x00, 0x1a, 0x03, 0x4c, 0x90,
|
||||||
|
0x46, 0x02, 0x13, 0xc4, 0x31, 0x20, 0xc3, 0x1b, 0x43, 0x81, 0x93, 0x4b, 0xb3, 0x0b, 0xa3, 0x2b,
|
||||||
|
0x4b, 0x01, 0x89, 0x71, 0xc1, 0x71, 0x81, 0x71, 0xa1, 0xb9, 0xc1, 0xc9, 0x01, 0x41, 0x11, 0xa3,
|
||||||
|
0xb9, 0x89, 0x89, 0xc1, 0x99, 0xc9, 0x29, 0x4b, 0xd9, 0x10, 0x04, 0x13, 0x04, 0x62, 0x98, 0x20,
|
||||||
|
0x10, 0xc4, 0x06, 0x61, 0x20, 0x36, 0x08, 0x04, 0x41, 0x01, 0x6e, 0x6e, 0x82, 0x40, 0x14, 0x1b,
|
||||||
|
0x86, 0x03, 0x21, 0x26, 0x08, 0x02, 0xb0, 0x01, 0xd8, 0x30, 0x10, 0xcb, 0xb2, 0x21, 0x60, 0x36,
|
||||||
|
0x0c, 0x83, 0xd2, 0x4c, 0x10, 0x96, 0x67, 0x43, 0xf0, 0x90, 0x68, 0x0b, 0x4b, 0x73, 0x23, 0x42,
|
||||||
|
0x55, 0x84, 0x35, 0xf4, 0xf4, 0x24, 0x45, 0x34, 0x41, 0x28, 0x94, 0x09, 0x42, 0xb1, 0x6c, 0x08,
|
||||||
|
0x88, 0x09, 0x42, 0xc1, 0x4c, 0x10, 0x8a, 0x66, 0x82, 0x40, 0x18, 0x13, 0x04, 0xe2, 0xd8, 0x20,
|
||||||
|
0x60, 0xd9, 0x86, 0x85, 0x90, 0x26, 0xaa, 0xb2, 0x86, 0x8b, 0xa0, 0xb4, 0x0d, 0xc1, 0xc6, 0x64,
|
||||||
|
0xca, 0xea, 0x8b, 0x2a, 0x4c, 0xee, 0xac, 0x8c, 0x6e, 0x82, 0x50, 0x38, 0x1b, 0x16, 0xa2, 0x9b,
|
||||||
|
0xbc, 0x8a, 0x1a, 0x2e, 0x82, 0xd2, 0x36, 0x04, 0xdf, 0x86, 0x81, 0x03, 0x03, 0x60, 0x43, 0xa1,
|
||||||
|
0x44, 0x61, 0x00, 0x00, 0x2c, 0xd2, 0xdc, 0xe6, 0xe8, 0xe6, 0x26, 0x08, 0x04, 0x42, 0x63, 0x2e,
|
||||||
|
0xed, 0xec, 0x8b, 0x8d, 0x6c, 0x82, 0x40, 0x24, 0x34, 0xe6, 0xd2, 0xce, 0xbe, 0xe6, 0xe8, 0x36,
|
||||||
|
0x18, 0x63, 0x40, 0x06, 0x65, 0x60, 0x06, 0x67, 0x60, 0x06, 0x55, 0xd8, 0xd8, 0xec, 0xda, 0x5c,
|
||||||
|
0xd2, 0xc8, 0xca, 0xdc, 0xe8, 0xa6, 0x04, 0x41, 0x15, 0x32, 0x3c, 0x17, 0xbb, 0x32, 0xb9, 0xb9,
|
||||||
|
0xb4, 0x37, 0xb7, 0x29, 0x01, 0xd1, 0x84, 0x0c, 0xcf, 0xc5, 0x2e, 0x8c, 0xcd, 0xae, 0x4c, 0x6e,
|
||||||
|
0x4a, 0x50, 0xd4, 0x21, 0xc3, 0x73, 0x99, 0x43, 0x0b, 0x23, 0x2b, 0x93, 0x6b, 0x7a, 0x23, 0x2b,
|
||||||
|
0x63, 0x9b, 0x12, 0x20, 0x95, 0xc8, 0xf0, 0x5c, 0xe8, 0xf2, 0xe0, 0xca, 0x82, 0xdc, 0xdc, 0xde,
|
||||||
|
0xe8, 0xc2, 0xe8, 0xd2, 0xde, 0xdc, 0xe6, 0xa6, 0x04, 0x4d, 0x1d, 0x32, 0x3c, 0x17, 0xbb, 0xb4,
|
||||||
|
0xb2, 0xbb, 0x24, 0xb2, 0x29, 0xba, 0x30, 0xba, 0xb2, 0x29, 0xc1, 0x53, 0x87, 0x0c, 0xcf, 0xa5,
|
||||||
|
0xcc, 0x8d, 0x4e, 0x2e, 0x0f, 0xea, 0x2d, 0xcd, 0x8d, 0x6e, 0x6e, 0x4a, 0x10, 0x06, 0x5d, 0xc8,
|
||||||
|
0xf0, 0x5c, 0xc6, 0xde, 0xea, 0xdc, 0xe8, 0xca, 0xe4, 0xe6, 0xa6, 0x04, 0x67, 0x00, 0x00, 0x00,
|
||||||
|
0x79, 0x18, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x33, 0x08, 0x80, 0x1c, 0xc4, 0xe1, 0x1c, 0x66,
|
||||||
|
0x14, 0x01, 0x3d, 0x88, 0x43, 0x38, 0x84, 0xc3, 0x8c, 0x42, 0x80, 0x07, 0x79, 0x78, 0x07, 0x73,
|
||||||
|
0x98, 0x71, 0x0c, 0xe6, 0x00, 0x0f, 0xed, 0x10, 0x0e, 0xf4, 0x80, 0x0e, 0x33, 0x0c, 0x42, 0x1e,
|
||||||
|
0xc2, 0xc1, 0x1d, 0xce, 0xa1, 0x1c, 0x66, 0x30, 0x05, 0x3d, 0x88, 0x43, 0x38, 0x84, 0x83, 0x1b,
|
||||||
|
0xcc, 0x03, 0x3d, 0xc8, 0x43, 0x3d, 0x8c, 0x03, 0x3d, 0xcc, 0x78, 0x8c, 0x74, 0x70, 0x07, 0x7b,
|
||||||
|
0x08, 0x07, 0x79, 0x48, 0x87, 0x70, 0x70, 0x07, 0x7a, 0x70, 0x03, 0x76, 0x78, 0x87, 0x70, 0x20,
|
||||||
|
0x87, 0x19, 0xcc, 0x11, 0x0e, 0xec, 0x90, 0x0e, 0xe1, 0x30, 0x0f, 0x6e, 0x30, 0x0f, 0xe3, 0xf0,
|
||||||
|
0x0e, 0xf0, 0x50, 0x0e, 0x33, 0x10, 0xc4, 0x1d, 0xde, 0x21, 0x1c, 0xd8, 0x21, 0x1d, 0xc2, 0x61,
|
||||||
|
0x1e, 0x66, 0x30, 0x89, 0x3b, 0xbc, 0x83, 0x3b, 0xd0, 0x43, 0x39, 0xb4, 0x03, 0x3c, 0xbc, 0x83,
|
||||||
|
0x3c, 0x84, 0x03, 0x3b, 0xcc, 0xf0, 0x14, 0x76, 0x60, 0x07, 0x7b, 0x68, 0x07, 0x37, 0x68, 0x87,
|
||||||
|
0x72, 0x68, 0x07, 0x37, 0x80, 0x87, 0x70, 0x90, 0x87, 0x70, 0x60, 0x07, 0x76, 0x28, 0x07, 0x76,
|
||||||
|
0xf8, 0x05, 0x76, 0x78, 0x87, 0x77, 0x80, 0x87, 0x5f, 0x08, 0x87, 0x71, 0x18, 0x87, 0x72, 0x98,
|
||||||
|
0x87, 0x79, 0x98, 0x81, 0x2c, 0xee, 0xf0, 0x0e, 0xee, 0xe0, 0x0e, 0xf5, 0xc0, 0x0e, 0xec, 0x30,
|
||||||
|
0x03, 0x62, 0xc8, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xcc, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xdc, 0x61,
|
||||||
|
0x1c, 0xca, 0x21, 0x1c, 0xc4, 0x81, 0x1d, 0xca, 0x61, 0x06, 0xd6, 0x90, 0x43, 0x39, 0xc8, 0x43,
|
||||||
|
0x39, 0x98, 0x43, 0x39, 0xc8, 0x43, 0x39, 0xb8, 0xc3, 0x38, 0x94, 0x43, 0x38, 0x88, 0x03, 0x3b,
|
||||||
|
0x94, 0xc3, 0x2f, 0xbc, 0x83, 0x3c, 0xfc, 0x82, 0x3b, 0xd4, 0x03, 0x3b, 0xb0, 0xc3, 0x8c, 0xc8,
|
||||||
|
0x21, 0x07, 0x7c, 0x70, 0x03, 0x72, 0x10, 0x87, 0x73, 0x70, 0x03, 0x7b, 0x08, 0x07, 0x79, 0x60,
|
||||||
|
0x87, 0x70, 0xc8, 0x87, 0x77, 0xa8, 0x07, 0x7a, 0x98, 0x81, 0x3c, 0xe4, 0x80, 0x0f, 0x6e, 0x40,
|
||||||
|
0x0f, 0xe5, 0xd0, 0x0e, 0xf0, 0x00, 0x00, 0x00, 0x71, 0x20, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00,
|
||||||
|
0x16, 0x30, 0x0d, 0x97, 0xef, 0x3c, 0xfe, 0xe2, 0x00, 0x83, 0xd8, 0x3c, 0xd4, 0xe4, 0x17, 0xb7,
|
||||||
|
0x6d, 0x02, 0xd5, 0x70, 0xf9, 0xce, 0xe3, 0x4b, 0x93, 0x13, 0x11, 0x28, 0x35, 0x3d, 0xd4, 0xe4,
|
||||||
|
0x17, 0xb7, 0x6d, 0x00, 0x04, 0x03, 0x20, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x48, 0x41, 0x53, 0x48, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xdd, 0xaa, 0xe8, 0x4e,
|
||||||
|
0x4d, 0x22, 0xc0, 0x8e, 0x28, 0x26, 0xc3, 0x90, 0xc2, 0x72, 0xe0, 0xab, 0x44, 0x58, 0x49, 0x4c,
|
||||||
|
0xd8, 0x04, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x36, 0x01, 0x00, 0x00, 0x44, 0x58, 0x49, 0x4c,
|
||||||
|
0x00, 0x01, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0xc0, 0x04, 0x00, 0x00, 0x42, 0x43, 0xc0, 0xde,
|
||||||
|
0x21, 0x0c, 0x00, 0x00, 0x2d, 0x01, 0x00, 0x00, 0x0b, 0x82, 0x20, 0x00, 0x02, 0x00, 0x00, 0x00,
|
||||||
|
0x13, 0x00, 0x00, 0x00, 0x07, 0x81, 0x23, 0x91, 0x41, 0xc8, 0x04, 0x49, 0x06, 0x10, 0x32, 0x39,
|
||||||
|
0x92, 0x01, 0x84, 0x0c, 0x25, 0x05, 0x08, 0x19, 0x1e, 0x04, 0x8b, 0x62, 0x80, 0x10, 0x45, 0x02,
|
||||||
|
0x42, 0x92, 0x0b, 0x42, 0x84, 0x10, 0x32, 0x14, 0x38, 0x08, 0x18, 0x4b, 0x0a, 0x32, 0x42, 0x88,
|
||||||
|
0x48, 0x90, 0x14, 0x20, 0x43, 0x46, 0x88, 0xa5, 0x00, 0x19, 0x32, 0x42, 0xe4, 0x48, 0x0e, 0x90,
|
||||||
|
0x11, 0x22, 0xc4, 0x50, 0x41, 0x51, 0x81, 0x8c, 0xe1, 0x83, 0xe5, 0x8a, 0x04, 0x21, 0x46, 0x06,
|
||||||
|
0x51, 0x18, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x1b, 0x8c, 0xe0, 0xff, 0xff, 0xff, 0xff, 0x07,
|
||||||
|
0x40, 0x02, 0xa8, 0x0d, 0x84, 0xf0, 0xff, 0xff, 0xff, 0xff, 0x03, 0x20, 0x01, 0x00, 0x00, 0x00,
|
||||||
|
0x49, 0x18, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x13, 0x82, 0x60, 0x42, 0x20, 0x00, 0x00, 0x00,
|
||||||
|
0x89, 0x20, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x32, 0x22, 0x08, 0x09, 0x20, 0x64, 0x85, 0x04,
|
||||||
|
0x13, 0x22, 0xa4, 0x84, 0x04, 0x13, 0x22, 0xe3, 0x84, 0xa1, 0x90, 0x14, 0x12, 0x4c, 0x88, 0x8c,
|
||||||
|
0x0b, 0x84, 0x84, 0x4c, 0x10, 0x30, 0x23, 0x00, 0x25, 0x00, 0x8a, 0x19, 0x80, 0x39, 0x02, 0x30,
|
||||||
|
0x98, 0x23, 0x40, 0x8a, 0x31, 0x44, 0x54, 0x44, 0x56, 0x0c, 0x20, 0xa2, 0x1a, 0xc2, 0x81, 0x80,
|
||||||
|
0x34, 0x20, 0x00, 0x00, 0x13, 0x14, 0x72, 0xc0, 0x87, 0x74, 0x60, 0x87, 0x36, 0x68, 0x87, 0x79,
|
||||||
|
0x68, 0x03, 0x72, 0xc0, 0x87, 0x0d, 0xaf, 0x50, 0x0e, 0x6d, 0xd0, 0x0e, 0x7a, 0x50, 0x0e, 0x6d,
|
||||||
|
0x00, 0x0f, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0xa0,
|
||||||
|
0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x78, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e,
|
||||||
|
0x71, 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06, 0xe9, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73,
|
||||||
|
0x20, 0x07, 0x6d, 0x90, 0x0e, 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xd0, 0x06, 0xe6, 0x10,
|
||||||
|
0x07, 0x76, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x60, 0x0e, 0x73, 0x20, 0x07, 0x7a, 0x30, 0x07,
|
||||||
|
0x72, 0xd0, 0x06, 0xe6, 0x60, 0x07, 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x6d, 0xe0, 0x0e, 0x78,
|
||||||
|
0xa0, 0x07, 0x71, 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x43, 0x9e,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x86, 0x3c, 0x06, 0x10, 0x00,
|
||||||
|
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x79, 0x10, 0x20, 0x00, 0x04, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0xc8, 0x02, 0x01, 0x0b, 0x00, 0x00, 0x00, 0x32, 0x1e, 0x98, 0x10,
|
||||||
|
0x19, 0x11, 0x4c, 0x90, 0x8c, 0x09, 0x26, 0x47, 0xc6, 0x04, 0x43, 0xa2, 0x12, 0x18, 0x01, 0x28,
|
||||||
|
0x88, 0x62, 0x28, 0x83, 0xf2, 0xa0, 0x2a, 0x89, 0x11, 0x80, 0x22, 0x28, 0x84, 0x02, 0xa1, 0x1d,
|
||||||
|
0xcb, 0x20, 0x88, 0x40, 0x20, 0x10, 0x00, 0x00, 0x79, 0x18, 0x00, 0x00, 0x43, 0x00, 0x00, 0x00,
|
||||||
|
0x1a, 0x03, 0x4c, 0x90, 0x46, 0x02, 0x13, 0xc4, 0x31, 0x20, 0xc3, 0x1b, 0x43, 0x81, 0x93, 0x4b,
|
||||||
|
0xb3, 0x0b, 0xa3, 0x2b, 0x4b, 0x01, 0x89, 0x71, 0xc1, 0x71, 0x81, 0x71, 0xa1, 0xb9, 0xc1, 0xc9,
|
||||||
|
0x01, 0x41, 0x11, 0xa3, 0xb9, 0x89, 0x89, 0xc1, 0x99, 0xc9, 0x29, 0x4b, 0xd9, 0x10, 0x04, 0x13,
|
||||||
|
0x04, 0x62, 0x98, 0x20, 0x10, 0xc4, 0x06, 0x61, 0x20, 0x26, 0x08, 0x44, 0xb1, 0x41, 0x18, 0x0c,
|
||||||
|
0x0a, 0x70, 0x73, 0x13, 0x04, 0xc2, 0xd8, 0x30, 0x20, 0x09, 0x31, 0x41, 0x58, 0x9c, 0x0d, 0xc1,
|
||||||
|
0x32, 0x41, 0x10, 0x00, 0x12, 0x6d, 0x61, 0x69, 0x6e, 0x44, 0xa8, 0x8a, 0xb0, 0x86, 0x9e, 0x9e,
|
||||||
|
0xa4, 0x88, 0x26, 0x08, 0x45, 0x32, 0x41, 0x28, 0x94, 0x0d, 0x01, 0x31, 0x41, 0x28, 0x96, 0x09,
|
||||||
|
0x42, 0xc1, 0x4c, 0x10, 0x88, 0x63, 0x82, 0x40, 0x20, 0x1b, 0x84, 0xca, 0xda, 0xb0, 0x10, 0x0f,
|
||||||
|
0x14, 0x49, 0xd3, 0x40, 0x11, 0xd1, 0xb5, 0x21, 0xc0, 0x98, 0x4c, 0x59, 0x7d, 0x51, 0x85, 0xc9,
|
||||||
|
0x9d, 0x95, 0xd1, 0x4d, 0x10, 0x8a, 0x66, 0xc3, 0x42, 0x68, 0xd0, 0x26, 0x45, 0x03, 0x45, 0x44,
|
||||||
|
0xd7, 0x86, 0x80, 0xdb, 0x30, 0x64, 0x1d, 0xb0, 0xa1, 0x68, 0x1c, 0x0f, 0x00, 0xaa, 0xb0, 0xb1,
|
||||||
|
0xd9, 0xb5, 0xb9, 0xa4, 0x91, 0x95, 0xb9, 0xd1, 0x4d, 0x09, 0x82, 0x2a, 0x64, 0x78, 0x2e, 0x76,
|
||||||
|
0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x02, 0xa2, 0x09, 0x19, 0x9e, 0x8b, 0x5d, 0x18, 0x9b,
|
||||||
|
0x5d, 0x99, 0xdc, 0x94, 0xc0, 0xa8, 0x43, 0x86, 0xe7, 0x32, 0x87, 0x16, 0x46, 0x56, 0x26, 0xd7,
|
||||||
|
0xf4, 0x46, 0x56, 0xc6, 0x36, 0x25, 0x48, 0xea, 0x90, 0xe1, 0xb9, 0xd8, 0xa5, 0x95, 0xdd, 0x25,
|
||||||
|
0x91, 0x4d, 0xd1, 0x85, 0xd1, 0x95, 0x4d, 0x09, 0x96, 0x3a, 0x64, 0x78, 0x2e, 0x65, 0x6e, 0x74,
|
||||||
|
0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x53, 0x02, 0x0f, 0x00, 0x79, 0x18, 0x00, 0x00,
|
||||||
|
0x4c, 0x00, 0x00, 0x00, 0x33, 0x08, 0x80, 0x1c, 0xc4, 0xe1, 0x1c, 0x66, 0x14, 0x01, 0x3d, 0x88,
|
||||||
|
0x43, 0x38, 0x84, 0xc3, 0x8c, 0x42, 0x80, 0x07, 0x79, 0x78, 0x07, 0x73, 0x98, 0x71, 0x0c, 0xe6,
|
||||||
|
0x00, 0x0f, 0xed, 0x10, 0x0e, 0xf4, 0x80, 0x0e, 0x33, 0x0c, 0x42, 0x1e, 0xc2, 0xc1, 0x1d, 0xce,
|
||||||
|
0xa1, 0x1c, 0x66, 0x30, 0x05, 0x3d, 0x88, 0x43, 0x38, 0x84, 0x83, 0x1b, 0xcc, 0x03, 0x3d, 0xc8,
|
||||||
|
0x43, 0x3d, 0x8c, 0x03, 0x3d, 0xcc, 0x78, 0x8c, 0x74, 0x70, 0x07, 0x7b, 0x08, 0x07, 0x79, 0x48,
|
||||||
|
0x87, 0x70, 0x70, 0x07, 0x7a, 0x70, 0x03, 0x76, 0x78, 0x87, 0x70, 0x20, 0x87, 0x19, 0xcc, 0x11,
|
||||||
|
0x0e, 0xec, 0x90, 0x0e, 0xe1, 0x30, 0x0f, 0x6e, 0x30, 0x0f, 0xe3, 0xf0, 0x0e, 0xf0, 0x50, 0x0e,
|
||||||
|
0x33, 0x10, 0xc4, 0x1d, 0xde, 0x21, 0x1c, 0xd8, 0x21, 0x1d, 0xc2, 0x61, 0x1e, 0x66, 0x30, 0x89,
|
||||||
|
0x3b, 0xbc, 0x83, 0x3b, 0xd0, 0x43, 0x39, 0xb4, 0x03, 0x3c, 0xbc, 0x83, 0x3c, 0x84, 0x03, 0x3b,
|
||||||
|
0xcc, 0xf0, 0x14, 0x76, 0x60, 0x07, 0x7b, 0x68, 0x07, 0x37, 0x68, 0x87, 0x72, 0x68, 0x07, 0x37,
|
||||||
|
0x80, 0x87, 0x70, 0x90, 0x87, 0x70, 0x60, 0x07, 0x76, 0x28, 0x07, 0x76, 0xf8, 0x05, 0x76, 0x78,
|
||||||
|
0x87, 0x77, 0x80, 0x87, 0x5f, 0x08, 0x87, 0x71, 0x18, 0x87, 0x72, 0x98, 0x87, 0x79, 0x98, 0x81,
|
||||||
|
0x2c, 0xee, 0xf0, 0x0e, 0xee, 0xe0, 0x0e, 0xf5, 0xc0, 0x0e, 0xec, 0x30, 0x03, 0x62, 0xc8, 0xa1,
|
||||||
|
0x1c, 0xe4, 0xa1, 0x1c, 0xcc, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xdc, 0x61, 0x1c, 0xca, 0x21, 0x1c,
|
||||||
|
0xc4, 0x81, 0x1d, 0xca, 0x61, 0x06, 0xd6, 0x90, 0x43, 0x39, 0xc8, 0x43, 0x39, 0x98, 0x43, 0x39,
|
||||||
|
0xc8, 0x43, 0x39, 0xb8, 0xc3, 0x38, 0x94, 0x43, 0x38, 0x88, 0x03, 0x3b, 0x94, 0xc3, 0x2f, 0xbc,
|
||||||
|
0x83, 0x3c, 0xfc, 0x82, 0x3b, 0xd4, 0x03, 0x3b, 0xb0, 0xc3, 0x8c, 0xc8, 0x21, 0x07, 0x7c, 0x70,
|
||||||
|
0x03, 0x72, 0x10, 0x87, 0x73, 0x70, 0x03, 0x7b, 0x08, 0x07, 0x79, 0x60, 0x87, 0x70, 0xc8, 0x87,
|
||||||
|
0x77, 0xa8, 0x07, 0x7a, 0x98, 0x81, 0x3c, 0xe4, 0x80, 0x0f, 0x6e, 0x40, 0x0f, 0xe5, 0xd0, 0x0e,
|
||||||
|
0xf0, 0x00, 0x00, 0x00, 0x71, 0x20, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x16, 0x30, 0x0d, 0x97,
|
||||||
|
0xef, 0x3c, 0xfe, 0xe2, 0x00, 0x83, 0xd8, 0x3c, 0xd4, 0xe4, 0x17, 0xb7, 0x6d, 0x02, 0xd5, 0x70,
|
||||||
|
0xf9, 0xce, 0xe3, 0x4b, 0x93, 0x13, 0x11, 0x28, 0x35, 0x3d, 0xd4, 0xe4, 0x17, 0xb7, 0x6d, 0x00,
|
||||||
|
0x04, 0x03, 0x20, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x61, 0x20, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00,
|
||||||
|
0x13, 0x04, 0x41, 0x2c, 0x10, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x44, 0x85, 0x30, 0x03,
|
||||||
|
0x50, 0x0a, 0x54, 0x25, 0x50, 0x06, 0x00, 0x00, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x60, 0x4c,
|
||||||
|
0x05, 0x04, 0x29, 0xc4, 0x88, 0x41, 0x02, 0x80, 0x20, 0x18, 0x18, 0x94, 0x11, 0x45, 0x43, 0x31,
|
||||||
|
0x62, 0x90, 0x00, 0x20, 0x08, 0x06, 0x46, 0x75, 0x48, 0xd2, 0x62, 0x8c, 0x18, 0x24, 0x00, 0x08,
|
||||||
|
0x82, 0x81, 0x61, 0x21, 0xd3, 0x44, 0x1c, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x80, 0x58, 0x07,
|
||||||
|
0x45, 0x39, 0xc4, 0x88, 0x41, 0x02, 0x80, 0x20, 0x18, 0x20, 0xd6, 0x41, 0x51, 0xc6, 0x30, 0x62,
|
||||||
|
0x90, 0x00, 0x20, 0x08, 0x06, 0x88, 0x75, 0x50, 0x54, 0x23, 0x8c, 0x18, 0x24, 0x00, 0x08, 0x82,
|
||||||
|
0x01, 0x62, 0x1d, 0x14, 0x55, 0x04, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// MSL only makes sense on Apple platforms
|
||||||
|
#if defined(SDL_PLATFORM_APPLE)
|
||||||
|
static const Uint8 SolidColor_frag_msl[352] = {
|
||||||
|
0x23, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x20, 0x3c, 0x6d, 0x65, 0x74, 0x61, 0x6c, 0x5f,
|
||||||
|
0x73, 0x74, 0x64, 0x6c, 0x69, 0x62, 0x3e, 0x0a, 0x23, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65,
|
||||||
|
0x20, 0x3c, 0x73, 0x69, 0x6d, 0x64, 0x2f, 0x73, 0x69, 0x6d, 0x64, 0x2e, 0x68, 0x3e, 0x0a, 0x0a,
|
||||||
|
0x75, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x20,
|
||||||
|
0x6d, 0x65, 0x74, 0x61, 0x6c, 0x3b, 0x0a, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x6d,
|
||||||
|
0x61, 0x69, 0x6e, 0x30, 0x5f, 0x6f, 0x75, 0x74, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x66,
|
||||||
|
0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x6f, 0x75, 0x74, 0x5f, 0x76, 0x61, 0x72, 0x5f, 0x53, 0x56,
|
||||||
|
0x5f, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x30, 0x20, 0x5b, 0x5b, 0x63, 0x6f, 0x6c, 0x6f, 0x72,
|
||||||
|
0x28, 0x30, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63,
|
||||||
|
0x74, 0x20, 0x6d, 0x61, 0x69, 0x6e, 0x30, 0x5f, 0x69, 0x6e, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x20,
|
||||||
|
0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x69, 0x6e, 0x5f, 0x76, 0x61, 0x72, 0x5f, 0x54,
|
||||||
|
0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x30, 0x20, 0x5b, 0x5b, 0x75, 0x73, 0x65, 0x72, 0x28,
|
||||||
|
0x6c, 0x6f, 0x63, 0x6e, 0x30, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x0a, 0x66, 0x72,
|
||||||
|
0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x6d, 0x61, 0x69, 0x6e, 0x30, 0x5f, 0x6f, 0x75, 0x74,
|
||||||
|
0x20, 0x6d, 0x61, 0x69, 0x6e, 0x30, 0x28, 0x6d, 0x61, 0x69, 0x6e, 0x30, 0x5f, 0x69, 0x6e, 0x20,
|
||||||
|
0x69, 0x6e, 0x20, 0x5b, 0x5b, 0x73, 0x74, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x5d, 0x5d, 0x29,
|
||||||
|
0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6d, 0x61, 0x69, 0x6e, 0x30, 0x5f, 0x6f, 0x75, 0x74,
|
||||||
|
0x20, 0x6f, 0x75, 0x74, 0x20, 0x3d, 0x20, 0x7b, 0x7d, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6f,
|
||||||
|
0x75, 0x74, 0x2e, 0x6f, 0x75, 0x74, 0x5f, 0x76, 0x61, 0x72, 0x5f, 0x53, 0x56, 0x5f, 0x54, 0x61,
|
||||||
|
0x72, 0x67, 0x65, 0x74, 0x30, 0x20, 0x3d, 0x20, 0x69, 0x6e, 0x2e, 0x69, 0x6e, 0x5f, 0x76, 0x61,
|
||||||
|
0x72, 0x5f, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x20,
|
||||||
|
0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6f, 0x75, 0x74, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a,
|
||||||
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
|
static const Uint8 SolidColor_frag_spirv[372] = {
|
||||||
|
0x03, 0x02, 0x23, 0x07, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x0c, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x03, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x07, 0x00, 0x04, 0x00, 0x00, 0x00,
|
||||||
|
0x01, 0x00, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
|
||||||
|
0x03, 0x00, 0x00, 0x00, 0x10, 0x00, 0x03, 0x00, 0x01, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00,
|
||||||
|
0x03, 0x00, 0x03, 0x00, 0x05, 0x00, 0x00, 0x00, 0x58, 0x02, 0x00, 0x00, 0x05, 0x00, 0x07, 0x00,
|
||||||
|
0x02, 0x00, 0x00, 0x00, 0x69, 0x6e, 0x2e, 0x76, 0x61, 0x72, 0x2e, 0x54, 0x45, 0x58, 0x43, 0x4f,
|
||||||
|
0x4f, 0x52, 0x44, 0x30, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x07, 0x00, 0x03, 0x00, 0x00, 0x00,
|
||||||
|
0x6f, 0x75, 0x74, 0x2e, 0x76, 0x61, 0x72, 0x2e, 0x53, 0x56, 0x5f, 0x54, 0x61, 0x72, 0x67, 0x65,
|
||||||
|
0x74, 0x30, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x01, 0x00, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x02, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x03, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x16, 0x00, 0x03, 0x00, 0x04, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00,
|
||||||
|
0x17, 0x00, 0x04, 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
|
||||||
|
0x20, 0x00, 0x04, 0x00, 0x06, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00,
|
||||||
|
0x20, 0x00, 0x04, 0x00, 0x07, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00,
|
||||||
|
0x13, 0x00, 0x02, 0x00, 0x08, 0x00, 0x00, 0x00, 0x21, 0x00, 0x03, 0x00, 0x09, 0x00, 0x00, 0x00,
|
||||||
|
0x08, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x06, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
|
||||||
|
0x01, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x07, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
|
||||||
|
0x03, 0x00, 0x00, 0x00, 0x36, 0x00, 0x05, 0x00, 0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x0a, 0x00, 0x00, 0x00,
|
||||||
|
0x3d, 0x00, 0x04, 0x00, 0x05, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
|
||||||
|
0x3e, 0x00, 0x03, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00,
|
||||||
|
0x38, 0x00, 0x01, 0x00,
|
||||||
|
};
|
||||||
19
miniwin/miniwin/shaders/src/PositionColor.vert.hlsl
Normal file
19
miniwin/miniwin/shaders/src/PositionColor.vert.hlsl
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
struct Input
|
||||||
|
{
|
||||||
|
float3 Position : TEXCOORD0;
|
||||||
|
float4 Color : TEXCOORD1;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct Output
|
||||||
|
{
|
||||||
|
float4 Color : TEXCOORD0;
|
||||||
|
float4 Position : SV_Position;
|
||||||
|
};
|
||||||
|
|
||||||
|
Output main(Input input)
|
||||||
|
{
|
||||||
|
Output output;
|
||||||
|
output.Color = input.Color;
|
||||||
|
output.Position = float4(input.Position, 1.0f);
|
||||||
|
return output;
|
||||||
|
}
|
||||||
6
miniwin/miniwin/shaders/src/PositionColor.vert.hlsl.json
Normal file
6
miniwin/miniwin/shaders/src/PositionColor.vert.hlsl.json
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"num_samplers": 0,
|
||||||
|
"num_storage_textures": 0,
|
||||||
|
"num_storage_buffers": 0,
|
||||||
|
"num_uniform_buffers": 0
|
||||||
|
}
|
||||||
4
miniwin/miniwin/shaders/src/SolidColor.frag.hlsl
Normal file
4
miniwin/miniwin/shaders/src/SolidColor.frag.hlsl
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
float4 main(float4 Color : TEXCOORD0) : SV_Target0
|
||||||
|
{
|
||||||
|
return Color;
|
||||||
|
}
|
||||||
6
miniwin/miniwin/shaders/src/SolidColor.frag.hlsl.json
Normal file
6
miniwin/miniwin/shaders/src/SolidColor.frag.hlsl.json
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"num_samplers": 0,
|
||||||
|
"num_storage_textures": 0,
|
||||||
|
"num_storage_buffers": 0,
|
||||||
|
"num_uniform_buffers": 0
|
||||||
|
}
|
||||||
@ -1,6 +1,7 @@
|
|||||||
#include "miniwin_d3drm.h"
|
#include "miniwin_d3drm.h"
|
||||||
|
|
||||||
#include "miniwin_ddsurface_p.h"
|
#include "miniwin_ddsurface_p.h"
|
||||||
|
#include "ShaderIndex.h"
|
||||||
|
|
||||||
#include <SDL3/SDL.h>
|
#include <SDL3/SDL.h>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
@ -262,82 +263,31 @@ struct Direct3DRMTextureImpl : public Direct3DRMObjectBase<IDirect3DRMTexture2>
|
|||||||
HRESULT Changed(BOOL pixels, BOOL palette) override { return DD_OK; }
|
HRESULT Changed(BOOL pixels, BOOL palette) override { return DD_OK; }
|
||||||
};
|
};
|
||||||
|
|
||||||
SDL_GPUShader* LoadShader(
|
SDL_GPUShader* CompileVertexShader(SDL_GPUDevice* device, VertexShaderId id)
|
||||||
SDL_GPUDevice* device,
|
|
||||||
const char* shaderFilename,
|
|
||||||
Uint32 samplerCount,
|
|
||||||
Uint32 uniformBufferCount,
|
|
||||||
Uint32 storageBufferCount,
|
|
||||||
Uint32 storageTextureCount
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
const char* basePath = SDL_GetBasePath();
|
size_t size;
|
||||||
if (!basePath) {
|
const SDL_GPUShaderCreateInfo* createInfo = GetVertexShaderCode(id, SDL_GetGPUShaderFormats(device));
|
||||||
SDL_Log("Failed to get base path.");
|
if (!createInfo) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
SDL_GPUShader* shader = SDL_CreateGPUShader(device, createInfo);
|
||||||
// Detect shader stage based on filename extension
|
|
||||||
SDL_GPUShaderStage stage;
|
|
||||||
if (SDL_strstr(shaderFilename, ".vert")) {
|
|
||||||
stage = SDL_GPU_SHADERSTAGE_VERTEX;
|
|
||||||
}
|
|
||||||
else if (SDL_strstr(shaderFilename, ".frag")) {
|
|
||||||
stage = SDL_GPU_SHADERSTAGE_FRAGMENT;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
SDL_Log("Invalid shader stage: %s", shaderFilename);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
char fullPath[256];
|
|
||||||
SDL_GPUShaderFormat formats = SDL_GetGPUShaderFormats(device);
|
|
||||||
SDL_GPUShaderFormat format = SDL_GPU_SHADERFORMAT_INVALID;
|
|
||||||
const char* entrypoint = "main";
|
|
||||||
|
|
||||||
if (formats & SDL_GPU_SHADERFORMAT_SPIRV) {
|
|
||||||
SDL_snprintf(fullPath, sizeof(fullPath), "%sShaders/Compiled/SPIRV/%s.spv", basePath, shaderFilename);
|
|
||||||
format = SDL_GPU_SHADERFORMAT_SPIRV;
|
|
||||||
}
|
|
||||||
else if (formats & SDL_GPU_SHADERFORMAT_MSL) {
|
|
||||||
SDL_snprintf(fullPath, sizeof(fullPath), "%sShaders/Compiled/MSL/%s.msl", basePath, shaderFilename);
|
|
||||||
format = SDL_GPU_SHADERFORMAT_MSL;
|
|
||||||
entrypoint = "main0";
|
|
||||||
}
|
|
||||||
else if (formats & SDL_GPU_SHADERFORMAT_DXIL) {
|
|
||||||
SDL_snprintf(fullPath, sizeof(fullPath), "%sShaders/Compiled/DXIL/%s.dxil", basePath, shaderFilename);
|
|
||||||
format = SDL_GPU_SHADERFORMAT_DXIL;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
SDL_Log("Unsupported backend shader format.");
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
size_t codeSize;
|
|
||||||
void* code = SDL_LoadFile(fullPath, &codeSize);
|
|
||||||
if (!code) {
|
|
||||||
SDL_Log("Failed to load shader file: %s", fullPath);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
SDL_GPUShaderCreateInfo shaderInfo = {
|
|
||||||
codeSize,
|
|
||||||
(const Uint8*) code,
|
|
||||||
entrypoint,
|
|
||||||
format,
|
|
||||||
stage,
|
|
||||||
samplerCount,
|
|
||||||
storageTextureCount,
|
|
||||||
storageBufferCount,
|
|
||||||
uniformBufferCount,
|
|
||||||
};
|
|
||||||
|
|
||||||
SDL_GPUShader* shader = SDL_CreateGPUShader(device, &shaderInfo);
|
|
||||||
if (!shader) {
|
if (!shader) {
|
||||||
SDL_Log("Shader creation failed.");
|
SDL_Log("Failed to create Vertex GPU shader: %s", SDL_GetError());
|
||||||
|
}
|
||||||
|
return shader;
|
||||||
}
|
}
|
||||||
|
|
||||||
SDL_free(code);
|
SDL_GPUShader* CompileFragmentShader(SDL_GPUDevice* device, FragmentShaderId id)
|
||||||
|
{
|
||||||
|
size_t size;
|
||||||
|
const SDL_GPUShaderCreateInfo* createInfo = GetFragmentShaderCode(id, SDL_GetGPUShaderFormats(device));
|
||||||
|
if (!createInfo) {
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
SDL_GPUShader* shader = SDL_CreateGPUShader(device, createInfo);
|
||||||
|
if (!shader) {
|
||||||
|
SDL_Log("Failed to create Fragment GPU shader: %s", SDL_GetError());
|
||||||
|
}
|
||||||
return shader;
|
return shader;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -368,12 +318,12 @@ struct Direct3DRMDevice2Impl : public Direct3DRMObjectBase<IDirect3DRMDevice2> {
|
|||||||
SDL_Log("GPUClaimWindow failed");
|
SDL_Log("GPUClaimWindow failed");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
SDL_GPUShader* vertexShader = LoadShader(m_device, "PositionColor.vert", 0, 0, 0, 0);
|
SDL_GPUShader* vertexShader = CompileVertexShader(m_device, VertexShaderId::PositionColor);
|
||||||
if (vertexShader == NULL) {
|
if (vertexShader == NULL) {
|
||||||
SDL_Log("Failed to create vertex shader!");
|
SDL_Log("Failed to create vertex shader!");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
SDL_GPUShader* fragmentShader = LoadShader(m_device, "SolidColor.frag", 0, 0, 0, 0);
|
SDL_GPUShader* fragmentShader = CompileFragmentShader(m_device, FragmentShaderId::SolidColor);
|
||||||
if (fragmentShader == NULL) {
|
if (fragmentShader == NULL) {
|
||||||
SDL_Log("Failed to create fragment shader!");
|
SDL_Log("Failed to create fragment shader!");
|
||||||
return;
|
return;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user