Skip to content

Commit

Permalink
Merge branch 'api-refactor'
Browse files Browse the repository at this point in the history
  • Loading branch information
Trofimm committed Aug 8, 2019
2 parents 09225c1 + 1c4908c commit 0e7478c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion hydra_drv/GPUOCLLayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@ GPUOCLLayer::GPUOCLLayer(int w, int h, int a_flags, int a_deviceId) : Base(w, h,
m_clglSharing = 0;
int clglIsSupported = clglSharingIsSupported(m_globals.device);

cl_int ciErr1;
cl_int ciErr1 = CL_SUCCESS;

if ((a_flags & GPU_RT_NOWINDOW) || (clglIsSupported == 0))
{
Expand Down
1 change: 1 addition & 0 deletions hydra_drv/cbidir.h
Original file line number Diff line number Diff line change
Expand Up @@ -558,6 +558,7 @@ static inline float3 environmentColorExtended(float3 ray_pos, float3 ray_dir, Mi
else
{
envColor = environmentColor(ray_dir, misPrev, flags, a_globals, in_mtlStorage, in_pdfStorage, in_texStorage1);

const uint rayBounce = unpackBounceNum(flags);
unsigned int otherFlags = unpackRayFlags(flags);
const int backTextureId = a_globals->varsI[HRT_SHADOW_MATTE_BACK];
Expand Down
3 changes: 3 additions & 0 deletions hydra_drv/clight.h
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,9 @@ static inline float evalMap2DPdf(const float2 texCoordT, __global const float* i
if (pixelX < 0) pixelX += sizeX;
if (pixelY < 0) pixelY += sizeY;

if (pixelX < 0 || pixelY < 0)
return 1.0f;

const int pixelOffset = pixelY*sizeX + pixelX;
const int maxSize = sizeX*sizeY;
const int offset0 = (pixelOffset + 0 < maxSize) ? pixelOffset + 0 : maxSize - 1;
Expand Down

0 comments on commit 0e7478c

Please sign in to comment.