Cycles: another fix for CUDA render passes, needed to align float4 passes.
This commit is contained in:
@@ -106,11 +106,6 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
static int cuda_align_up(int& offset, int alignment)
|
||||
{
|
||||
return (offset + alignment - 1) & ~(alignment - 1);
|
||||
}
|
||||
|
||||
#ifdef NDEBUG
|
||||
#define cuda_abort()
|
||||
#else
|
||||
@@ -485,7 +480,7 @@ public:
|
||||
offset += sizeof(d_rng_state);
|
||||
|
||||
int sample = task.sample;
|
||||
offset = cuda_align_up(offset, __alignof(sample));
|
||||
offset = align_up(offset, __alignof(sample));
|
||||
|
||||
cuda_assert(cuParamSeti(cuPathTrace, offset, task.sample))
|
||||
offset += sizeof(task.sample);
|
||||
@@ -549,7 +544,7 @@ public:
|
||||
offset += sizeof(d_buffer);
|
||||
|
||||
int sample = task.sample;
|
||||
offset = cuda_align_up(offset, __alignof(sample));
|
||||
offset = align_up(offset, __alignof(sample));
|
||||
|
||||
cuda_assert(cuParamSeti(cuFilmConvert, offset, task.sample))
|
||||
offset += sizeof(task.sample);
|
||||
@@ -618,7 +613,7 @@ public:
|
||||
offset += sizeof(d_offset);
|
||||
|
||||
int shader_eval_type = task.shader_eval_type;
|
||||
offset = cuda_align_up(offset, __alignof(shader_eval_type));
|
||||
offset = align_up(offset, __alignof(shader_eval_type));
|
||||
|
||||
cuda_assert(cuParamSeti(cuDisplace, offset, task.shader_eval_type))
|
||||
offset += sizeof(task.shader_eval_type);
|
||||
|
Reference in New Issue
Block a user