Changeset View
Changeset View
Standalone View
Standalone View
source/blender/gpu/intern/gpu_shader_create_info.cc
| Show First 20 Lines • Show All 294 Lines • ▼ Show 20 Lines | #endif | ||||
| /* WORKAROUND: Replace draw_mesh info with the legacy one for systems that have problems with UBO | /* WORKAROUND: Replace draw_mesh info with the legacy one for systems that have problems with UBO | ||||
| * indexing. */ | * indexing. */ | ||||
| if (GPU_type_matches(GPU_DEVICE_INTEL | GPU_DEVICE_INTEL_UHD, GPU_OS_ANY, GPU_DRIVER_ANY) || | if (GPU_type_matches(GPU_DEVICE_INTEL | GPU_DEVICE_INTEL_UHD, GPU_OS_ANY, GPU_DRIVER_ANY) || | ||||
| GPU_type_matches(GPU_DEVICE_ANY, GPU_OS_MAC, GPU_DRIVER_ANY) || GPU_crappy_amd_driver()) { | GPU_type_matches(GPU_DEVICE_ANY, GPU_OS_MAC, GPU_DRIVER_ANY) || GPU_crappy_amd_driver()) { | ||||
| draw_modelmat = draw_modelmat_legacy; | draw_modelmat = draw_modelmat_legacy; | ||||
| } | } | ||||
| /* WORKAROUND: Replace the use of gpu_BaseInstance by an instance attribute. */ | |||||
| if (GPU_shader_draw_parameters_support() == false) { | |||||
| draw_resource_id_new = draw_resource_id_fallback; | |||||
| } | |||||
| for (ShaderCreateInfo *info : g_create_infos->values()) { | for (ShaderCreateInfo *info : g_create_infos->values()) { | ||||
| if (info->do_static_compilation_) { | if (info->do_static_compilation_) { | ||||
| info->builtins_ |= gpu_shader_dependency_get_builtins(info->vertex_source_); | info->builtins_ |= gpu_shader_dependency_get_builtins(info->vertex_source_); | ||||
| info->builtins_ |= gpu_shader_dependency_get_builtins(info->fragment_source_); | info->builtins_ |= gpu_shader_dependency_get_builtins(info->fragment_source_); | ||||
| info->builtins_ |= gpu_shader_dependency_get_builtins(info->geometry_source_); | info->builtins_ |= gpu_shader_dependency_get_builtins(info->geometry_source_); | ||||
| info->builtins_ |= gpu_shader_dependency_get_builtins(info->compute_source_); | info->builtins_ |= gpu_shader_dependency_get_builtins(info->compute_source_); | ||||
| /* Automatically amend the create info for ease of use of the debug feature. */ | /* Automatically amend the create info for ease of use of the debug feature. */ | ||||
| ▲ Show 20 Lines • Show All 114 Lines • Show Last 20 Lines | |||||