diff options
-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 73b59b9f06f..3195e98da5e 100644 --- a/source/blender/gpu/intern/gpu_texture_private.hh +++ b/source/blender/gpu/intern/gpu_texture_private.hh @@ -451,7 +451,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) { @@ -462,16 +461,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: |