From 28ea459a61f65de03724db8709271d41f6bf135b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Foucault?= Date: Tue, 8 Sep 2020 00:30:38 +0200 Subject: GPUState: Encapsulate glPixelStorei inside the GLStateManager Part of the Vulkan task T68990 Isolate the last remaining gl functions. --- source/blender/gpu/intern/gpu_texture.cc | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'source/blender/gpu/intern/gpu_texture.cc') diff --git a/source/blender/gpu/intern/gpu_texture.cc b/source/blender/gpu/intern/gpu_texture.cc index 0aa1a6553f9..95f922173b5 100644 --- a/source/blender/gpu/intern/gpu_texture.cc +++ b/source/blender/gpu/intern/gpu_texture.cc @@ -380,6 +380,13 @@ void GPU_texture_update(GPUTexture *tex, eGPUDataFormat data_format, const void reinterpret_cast(tex)->update(data_format, data); } +/* Makes data interpretation aware of the source layout. + * Skipping pixels correctly when changing rows when doing partial update.*/ +void GPU_unpack_row_length_set(uint len) +{ + GPU_context_active_get()->state_manager->texture_unpack_row_length_set(len); +} + void GPU_invalid_tex_init(void) { /* TODO remove */ -- cgit v1.2.3