Merge remote-tracking branch 'origin/master' into blender2.8
This commit is contained in:
@@ -154,6 +154,7 @@ ccl_device_forceinline void kernel_path_background(
|
||||
|
||||
#ifndef __SPLIT_KERNEL__
|
||||
|
||||
#ifdef __VOLUME__
|
||||
ccl_device_forceinline VolumeIntegrateResult kernel_path_volume(
|
||||
KernelGlobals *kg,
|
||||
ShaderData *sd,
|
||||
@@ -165,7 +166,6 @@ ccl_device_forceinline VolumeIntegrateResult kernel_path_volume(
|
||||
ShaderData *emission_sd,
|
||||
PathRadiance *L)
|
||||
{
|
||||
#ifdef __VOLUME__
|
||||
/* Sanitize volume stack. */
|
||||
if(!hit) {
|
||||
kernel_volume_clean_stack(kg, state->volume_stack);
|
||||
@@ -252,10 +252,10 @@ ccl_device_forceinline VolumeIntegrateResult kernel_path_volume(
|
||||
# endif /* __VOLUME_SCATTER__ */
|
||||
}
|
||||
}
|
||||
#endif /* __VOLUME__ */
|
||||
|
||||
return VOLUME_PATH_ATTENUATED;
|
||||
}
|
||||
#endif /* __VOLUME__ */
|
||||
|
||||
#endif /* __SPLIT_KERNEL__ */
|
||||
|
||||
@@ -400,6 +400,7 @@ ccl_device void kernel_path_indirect(KernelGlobals *kg,
|
||||
/* Find intersection with lamps and compute emission for MIS. */
|
||||
kernel_path_lamp_emission(kg, state, ray, throughput, &isect, emission_sd, L);
|
||||
|
||||
#ifdef __VOLUME__
|
||||
/* Volume integration. */
|
||||
VolumeIntegrateResult result = kernel_path_volume(kg,
|
||||
sd,
|
||||
@@ -417,6 +418,7 @@ ccl_device void kernel_path_indirect(KernelGlobals *kg,
|
||||
else if(result == VOLUME_PATH_MISSED) {
|
||||
break;
|
||||
}
|
||||
#endif /* __VOLUME__*/
|
||||
|
||||
/* Shade background. */
|
||||
if(!hit) {
|
||||
@@ -558,6 +560,7 @@ ccl_device_forceinline void kernel_path_integrate(
|
||||
/* Find intersection with lamps and compute emission for MIS. */
|
||||
kernel_path_lamp_emission(kg, state, ray, throughput, &isect, emission_sd, L);
|
||||
|
||||
#ifdef __VOLUME__
|
||||
/* Volume integration. */
|
||||
VolumeIntegrateResult result = kernel_path_volume(kg,
|
||||
&sd,
|
||||
@@ -575,6 +578,7 @@ ccl_device_forceinline void kernel_path_integrate(
|
||||
else if(result == VOLUME_PATH_MISSED) {
|
||||
break;
|
||||
}
|
||||
#endif /* __VOLUME__*/
|
||||
|
||||
/* Shade background. */
|
||||
if(!hit) {
|
||||
|
||||
@@ -45,6 +45,7 @@
|
||||
#include "RE_engine.h"
|
||||
#include "RE_pipeline.h"
|
||||
|
||||
#include "ED_render.h"
|
||||
|
||||
/* Deprecated, only provided for API compatibility. */
|
||||
EnumPropertyItem rna_enum_render_pass_type_items[] = {
|
||||
@@ -298,7 +299,7 @@ static void engine_update_render_passes(RenderEngine *engine, struct Scene *scen
|
||||
|
||||
/* RenderEngine registration */
|
||||
|
||||
static void rna_RenderEngine_unregister(Main *UNUSED(bmain), StructRNA *type)
|
||||
static void rna_RenderEngine_unregister(Main *bmain, StructRNA *type)
|
||||
{
|
||||
RenderEngineType *et = RNA_struct_blender_type_get(type);
|
||||
|
||||
@@ -308,6 +309,9 @@ static void rna_RenderEngine_unregister(Main *UNUSED(bmain), StructRNA *type)
|
||||
RNA_struct_free_extension(type, &et->ext);
|
||||
RNA_struct_free(&BLENDER_RNA, type);
|
||||
BLI_freelinkN(&R_engines, et);
|
||||
|
||||
/* Stop all renders in case we were using this one. */
|
||||
ED_render_engine_changed(bmain);
|
||||
}
|
||||
|
||||
static StructRNA *rna_RenderEngine_register(
|
||||
|
||||
@@ -869,25 +869,13 @@ static bool wm_draw_update_test_window(wmWindow *win)
|
||||
|
||||
static int wm_automatic_draw_method(wmWindow *win)
|
||||
{
|
||||
/* Ideally all cards would work well with triple buffer, since if it works
|
||||
* well gives the least redraws and is considerably faster at partial redraw
|
||||
* for sculpting or drawing overlapping menus. For typically lower end cards
|
||||
* copy to texture is slow though and so we use overlap instead there. */
|
||||
|
||||
/* We assume all supported GPUs now support triple buffer well. */
|
||||
if (win->drawmethod == USER_DRAW_AUTOMATIC) {
|
||||
/* Windows software driver darkens color on each redraw */
|
||||
if (GPU_type_matches(GPU_DEVICE_SOFTWARE, GPU_OS_WIN, GPU_DRIVER_SOFTWARE))
|
||||
return USER_DRAW_OVERLAP_FLIP;
|
||||
else if (GPU_type_matches(GPU_DEVICE_SOFTWARE, GPU_OS_UNIX, GPU_DRIVER_SOFTWARE))
|
||||
return USER_DRAW_OVERLAP;
|
||||
/* drawing lower color depth again degrades colors each time */
|
||||
else if (GPU_color_depth() < 24)
|
||||
return USER_DRAW_OVERLAP;
|
||||
else
|
||||
return USER_DRAW_TRIPLE;
|
||||
return USER_DRAW_TRIPLE;
|
||||
}
|
||||
else
|
||||
else {
|
||||
return win->drawmethod;
|
||||
}
|
||||
}
|
||||
|
||||
bool WM_is_draw_triple(wmWindow *win)
|
||||
|
||||
Reference in New Issue
Block a user