Set a default shader entry point

The default should be the entrypoint generated by SDL_shadercross. That way it doesn't need to be hand-specified in the common workflow.
This commit is contained in:
Sam Lantinga 2025-03-14 10:27:50 -07:00
parent 1a2fccc56a
commit dcb97a5f49
5 changed files with 11 additions and 14 deletions

View file

@ -172,17 +172,14 @@ static bool InitGPURenderState(void)
info.format = SDL_GPU_SHADERFORMAT_SPIRV;
info.code = data->spirv_shader_source;
info.code_size = data->spirv_shader_source_len;
info.entrypoint = "main";
} else if (formats & SDL_GPU_SHADERFORMAT_DXIL) {
info.format = SDL_GPU_SHADERFORMAT_DXIL;
info.code = data->dxil_shader_source;
info.code_size = data->dxil_shader_source_len;
info.entrypoint = "main";
} else if (formats & SDL_GPU_SHADERFORMAT_MSL) {
info.format = SDL_GPU_SHADERFORMAT_MSL;
info.code = data->msl_shader_source;
info.code_size = data->msl_shader_source_len;
info.entrypoint = "main0";
} else {
SDL_Log("No supported shader format found");
return false;