diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2022-02-05 21:26:07 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2022-02-05 21:26:07 +0300 |
commit | ee6fafc6156dca537b36a1ce5bb4495bed983da2 (patch) | |
tree | f6a489fc8125a723e5ad0e02ff40178de09f8cdd | |
parent | 94b35f9e9de5c47cb273764cf291332c602fbd0d (diff) |
GPUTexture: Fix missing cases in to_data_format()
-rw-r--r-- | source/blender/gpu/intern/gpu_texture_private.hh | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/source/blender/gpu/intern/gpu_texture_private.hh b/source/blender/gpu/intern/gpu_texture_private.hh index 317da8dec75..fea23f8921c 100644 --- a/source/blender/gpu/intern/gpu_texture_private.hh +++ b/source/blender/gpu/intern/gpu_texture_private.hh @@ -462,7 +462,6 @@ inline bool validate_data_format(eGPUTextureFormat tex_format, eGPUDataFormat da } } -/* Definitely not complete, edit according to the gl specification. */ inline eGPUDataFormat to_data_format(eGPUTextureFormat tex_format) { switch (tex_format) { @@ -473,16 +472,27 @@ inline eGPUDataFormat to_data_format(eGPUTextureFormat tex_format) case GPU_DEPTH24_STENCIL8: case GPU_DEPTH32F_STENCIL8: return GPU_DATA_UINT_24_8; - case GPU_R8UI: case GPU_R16UI: - case GPU_RG16UI: case GPU_R32UI: + case GPU_RG16UI: + case GPU_RG32UI: + case GPU_RGBA16UI: + case GPU_RGBA32UI: return GPU_DATA_UINT; - case GPU_RG16I: case GPU_R16I: + case GPU_R32I: + case GPU_R8I: + case GPU_RG16I: + case GPU_RG32I: + case GPU_RG8I: + case GPU_RGBA16I: + case GPU_RGBA32I: + case GPU_RGBA8I: return GPU_DATA_INT; case GPU_R8: + case GPU_R8UI: case GPU_RG8: + case GPU_RG8UI: case GPU_RGBA8: case GPU_RGBA8UI: case GPU_SRGB8_A8: |