Refactor: GPU: Texture: Replace eGPUTextureFormat by TextureFormat
This offers better semantic and safety of the API. Part of #130632 Pull Request: https://projects.blender.org/blender/blender/pulls/142818
This commit is contained in:
committed by
Clément Foucault
parent
144696f7ee
commit
32d64d35bb
@@ -792,12 +792,12 @@ static PyObject *pygpu_shader_info_image(BPyGPUShaderCreateInfo *self,
|
||||
}
|
||||
|
||||
if (pygpu_texformat.value_found == GPU_DEPTH24_STENCIL8_DEPRECATED) {
|
||||
pygpu_texformat.value_found = GPU_DEPTH32F_STENCIL8;
|
||||
pygpu_texformat.value_found = int(blender::gpu::TextureFormat::SFLOAT_32_DEPTH_UINT_8);
|
||||
PyErr_WarnEx(
|
||||
PyExc_DeprecationWarning, "'DEPTH24_STENCIL8' is deprecated. Use 'DEPTH32F_STENCIL8'.", 1);
|
||||
}
|
||||
if (pygpu_texformat.value_found == GPU_DEPTH_COMPONENT24_DEPRECATED) {
|
||||
pygpu_texformat.value_found = GPU_DEPTH_COMPONENT32F;
|
||||
pygpu_texformat.value_found = int(blender::gpu::TextureFormat::SFLOAT_32_DEPTH);
|
||||
PyErr_WarnEx(PyExc_DeprecationWarning,
|
||||
"'DEPTH_COMPONENT24' is deprecated. Use 'DEPTH_COMPONENT32F'.",
|
||||
1);
|
||||
@@ -809,7 +809,7 @@ static PyObject *pygpu_shader_info_image(BPyGPUShaderCreateInfo *self,
|
||||
|
||||
ShaderCreateInfo *info = reinterpret_cast<ShaderCreateInfo *>(self->info);
|
||||
info->image(slot,
|
||||
(eGPUTextureFormat)pygpu_texformat.value_found,
|
||||
(blender::gpu::TextureFormat)pygpu_texformat.value_found,
|
||||
qualifier,
|
||||
blender::gpu::shader::ImageReadWriteType(pygpu_imagetype.value_found),
|
||||
name);
|
||||
|
||||
Reference in New Issue
Block a user