* @brief Load a 16-bit fp16 texel from a data array. * * @param data The data pointer. * @param base_offset The index offset to the start of the pixel. */
| 60 | * @param base_offset The index offset to the start of the pixel. |
| 61 | */ |
| 62 | static vfloat4 load_texel_f16( |
| 63 | const void* data, |
| 64 | size_t base_offset |
| 65 | ) { |
| 66 | const uint16_t* data16 = static_cast<const uint16_t*>(data); |
| 67 | int r = data16[base_offset ]; |
| 68 | int g = data16[base_offset + 1]; |
| 69 | int b = data16[base_offset + 2]; |
| 70 | int a = data16[base_offset + 3]; |
| 71 | return float16_to_float(vint4(r, g, b, a)); |
| 72 | } |
| 73 | |
| 74 | /** |
| 75 | * @brief Load a 32-bit float texel from a data array. |
nothing calls this directly
no test coverage detected