Cycles / GPU:

* Enable the Non-Progressive integrator on GPU (CUDA) for testing.

In order to compile the CUDA kernel with it, you need at least 6GB of system memory and CUDA Toolkit 5.0 or 5.5.
It should also work with CUDA Toolkit 4.2, but in this case you should have 12GB of RAM. 

In case any problems arise, just change line 65 of kernel_types.h to disable Non-Progressive again. 
-- #define __NON_PROGRESSIVE__
++ //#define __NON_PROGRESSIVE__
This commit is contained in:
Thomas Dinges 2013-06-17 15:56:28 +00:00
parent a841813cd9
commit 9042b599e0
4 changed files with 14 additions and 11 deletions

@ -51,20 +51,17 @@ class CyclesRender_PT_sampling(CyclesButtonsPanel, Panel):
scene = context.scene scene = context.scene
cscene = scene.cycles cscene = scene.cycles
device_type = context.user_preferences.system.compute_device_type
split = layout.split() split = layout.split()
col = split.column() col = split.column()
sub = col.column() col.prop(cscene, "progressive")
sub.active = (device_type == 'NONE' or cscene.device == 'CPU')
sub.prop(cscene, "progressive")
sub = col.column(align=True) sub = col.column(align=True)
sub.prop(cscene, "seed") sub.prop(cscene, "seed")
sub.prop(cscene, "sample_clamp") sub.prop(cscene, "sample_clamp")
if cscene.progressive or (device_type != 'NONE' and cscene.device == 'GPU'): if cscene.progressive:
col = split.column() col = split.column()
col.label(text="Samples:") col.label(text="Samples:")
sub = col.column(align=True) sub = col.column(align=True)
@ -610,7 +607,6 @@ class CyclesLamp_PT_lamp(CyclesButtonsPanel, Panel):
lamp = context.lamp lamp = context.lamp
clamp = lamp.cycles clamp = lamp.cycles
cscene = context.scene.cycles cscene = context.scene.cycles
device_type = context.user_preferences.system.compute_device_type
layout.prop(lamp, "type", expand=True) layout.prop(lamp, "type", expand=True)
@ -629,7 +625,7 @@ class CyclesLamp_PT_lamp(CyclesButtonsPanel, Panel):
sub.prop(lamp, "size", text="Size X") sub.prop(lamp, "size", text="Size X")
sub.prop(lamp, "size_y", text="Size Y") sub.prop(lamp, "size_y", text="Size Y")
if not cscene.progressive and (device_type == 'NONE' or cscene.device == 'CPU'): if not cscene.progressive:
col.prop(clamp, "samples") col.prop(clamp, "samples")
col = split.column() col = split.column()
@ -817,7 +813,6 @@ class CyclesWorld_PT_settings(CyclesButtonsPanel, Panel):
world = context.world world = context.world
cworld = world.cycles cworld = world.cycles
cscene = context.scene.cycles cscene = context.scene.cycles
device_type = context.user_preferences.system.compute_device_type
col = layout.column() col = layout.column()
@ -825,7 +820,7 @@ class CyclesWorld_PT_settings(CyclesButtonsPanel, Panel):
sub = col.row(align=True) sub = col.row(align=True)
sub.active = cworld.sample_as_light sub.active = cworld.sample_as_light
sub.prop(cworld, "sample_map_resolution") sub.prop(cworld, "sample_map_resolution")
if not cscene.progressive and (device_type == 'NONE' or cscene.device == 'CPU'): if not cscene.progressive:
sub.prop(cworld, "samples") sub.prop(cworld, "samples")

@ -385,7 +385,7 @@ SessionParams BlenderSync::get_session_params(BL::RenderEngine b_engine, BL::Use
params.background = background; params.background = background;
/* samples */ /* samples */
if(get_boolean(cscene, "progressive") == 0 && params.device.type == DEVICE_CPU) { if(get_boolean(cscene, "progressive") == 0) {
if(background) { if(background) {
params.samples = get_int(cscene, "aa_samples"); params.samples = get_int(cscene, "aa_samples");
} }

@ -916,8 +916,15 @@ __device void shader_merge_closures(KernelGlobals *kg, ShaderData *sd)
sci->sample_weight += scj->sample_weight; sci->sample_weight += scj->sample_weight;
int size = sd->num_closure - (j+1); int size = sd->num_closure - (j+1);
if(size > 0) if(size > 0) {
#ifdef __KERNEL_GPU__
for(int k = 0; k < size; k++) {
scj[k] = scj[k+1];
}
#else
memmove(scj, scj+1, size*sizeof(ShaderClosure)); memmove(scj, scj+1, size*sizeof(ShaderClosure));
#endif
}
sd->num_closure--; sd->num_closure--;
j--; j--;

@ -62,6 +62,7 @@ CCL_NAMESPACE_BEGIN
#define __KERNEL_SHADING__ #define __KERNEL_SHADING__
#if __CUDA_ARCH__ >= 200 #if __CUDA_ARCH__ >= 200
#define __KERNEL_ADV_SHADING__ #define __KERNEL_ADV_SHADING__
#define __NON_PROGRESSIVE__
#endif #endif
#endif #endif