Changeset View
Changeset View
Standalone View
Standalone View
source/blender/gpu/intern/gpu_shader.cc
| Show First 20 Lines • Show All 243 Lines • ▼ Show 20 Lines | return GPU_shader_create_ex(nullptr, | ||||
| libcode, | libcode, | ||||
| defines, | defines, | ||||
| GPU_SHADER_TFB_NONE, | GPU_SHADER_TFB_NONE, | ||||
| nullptr, | nullptr, | ||||
| 0, | 0, | ||||
| shname); | shname); | ||||
| } | } | ||||
| GPUShader *GPU_shader_create_from_info_name(const char *info_name) | |||||
jbakker: Should also be used in gpu_shaders_builtin. | |||||
| { | |||||
| using namespace blender::gpu::shader; | |||||
| const GPUShaderCreateInfo *_info = gpu_shader_create_info_get(info_name); | |||||
| const ShaderCreateInfo &info = *reinterpret_cast<const ShaderCreateInfo *>(_info); | |||||
| if (!info.do_static_compilation_) { | |||||
| printf("Warning: Trying to compile \"%s\" which was not marked for static compilation.\n", | |||||
| info.name_.c_str()); | |||||
| } | |||||
| return GPU_shader_create_from_info(_info); | |||||
| } | |||||
| GPUShader *GPU_shader_create_from_info(const GPUShaderCreateInfo *_info) | GPUShader *GPU_shader_create_from_info(const GPUShaderCreateInfo *_info) | ||||
| { | { | ||||
| using namespace blender::gpu::shader; | using namespace blender::gpu::shader; | ||||
| const ShaderCreateInfo &info = *reinterpret_cast<const ShaderCreateInfo *>(_info); | const ShaderCreateInfo &info = *reinterpret_cast<const ShaderCreateInfo *>(_info); | ||||
| const_cast<ShaderCreateInfo &>(info).finalize(); | const_cast<ShaderCreateInfo &>(info).finalize(); | ||||
| /* At least a vertex shader and a fragment shader are required, or only a compute shader. */ | /* At least a vertex shader and a fragment shader are required, or only a compute shader. */ | ||||
| ▲ Show 20 Lines • Show All 523 Lines • Show Last 20 Lines | |||||
Should also be used in gpu_shaders_builtin.