Changeset View
Changeset View
Standalone View
Standalone View
source/blender/gpu/intern/gpu_shader_create_info.hh
| Show First 20 Lines • Show All 339 Lines • ▼ Show 20 Lines | struct ShaderCreateInfo { | ||||
| /** If true, all resources will have an automatic location assigned. */ | /** If true, all resources will have an automatic location assigned. */ | ||||
| bool auto_resource_location_ = false; | bool auto_resource_location_ = false; | ||||
| /** If true, force depth and stencil tests to always happen before fragment shader invocation. */ | /** If true, force depth and stencil tests to always happen before fragment shader invocation. */ | ||||
| bool early_fragment_test_ = false; | bool early_fragment_test_ = false; | ||||
| /** If true, force the use of the GL shader introspection for resource location. */ | /** If true, force the use of the GL shader introspection for resource location. */ | ||||
| bool legacy_resource_location_ = false; | bool legacy_resource_location_ = false; | ||||
| /** Allow optimization when fragment shader writes to `gl_FragDepth`. */ | /** Allow optimization when fragment shader writes to `gl_FragDepth`. */ | ||||
| DepthWrite depth_write_ = DepthWrite::NONE; | DepthWrite depth_write_ = DepthWrite::NONE; | ||||
| /** GPU Backend compatibility flag. Temporary requirement until Metal enablement is fully | |||||
| * complete. */ | |||||
| bool metal_backend_only_ = false; | |||||
| /** | /** | ||||
| * Maximum length of all the resource names including each null terminator. | * Maximum length of all the resource names including each null terminator. | ||||
| * Only for names used by #gpu::ShaderInterface. | * Only for names used by #gpu::ShaderInterface. | ||||
| */ | */ | ||||
| size_t interface_names_size_ = 0; | size_t interface_names_size_ = 0; | ||||
| /** Manually set builtins. */ | /** Manually set builtins. */ | ||||
| BuiltinBits builtins_ = BuiltinBits::NONE; | BuiltinBits builtins_ = BuiltinBits::NONE; | ||||
| /** Manually set generated code. */ | /** Manually set generated code. */ | ||||
| ▲ Show 20 Lines • Show All 433 Lines • ▼ Show 20 Lines | public: | ||||
| } | } | ||||
| Self &legacy_resource_location(bool value) | Self &legacy_resource_location(bool value) | ||||
| { | { | ||||
| legacy_resource_location_ = value; | legacy_resource_location_ = value; | ||||
| return *(Self *)this; | return *(Self *)this; | ||||
| } | } | ||||
| Self &metal_backend_only(bool flag) | |||||
| { | |||||
| metal_backend_only_ = flag; | |||||
| return *(Self *)this; | |||||
| } | |||||
| /** \} */ | /** \} */ | ||||
| /* -------------------------------------------------------------------- */ | /* -------------------------------------------------------------------- */ | ||||
| /** \name Additional Create Info | /** \name Additional Create Info | ||||
| * | * | ||||
| * Used to share parts of the infos that are common to many shaders. | * Used to share parts of the infos that are common to many shaders. | ||||
| * \{ */ | * \{ */ | ||||
| ▲ Show 20 Lines • Show All 169 Lines • Show Last 20 Lines | |||||