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
path: root/intern
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2018-02-06 15:06:23 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-02-06 15:06:23 +0300
commit5376c739f5bf4029e0a32946e9945a732feba217 (patch)
treeb3494e69541d22edf5b971106b532e3a2a2577cd /intern
parent98dcd33238e44984d31d96e2ffd0191a5d1cf7b6 (diff)
parent486e2547eea3f12bfde70f2526dde08f39a8722b (diff)
Merge branch 'master' into blender2.8
Diffstat (limited to 'intern')
-rw-r--r--intern/cycles/device/device.h2
-rw-r--r--intern/cycles/device/device_cpu.cpp2
-rw-r--r--intern/cycles/device/device_denoising.cpp2
-rw-r--r--intern/cycles/device/opencl/opencl.h4
-rw-r--r--intern/cycles/device/opencl/opencl_base.cpp4
-rw-r--r--intern/cycles/device/opencl/opencl_util.cpp10
-rw-r--r--intern/cycles/render/object.cpp8
-rw-r--r--intern/cycles/render/object.h8
8 files changed, 20 insertions, 20 deletions
diff --git a/intern/cycles/device/device.h b/intern/cycles/device/device.h
index 721898458fc..be4b9a7e972 100644
--- a/intern/cycles/device/device.h
+++ b/intern/cycles/device/device.h
@@ -301,7 +301,7 @@ public:
Stats &stats;
/* memory alignment */
- virtual int mem_address_alignment() { return MIN_ALIGNMENT_CPU_DATA_TYPES; }
+ virtual int mem_sub_ptr_alignment() { return MIN_ALIGNMENT_CPU_DATA_TYPES; }
/* constant memory */
virtual void const_copy_to(const char *name, void *host, size_t size) = 0;
diff --git a/intern/cycles/device/device_cpu.cpp b/intern/cycles/device/device_cpu.cpp
index fd55ec3687a..6be60f8bbb6 100644
--- a/intern/cycles/device/device_cpu.cpp
+++ b/intern/cycles/device/device_cpu.cpp
@@ -299,7 +299,7 @@ public:
if(mem.type == MEM_DEVICE_ONLY) {
assert(!mem.host_pointer);
- size_t alignment = mem_address_alignment();
+ size_t alignment = MIN_ALIGNMENT_CPU_DATA_TYPES;
void *data = util_aligned_malloc(mem.memory_size(), alignment);
mem.device_pointer = (device_ptr)data;
}
diff --git a/intern/cycles/device/device_denoising.cpp b/intern/cycles/device/device_denoising.cpp
index 1862deb9a61..644cf6cd10e 100644
--- a/intern/cycles/device/device_denoising.cpp
+++ b/intern/cycles/device/device_denoising.cpp
@@ -95,7 +95,7 @@ bool DenoisingTask::run_denoising()
buffer.width = rect.z - rect.x;
buffer.stride = align_up(buffer.width, 4);
buffer.h = rect.w - rect.y;
- buffer.pass_stride = align_up(buffer.stride * buffer.h, divide_up(device->mem_address_alignment(), sizeof(float)));
+ buffer.pass_stride = align_up(buffer.stride * buffer.h, divide_up(device->mem_sub_ptr_alignment(), sizeof(float)));
buffer.mem.alloc_to_device(buffer.pass_stride * buffer.passes, false);
device_ptr null_ptr = (device_ptr) 0;
diff --git a/intern/cycles/device/opencl/opencl.h b/intern/cycles/device/opencl/opencl.h
index f38c2f65c1e..85ef14ee29a 100644
--- a/intern/cycles/device/opencl/opencl.h
+++ b/intern/cycles/device/opencl/opencl.h
@@ -140,7 +140,7 @@ public:
int *minor,
cl_int* error = NULL);
- static int mem_address_alignment(cl_device_id device_id);
+ static int mem_sub_ptr_alignment(cl_device_id device_id);
/* Get somewhat more readable device name.
* Main difference is AMD OpenCL here which only gives code name
@@ -346,7 +346,7 @@ public:
void mem_zero(device_memory& mem);
void mem_free(device_memory& mem);
- int mem_address_alignment();
+ int mem_sub_ptr_alignment();
void const_copy_to(const char *name, void *host, size_t size);
void tex_alloc(device_memory& mem);
diff --git a/intern/cycles/device/opencl/opencl_base.cpp b/intern/cycles/device/opencl/opencl_base.cpp
index 7de78d413ed..bfa2702ad62 100644
--- a/intern/cycles/device/opencl/opencl_base.cpp
+++ b/intern/cycles/device/opencl/opencl_base.cpp
@@ -473,9 +473,9 @@ void OpenCLDeviceBase::mem_free(device_memory& mem)
}
}
-int OpenCLDeviceBase::mem_address_alignment()
+int OpenCLDeviceBase::mem_sub_ptr_alignment()
{
- return OpenCLInfo::mem_address_alignment(cdDevice);
+ return OpenCLInfo::mem_sub_ptr_alignment(cdDevice);
}
device_ptr OpenCLDeviceBase::mem_alloc_sub_ptr(device_memory& mem, int offset, int size)
diff --git a/intern/cycles/device/opencl/opencl_util.cpp b/intern/cycles/device/opencl/opencl_util.cpp
index 7db6fa0c416..a776f48b5e9 100644
--- a/intern/cycles/device/opencl/opencl_util.cpp
+++ b/intern/cycles/device/opencl/opencl_util.cpp
@@ -1136,16 +1136,16 @@ bool OpenCLInfo::get_driver_version(cl_device_id device_id,
return true;
}
-int OpenCLInfo::mem_address_alignment(cl_device_id device_id)
+int OpenCLInfo::mem_sub_ptr_alignment(cl_device_id device_id)
{
- int base_align_bytes;
+ int base_align_bits;
if(clGetDeviceInfo(device_id,
- CL_DEVICE_MIN_DATA_TYPE_ALIGN_SIZE,
+ CL_DEVICE_MEM_BASE_ADDR_ALIGN,
sizeof(int),
- &base_align_bytes,
+ &base_align_bits,
NULL) == CL_SUCCESS)
{
- return base_align_bytes;
+ return base_align_bits/8;
}
return 1;
}
diff --git a/intern/cycles/render/object.cpp b/intern/cycles/render/object.cpp
index 4c06654d756..e03160954bc 100644
--- a/intern/cycles/render/object.cpp
+++ b/intern/cycles/render/object.cpp
@@ -285,7 +285,7 @@ ObjectManager::~ObjectManager()
{
}
-void ObjectManager::device_update_object_transform(UpdateObejctTransformState *state,
+void ObjectManager::device_update_object_transform(UpdateObjectTransformState *state,
Object *ob,
int object_index)
{
@@ -433,7 +433,7 @@ void ObjectManager::device_update_object_transform(UpdateObejctTransformState *s
}
bool ObjectManager::device_update_object_transform_pop_work(
- UpdateObejctTransformState *state,
+ UpdateObjectTransformState *state,
int *start_index,
int *num_objects)
{
@@ -458,7 +458,7 @@ bool ObjectManager::device_update_object_transform_pop_work(
}
void ObjectManager::device_update_object_transform_task(
- UpdateObejctTransformState *state)
+ UpdateObjectTransformState *state)
{
int start_index, num_objects;
while(device_update_object_transform_pop_work(state,
@@ -478,7 +478,7 @@ void ObjectManager::device_update_transforms(DeviceScene *dscene,
uint *object_flag,
Progress& progress)
{
- UpdateObejctTransformState state;
+ UpdateObjectTransformState state;
state.need_motion = scene->need_motion();
state.have_motion = false;
state.have_curves = false;
diff --git a/intern/cycles/render/object.h b/intern/cycles/render/object.h
index 88645bc4a80..acdb1b64123 100644
--- a/intern/cycles/render/object.h
+++ b/intern/cycles/render/object.h
@@ -113,7 +113,7 @@ public:
protected:
/* Global state of object transform update. */
- struct UpdateObejctTransformState {
+ struct UpdateObjectTransformState {
/* Global state used by device_update_object_transform().
* Common for both threaded and non-threaded update.
*/
@@ -152,12 +152,12 @@ protected:
/* First unused object index in the queue. */
int queue_start_object;
};
- void device_update_object_transform(UpdateObejctTransformState *state,
+ void device_update_object_transform(UpdateObjectTransformState *state,
Object *ob,
const int object_index);
- void device_update_object_transform_task(UpdateObejctTransformState *state);
+ void device_update_object_transform_task(UpdateObjectTransformState *state);
bool device_update_object_transform_pop_work(
- UpdateObejctTransformState *state,
+ UpdateObjectTransformState *state,
int *start_index,
int *num_objects);
};