Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2017-11-05 02:34:30 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2017-11-05 17:22:04 +0300
commit5801ef71e40bc932c69e67f06076cd8b41132e52 (patch)
tree1fec0c65b9ead5720f54229497060af1f0194bbb /intern/cycles/device/device.cpp
parent5475314f4955dbc3af305577a26fe0b537380313 (diff)
Code refactor: device memory cleanups, preparing for mapped host memory.
Diffstat (limited to 'intern/cycles/device/device.cpp')
-rw-r--r--intern/cycles/device/device.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/intern/cycles/device/device.cpp b/intern/cycles/device/device.cpp
index b2f20bab58b..641e3fde140 100644
--- a/intern/cycles/device/device.cpp
+++ b/intern/cycles/device/device.cpp
@@ -102,17 +102,17 @@ void Device::draw_pixels(device_memory& rgba, int y, int w, int h, int dx, int d
if(rgba.data_type == TYPE_HALF) {
/* for multi devices, this assumes the inefficient method that we allocate
* all pixels on the device even though we only render to a subset */
- GLhalf *data_pointer = (GLhalf*)rgba.data_pointer;
+ GLhalf *host_pointer = (GLhalf*)rgba.host_pointer;
float vbuffer[16], *basep;
float *vp = NULL;
- data_pointer += 4*y*w;
+ host_pointer += 4*y*w;
/* draw half float texture, GLSL shader for display transform assumed to be bound */
GLuint texid;
glGenTextures(1, &texid);
glBindTexture(GL_TEXTURE_2D, texid);
- glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA16F_ARB, w, h, 0, GL_RGBA, GL_HALF_FLOAT, data_pointer);
+ glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA16F_ARB, w, h, 0, GL_RGBA, GL_HALF_FLOAT, host_pointer);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
@@ -194,7 +194,7 @@ void Device::draw_pixels(device_memory& rgba, int y, int w, int h, int dx, int d
glPixelZoom((float)width/(float)w, (float)height/(float)h);
glRasterPos2f(dx, dy);
- uint8_t *pixels = (uint8_t*)rgba.data_pointer;
+ uint8_t *pixels = (uint8_t*)rgba.host_pointer;
pixels += 4*y*w;