Cleanup: use better matching integer types for graphics interop handle

Ref D16042
This commit is contained in:
Brecht Van Lommel 2022-12-01 15:42:04 +01:00
parent b132e3b3ce
commit 009f7de619
5 changed files with 5 additions and 5 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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) {