added deferred shading foreach_tile

This commit is contained in:
Evghenii
2013-11-14 16:49:47 +01:00
parent 83b9cc5c0a
commit 599ada8354
2 changed files with 159 additions and 156 deletions

View File

@@ -191,7 +191,6 @@ IntersectLightsWithTileMinMax(
foreach (lightIndex = 0 ... numLights) foreach (lightIndex = 0 ... numLights)
{ {
float light_positionView_z = light_positionView_z_array[lightIndex]; float light_positionView_z = light_positionView_z_array[lightIndex];
float light_attenuationEnd = light_attenuationEnd_array[lightIndex]; float light_attenuationEnd = light_attenuationEnd_array[lightIndex];
float light_attenuationEndNeg = -light_attenuationEnd; float light_attenuationEndNeg = -light_attenuationEnd;

View File

@@ -116,6 +116,10 @@ void createContext(const int deviceId = 0)
// Create driver context // Create driver context
checkCudaErrors(cuCtxCreate(&context, 0, device)); checkCudaErrors(cuCtxCreate(&context, 0, device));
const size_t stackLimit = 4*1024;
// const size_t heapLimit = 1024*1024*1024;
checkCudaErrors(cuCtxSetLimit(CU_LIMIT_STACK_SIZE,stackLimit));
// checkCudaErrors(cuCtxSetLimit(CU_LIMIT_MALLOC_HEAP_SIZE,heapLimit));
} }
void destroyContext() void destroyContext()
{ {