Merge branch 'blender2.7'
This commit is contained in:
@@ -637,8 +637,7 @@ bool OpenCLDevice::load_kernels(const DeviceRequestedFeatures& requested_feature
|
|||||||
programs.push_back(&program_##kernel_name);
|
programs.push_back(&program_##kernel_name);
|
||||||
|
|
||||||
if (single_program) {
|
if (single_program) {
|
||||||
program_split = OpenCLDevice::OpenCLProgram(
|
program_split = OpenCLDevice::OpenCLProgram(this,
|
||||||
this,
|
|
||||||
"split" ,
|
"split" ,
|
||||||
"kernel_split.cl",
|
"kernel_split.cl",
|
||||||
get_build_options(requested_features));
|
get_build_options(requested_features));
|
||||||
@@ -678,8 +677,7 @@ bool OpenCLDevice::load_kernels(const DeviceRequestedFeatures& requested_feature
|
|||||||
|
|
||||||
/* Quick kernels bundled in a single program to reduce overhead of starting
|
/* Quick kernels bundled in a single program to reduce overhead of starting
|
||||||
* Blender processes. */
|
* Blender processes. */
|
||||||
program_split = OpenCLDevice::OpenCLProgram(
|
program_split = OpenCLDevice::OpenCLProgram(this,
|
||||||
this,
|
|
||||||
"split_bundle" ,
|
"split_bundle" ,
|
||||||
"kernel_split_bundle.cl",
|
"kernel_split_bundle.cl",
|
||||||
get_build_options(requested_features));
|
get_build_options(requested_features));
|
||||||
@@ -1863,8 +1861,7 @@ void OpenCLDevice::release_program_safe(cl_program program)
|
|||||||
|
|
||||||
/* ** Those guys are for workign around some compiler-specific bugs ** */
|
/* ** Those guys are for workign around some compiler-specific bugs ** */
|
||||||
|
|
||||||
cl_program OpenCLDevice::load_cached_kernel(
|
cl_program OpenCLDevice::load_cached_kernel(ustring key,
|
||||||
ustring key,
|
|
||||||
thread_scoped_lock& cache_locker)
|
thread_scoped_lock& cache_locker)
|
||||||
{
|
{
|
||||||
return OpenCLCache::get_program(cpPlatform,
|
return OpenCLCache::get_program(cpPlatform,
|
||||||
@@ -1873,8 +1870,7 @@ cl_program OpenCLDevice::load_cached_kernel(
|
|||||||
cache_locker);
|
cache_locker);
|
||||||
}
|
}
|
||||||
|
|
||||||
void OpenCLDevice::store_cached_kernel(
|
void OpenCLDevice::store_cached_kernel(cl_program program,
|
||||||
cl_program program,
|
|
||||||
ustring key,
|
ustring key,
|
||||||
thread_scoped_lock& cache_locker)
|
thread_scoped_lock& cache_locker)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -30,10 +30,6 @@ __kernel void kernel_ocl_background(
|
|||||||
int x = sx + ccl_global_id(0);
|
int x = sx + ccl_global_id(0);
|
||||||
|
|
||||||
if(x < sx + sw) {
|
if(x < sx + sw) {
|
||||||
#ifdef __NO_BAKING__
|
|
||||||
output[x] = make_float4(0.0f, 0.0f, 0.0f, 0.0f);
|
|
||||||
#else
|
|
||||||
kernel_background_evaluate(kg, input, output, x);
|
kernel_background_evaluate(kg, input, output, x);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,11 +30,7 @@ __kernel void kernel_ocl_displace(
|
|||||||
int x = sx + ccl_global_id(0);
|
int x = sx + ccl_global_id(0);
|
||||||
|
|
||||||
if(x < sx + sw) {
|
if(x < sx + sw) {
|
||||||
#ifdef __NO_BAKING__
|
|
||||||
output[x] = make_float4(0.0f, 0.0f, 0.0f, 0.0f);
|
|
||||||
#else
|
|
||||||
kernel_displace_evaluate(kg, input, output, x);
|
kernel_displace_evaluate(kg, input, output, x);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1318,11 +1318,11 @@ BLI_INLINE void apply_blend_function_byte(
|
|||||||
rt = out;
|
rt = out;
|
||||||
while (y--) {
|
while (y--) {
|
||||||
for (x = xo; x > 0; x--) {
|
for (x = xo; x > 0; x--) {
|
||||||
achannel = rt2[3];
|
achannel = rt1[3];
|
||||||
rt2[3] = (unsigned int) achannel * facf0;
|
rt1[3] = (unsigned int) achannel * facf0;
|
||||||
blend_function(rt, rt1, rt2);
|
blend_function(rt, rt1, rt2);
|
||||||
rt2[3] = achannel;
|
rt1[3] = achannel;
|
||||||
rt[3] = rt2[3];
|
rt[3] = rt1[3];
|
||||||
rt1 += 4;
|
rt1 += 4;
|
||||||
rt2 += 4;
|
rt2 += 4;
|
||||||
rt += 4;
|
rt += 4;
|
||||||
@@ -1332,11 +1332,11 @@ BLI_INLINE void apply_blend_function_byte(
|
|||||||
}
|
}
|
||||||
y--;
|
y--;
|
||||||
for (x = xo; x > 0; x--) {
|
for (x = xo; x > 0; x--) {
|
||||||
achannel = rt2[3];
|
achannel = rt1[3];
|
||||||
rt2[3] = (unsigned int) achannel * facf1;
|
rt1[3] = (unsigned int) achannel * facf1;
|
||||||
blend_function(rt, rt1, rt2);
|
blend_function(rt, rt1, rt2);
|
||||||
rt2[3] = achannel;
|
rt1[3] = achannel;
|
||||||
rt[3] = rt2[3];
|
rt[3] = rt1[3];
|
||||||
rt1 += 4;
|
rt1 += 4;
|
||||||
rt2 += 4;
|
rt2 += 4;
|
||||||
rt += 4;
|
rt += 4;
|
||||||
@@ -1357,11 +1357,11 @@ BLI_INLINE void apply_blend_function_float(
|
|||||||
rt = out;
|
rt = out;
|
||||||
while (y--) {
|
while (y--) {
|
||||||
for (x = xo; x > 0; x--) {
|
for (x = xo; x > 0; x--) {
|
||||||
achannel = rt2[3];
|
achannel = rt1[3];
|
||||||
rt2[3] = achannel * facf0;
|
rt1[3] = achannel * facf0;
|
||||||
blend_function(rt, rt1, rt2);
|
blend_function(rt, rt1, rt2);
|
||||||
rt2[3] = achannel;
|
rt1[3] = achannel;
|
||||||
rt[3] = rt2[3];
|
rt[3] = rt1[3];
|
||||||
rt1 += 4;
|
rt1 += 4;
|
||||||
rt2 += 4;
|
rt2 += 4;
|
||||||
rt += 4;
|
rt += 4;
|
||||||
@@ -1371,11 +1371,11 @@ BLI_INLINE void apply_blend_function_float(
|
|||||||
}
|
}
|
||||||
y--;
|
y--;
|
||||||
for (x = xo; x > 0; x--) {
|
for (x = xo; x > 0; x--) {
|
||||||
achannel = rt2[3];
|
achannel = rt1[3];
|
||||||
rt2[3] = achannel * facf1;
|
rt1[3] = achannel * facf1;
|
||||||
blend_function(rt, rt1, rt2);
|
blend_function(rt, rt1, rt2);
|
||||||
rt2[3] = achannel;
|
rt1[3] = achannel;
|
||||||
rt[3] = rt2[3];
|
rt[3] = rt1[3];
|
||||||
rt1 += 4;
|
rt1 += 4;
|
||||||
rt2 += 4;
|
rt2 += 4;
|
||||||
rt += 4;
|
rt += 4;
|
||||||
|
|||||||
@@ -2086,6 +2086,8 @@ bool RE_WriteRenderViewsImage(ReportList *reports, RenderResult *rr, Scene *scen
|
|||||||
|
|
||||||
ImBuf *ibuf = render_result_rect_to_ibuf(rr, rd, view_id);
|
ImBuf *ibuf = render_result_rect_to_ibuf(rr, rd, view_id);
|
||||||
ibuf->planes = 24;
|
ibuf->planes = 24;
|
||||||
|
IMB_colormanagement_imbuf_for_write(ibuf, true, false, &scene->view_settings,
|
||||||
|
&scene->display_settings, &imf);
|
||||||
|
|
||||||
ok = render_imbuf_write_stamp_test(reports, scene, rr, ibuf, name, &imf, stamp);
|
ok = render_imbuf_write_stamp_test(reports, scene, rr, ibuf, name, &imf, stamp);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user