Changeset View
Changeset View
Standalone View
Standalone View
source/blender/gpu/intern/gpu_shader.cc
| Show First 20 Lines • Show All 351 Lines • ▼ Show 20 Lines | GPUShader *GPU_shader_create_ex(const char *vertcode, | ||||
| if (computecode) { | if (computecode) { | ||||
| Vector<const char *> sources; | Vector<const char *> sources; | ||||
| standard_defines(sources); | standard_defines(sources); | ||||
| sources.append("#define GPU_COMPUTE_SHADER\n"); | sources.append("#define GPU_COMPUTE_SHADER\n"); | ||||
| if (defines) { | if (defines) { | ||||
| sources.append(defines); | sources.append(defines); | ||||
| } | } | ||||
| if (libcode) { | |||||
| sources.append(libcode); | |||||
| } | |||||
| sources.append(computecode); | sources.append(computecode); | ||||
| shader->compute_shader_from_glsl(sources); | shader->compute_shader_from_glsl(sources); | ||||
| } | } | ||||
| if (tf_names != nullptr && tf_count > 0) { | if (tf_names != nullptr && tf_count > 0) { | ||||
| BLI_assert(tf_type != GPU_SHADER_TFB_NONE); | BLI_assert(tf_type != GPU_SHADER_TFB_NONE); | ||||
| shader->transform_feedback_names_set(Span<const char *>(tf_names, tf_count), tf_type); | shader->transform_feedback_names_set(Span<const char *>(tf_names, tf_count), tf_type); | ||||
| ▲ Show 20 Lines • Show All 406 Lines • Show Last 20 Lines | |||||