[Bf-blender-cvs] [009f7de619e] master: Cleanup: use better matching integer types for graphics interop handle
Brecht Van Lommel
noreply at git.blender.org
Thu Dec 1 15:55:57 CET 2022
Commit: 009f7de619e62b9415fa09f4ee72ecb4b8fbb9b9
Author: Brecht Van Lommel
Date: Thu Dec 1 15:42:04 2022 +0100
Branches: master
https://developer.blender.org/rB009f7de619e62b9415fa09f4ee72ecb4b8fbb9b9
Cleanup: use better matching integer types for graphics interop handle
Ref D16042
===================================================================
M intern/cycles/blender/display_driver.cpp
M intern/cycles/device/cuda/graphics_interop.h
M intern/cycles/device/hip/graphics_interop.h
M intern/cycles/session/display_driver.h
M source/blender/gpu/opengl/gl_texture.cc
===================================================================
diff --git a/intern/cycles/blender/display_driver.cpp b/intern/cycles/blender/display_driver.cpp
index 2469046eccf..883310e13ae 100644
--- a/intern/cycles/blender/display_driver.cpp
+++ b/intern/cycles/blender/display_driver.cpp
@@ -679,7 +679,7 @@ BlenderDisplayDriver::GraphicsInterop BlenderDisplayDriver::graphics_interop_get
interop_dst.buffer_width = tiles_->current_tile.buffer_object.width;
interop_dst.buffer_height = tiles_->current_tile.buffer_object.height;
- interop_dst.opengl_pbo_id = (int)GPU_pixel_buffer_get_native_handle(
+ interop_dst.opengl_pbo_id = GPU_pixel_buffer_get_native_handle(
tiles_->current_tile.buffer_object.gpu_pixel_buffer);
return interop_dst;
diff --git a/intern/cycles/device/cuda/graphics_interop.h b/intern/cycles/device/cuda/graphics_interop.h
index c6b30b1a10c..067ae63d296 100644
--- a/intern/cycles/device/cuda/graphics_interop.h
+++ b/intern/cycles/device/cuda/graphics_interop.h
@@ -38,7 +38,7 @@ class CUDADeviceGraphicsInterop : public DeviceGraphicsInterop {
CUDADevice *device_ = nullptr;
/* OpenGL PBO which is currently registered as the destination for the CUDA buffer. */
- uint opengl_pbo_id_ = 0;
+ int64_t opengl_pbo_id_ = 0;
/* Buffer area in pixels of the corresponding PBO. */
int64_t buffer_area_ = 0;
diff --git a/intern/cycles/device/hip/graphics_interop.h b/intern/cycles/device/hip/graphics_interop.h
index fad258d10a7..06a8c4cdb6e 100644
--- a/intern/cycles/device/hip/graphics_interop.h
+++ b/intern/cycles/device/hip/graphics_interop.h
@@ -36,7 +36,7 @@ class HIPDeviceGraphicsInterop : public DeviceGraphicsInterop {
HIPDevice *device_ = nullptr;
/* OpenGL PBO which is currently registered as the destination for the HIP buffer. */
- uint opengl_pbo_id_ = 0;
+ int64_t opengl_pbo_id_ = 0;
/* Buffer area in pixels of the corresponding PBO. */
int64_t buffer_area_ = 0;
diff --git a/intern/cycles/session/display_driver.h b/intern/cycles/session/display_driver.h
index f1d654e57d1..bc6203e48a2 100644
--- a/intern/cycles/session/display_driver.h
+++ b/intern/cycles/session/display_driver.h
@@ -85,7 +85,7 @@ class DisplayDriver {
int buffer_height = 0;
/* OpenGL pixel buffer object. */
- int opengl_pbo_id = 0;
+ int64_t opengl_pbo_id = 0;
/* Clear the entire buffer before doing partial write to it. */
bool need_clear = false;
diff --git a/source/blender/gpu/opengl/gl_texture.cc b/source/blender/gpu/opengl/gl_texture.cc
index dae5aa45cc9..6db73345d5f 100644
--- a/source/blender/gpu/opengl/gl_texture.cc
+++ b/source/blender/gpu/opengl/gl_texture.cc
@@ -320,7 +320,7 @@ void GLTexture::update_sub(int offset[3],
GLContext::state_manager_active_get()->texture_bind_temp(this);
/* Bind pixel buffer for source data. */
- int pix_buf_handle = (int)GPU_pixel_buffer_get_native_handle(pixbuf);
+ GLint pix_buf_handle = (GLint)GPU_pixel_buffer_get_native_handle(pixbuf);
glBindBuffer(GL_PIXEL_UNPACK_BUFFER, pix_buf_handle);
switch (dimensions) {
More information about the Bf-blender-cvs
mailing list