Cleanup: use better matching integer types for graphics interop handle
Ref D16042
This commit is contained in:
parent
b132e3b3ce
commit
009f7de619
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue