|
Blender V5.3
|
#include "gpu_shader_compat.hh"Go to the source code of this file.
Macros | |
| #define | FLT_11_MAX uintBitsToFloat(0x477E0000) |
| #define | FLT_10_MAX uintBitsToFloat(0x477C0000) |
| #define | FLT_11_11_10_MAX float3(FLT_11_MAX, FLT_11_MAX, FLT_10_MAX) |
| #define | UNPACK2(a) |
| #define | UNPACK3(a) |
| #define | UNPACK4(a) |
| #define | in_range_inclusive(val, min_v, max_v) |
| #define | in_range_exclusive(val, min_v, max_v) |
| #define | in_texture_range(texel, tex) |
| #define | in_image_range(texel, tex) |
| #define | weighted_sum(val0, val1, val2, val3, weights) |
Functions | |
| bool | flag_test (uint flag, uint val) |
| bool | flag_test (int flag, uint val) |
| bool | flag_test (int flag, int val) |
| void | set_flag_from_test (uint &value, bool test, uint flag) |
| void | set_flag_from_test (int &value, bool test, int flag) |
| bool | bitmask64_test (uint2 bitmask, uint bit_index) |
| uint | packUvec2x16 (uint2 a) |
| uint2 | unpackUvec2x16 (uint a) |
| uint | packUvec4x8 (uint4 a) |
| uint4 | unpackUvec4x8 (uint a) |
| int | floatBitsToOrderedInt (float value) |
| float | orderedIntBitsToFloat (int int_value) |
| #define FLT_10_MAX uintBitsToFloat(0x477C0000) |
Definition at line 10 of file gpu_shader_utildefines.bsl.hh.
| #define FLT_11_11_10_MAX float3(FLT_11_MAX, FLT_11_MAX, FLT_10_MAX) |
Definition at line 11 of file gpu_shader_utildefines.bsl.hh.
Referenced by eevee::raytracing::denoise::bilateral_main(), eevee::raytracing::denoise::DenoiseTemporal::history_validate(), eevee::raytracing::denoise::DenoiseSpatial::invalid_pixel_write(), eevee::raytracing::denoise::DenoiseTemporal::local_statistics_get(), and eevee::raytracing::denoise::temporal_main().
| #define FLT_11_MAX uintBitsToFloat(0x477E0000) |
Definition at line 9 of file gpu_shader_utildefines.bsl.hh.
| #define in_image_range | ( | texel, | |
| tex ) |
Definition at line 21 of file gpu_shader_utildefines.bsl.hh.
Referenced by eevee::raytracing::denoise::DenoiseTemporal::local_statistics_get(), eevee::raytracing::denoise::spatial_main(), eevee::raytracing::denoise::temporal_main(), and eevee::raytracing::tile_compact().
| #define in_range_exclusive | ( | val, | |
| min_v, | |||
| max_v ) |
Definition at line 19 of file gpu_shader_utildefines.bsl.hh.
Referenced by eevee::raytracing::denoise::DenoiseTemporal::variance_history_sample().
| #define in_range_inclusive | ( | val, | |
| min_v, | |||
| max_v ) |
Definition at line 18 of file gpu_shader_utildefines.bsl.hh.
Referenced by eevee::shadow::usage::tag_usage_opaque(), and eevee::shadow::tilemap_init_main().
| #define in_texture_range | ( | texel, | |
| tex ) |
Definition at line 20 of file gpu_shader_utildefines.bsl.hh.
Referenced by eevee::motion_blur::gather::gather_comp(), eevee::raytracing::denoise::DenoiseTemporal::history_validate(), eevee::raytracing::denoise::spatial_main(), and eevee::raytracing::tile_classify().
| #define UNPACK2 | ( | a | ) |
Definition at line 13 of file gpu_shader_utildefines.bsl.hh.
| #define UNPACK3 | ( | a | ) |
Definition at line 14 of file gpu_shader_utildefines.bsl.hh.
| #define UNPACK4 | ( | a | ) |
Definition at line 15 of file gpu_shader_utildefines.bsl.hh.
| #define weighted_sum | ( | val0, | |
| val1, | |||
| val2, | |||
| val3, | |||
| weights ) |
Definition at line 23 of file gpu_shader_utildefines.bsl.hh.
Referenced by blender::nodes::node_composite_kuwahara_cc::ConvertKuwaharaOperation::execute_anisotropic_cpu().
| bool bitmask64_test | ( | uint2 | bitmask, |
| uint | bit_index ) |
Return true if the bit inside bitmask at bit_index is set high. Assume the lower bits are inside first component of bitmask,
Definition at line 62 of file gpu_shader_utildefines.bsl.hh.
References bitmask64_test(), flag_test(), uint2::x, and uint2::y.
Referenced by bitmask64_test(), eevee::light::light_linking_affects_receiver(), and eevee::shadow::ViewVisibility::shadow_linking_affects_caster().
| bool flag_test | ( | int | flag, |
| int | val ) |
Definition at line 34 of file gpu_shader_utildefines.bsl.hh.
References flag_test().
| bool flag_test | ( | int | flag, |
| uint | val ) |
Definition at line 30 of file gpu_shader_utildefines.bsl.hh.
References flag_test().
| bool flag_test | ( | uint | flag, |
| uint | val ) |
Definition at line 26 of file gpu_shader_utildefines.bsl.hh.
References flag_test().
Referenced by occupancy::bit_resolve(), bitmask64_test(), blender::BKE_curve_decimate_bezt_array(), blender::BKE_curve_decimate_nurb(), curves_attribute_element_id(), flag_test(), flag_test(), flag_test(), builtin::keyframe::frag_main(), eevee::shadow::TilemapInit::init_tile_data(), blender::nurb_bezt_flag_any(), overlay::outline_colorid_get(), output_aov(), eevee::film::Film::process_render_sample(), draw::resource_finalize_main(), draw::pointcloud::shape_point_get(), eevee::raytracing::denoise::spatial_main(), eevee::surf_deferred(), eevee::surf_forward(), eevee::surf_hybrid(), eevee::raytracing::denoise::temporal_main(), eevee::shadow::tilemap_init_main(), gbuffer::Header::use_object_id(), overlay::armature::stick_bone::vert(), builtin::keyframe::vert_main(), overlay::wireframe::detail::wire_color_get(), and overlay::wireframe::detail::wire_object_color_get().
| int floatBitsToOrderedInt | ( | float | value | ) |
Convert from float representation to ordered int allowing min/max atomic operation. Based on: https://stackoverflow.com/a/31010352
Definition at line 98 of file gpu_shader_utildefines.bsl.hh.
References floatBitsToInt, and floatBitsToOrderedInt().
Referenced by eevee::shadow::TilemapBoundsCtx::eval_directional(), floatBitsToOrderedInt(), gpu_math_test_main(), eevee::lightprobe::volume::scene_bounds(), eevee::shadow::tilemap_bounds_clear(), and eevee::shadow::tilemap_init_main().
| float orderedIntBitsToFloat | ( | int | int_value | ) |
Definition at line 108 of file gpu_shader_utildefines.bsl.hh.
References intBitsToFloat, and orderedIntBitsToFloat().
Referenced by eevee::ShadowRenderData::directional_sample_get(), gpu_math_test_main(), orderedIntBitsToFloat(), eevee::shadow_map_trace_sample(), eevee::shadow_ray_generate_directional(), and eevee::shadow::tilemap_init_main().
| uint packUvec2x16 | ( | uint2 | a | ) |
Pack two 16-bit uint into one 32-bit uint.
Definition at line 71 of file gpu_shader_utildefines.bsl.hh.
References packUvec2x16(), uint2::x, and uint2::y.
Referenced by packUvec2x16(), eevee::subsurface::setup_main(), and eevee::raytracing::tile_compact().
| uint packUvec4x8 | ( | uint4 | a | ) |
Pack four 8-bit uint into one 32-bit uint.
Definition at line 84 of file gpu_shader_utildefines.bsl.hh.
References packUvec4x8(), uint4::w, uint4::x, uint4::y, and uint4::z.
Referenced by packUvec4x8(), and eevee::shadow::rendermap_finalize_main().
| void set_flag_from_test | ( | int & | value, |
| bool | test, | ||
| int | flag ) |
Definition at line 48 of file gpu_shader_utildefines.bsl.hh.
References set_flag_from_test().
| void set_flag_from_test | ( | uint & | value, |
| bool | test, | ||
| uint | flag ) |
Definition at line 39 of file gpu_shader_utildefines.bsl.hh.
References set_flag_from_test().
Referenced by occupancy::resolve(), gbuffer::Packer::result_get(), set_flag_from_test(), set_flag_from_test(), and gbuffer::Header::use_object_id_set().
| uint2 unpackUvec2x16 | ( | uint | a | ) |
Definition at line 76 of file gpu_shader_utildefines.bsl.hh.
References unpackUvec2x16().
Referenced by eevee::subsurface::Convolve::cache_sample(), eevee::subsurface::convolve_main(), eevee::fast_gi::denoise(), eevee::raytracing::generate_rays(), eevee::fast_gi::resolve(), eevee::fast_gi::scan(), eevee::raytracing::denoise::TileBuffer::tile_coord(), eevee::raytrace::fallback::trace(), eevee::raytrace::planar::trace(), eevee::raytrace::screen::trace(), and unpackUvec2x16().
| uint4 unpackUvec4x8 | ( | uint | a | ) |
Definition at line 89 of file gpu_shader_utildefines.bsl.hh.
References unpackUvec4x8().
Referenced by unpackUvec4x8().