diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2022-01-27 17:50:38 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2022-01-27 17:50:38 +0300 |
commit | d518550c46d7811ea98fb549cc29961621d66b07 (patch) | |
tree | eb151b61ffc9982acc1e2302fe402e90a5c111ac /source/blender/gpu/GPU_texture.h | |
parent | aa2164da336082248ab452875f673e175c0448fe (diff) |
Fix crash on older platform due to unsupported clear command
Clearing using GPU_texture_create_2d for unorm texture needs to use
GPU_DATA_FLOAT to match the conversion requirements.
Diffstat (limited to 'source/blender/gpu/GPU_texture.h')
-rw-r--r-- | source/blender/gpu/GPU_texture.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/gpu/GPU_texture.h b/source/blender/gpu/GPU_texture.h index d65115541fa..6fae4a13918 100644 --- a/source/blender/gpu/GPU_texture.h +++ b/source/blender/gpu/GPU_texture.h @@ -272,7 +272,7 @@ void *GPU_texture_read(GPUTexture *tex, eGPUDataFormat data_format, int miplvl); * Fills the whole texture with the same data for all pixels. * \warning Only work for 2D texture for now. * \warning Only clears the mip 0 of the texture. - * \param data_format: data format of the pixel data. + * \param data_format: data format of the pixel data. \note The format is float for unorm textures. * \param data: 1 pixel worth of data to fill the texture with. */ void GPU_texture_clear(GPUTexture *tex, eGPUDataFormat data_format, const void *data); |