File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 34043404 for (uint32_t i = 0 ; i < pl_sb_size (ptGarbage->sbtTextures ); i++)
34053405 {
34063406 const uint16_t uTextureIndex = ptGarbage->sbtTextures [i].uIndex ;
3407- if ( uSignaledValue > ptDevice->sbtTexturesCold [uTextureIndex]._uFrameBoundaryValueForDeletion )
3407+ if ( uSignaledValue > ptDevice->sbtTexturesCold [uTextureIndex]._uFrameBoundaryValueForDeletion + 1 )
34083408 {
34093409 plMetalTexture* ptMetalTexture = &ptDevice->sbtTexturesHot [uTextureIndex];
34103410 [ptMetalTexture->tTexture release ];
34183418 for (uint32_t i = 0 ; i < pl_sb_size (ptGarbage->sbtBuffers ); i++)
34193419 {
34203420 const uint16_t iBufferIndex = ptGarbage->sbtBuffers [i].uIndex ;
3421- if ( uSignaledValue > ptDevice->sbtBuffersCold [iBufferIndex]._uFrameBoundaryValueForDeletion )
3421+ if ( uSignaledValue > ptDevice->sbtBuffersCold [iBufferIndex]._uFrameBoundaryValueForDeletion + 1 )
34223422 {
34233423 [ptDevice->sbtBuffersHot[iBufferIndex].tBuffer release ];
34243424 ptDevice->sbtBuffersHot [iBufferIndex].tBuffer = nil ;
34313431
34323432 for (uint32_t i = 0 ; i < pl_sb_size (ptGarbage->sbtMemory ); i++)
34333433 {
3434- if ( uSignaledValue > ptGarbage->sbtMemory [i]._uFrameBoundaryValueForDeletion )
3434+ if ( uSignaledValue > ptGarbage->sbtMemory [i]._uFrameBoundaryValueForDeletion + 1 )
34353435 {
34363436 if (ptGarbage->sbtMemory [i].ptAllocator )
34373437 {
37133713pl_get_metal_bind_group_texture (plDevice* ptDevice, plBindGroupHandle tHandle)
37143714{
37153715 return ptDevice->sbtBindGroupsHot [tHandle.uIndex].tFirstTexture ;
3716- }
3716+ }
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ layout (location=1) in vec2 camPos;
1212layout (location= 0 ) out vec4 fragColor;
1313
1414float
15- log10 (float x)
15+ pl_log10 (float x)
1616{
1717 return log (x) / log (10.0 );
1818}
@@ -43,7 +43,7 @@ gridColor(vec2 uv, vec2 camPos)
4343 length (vec2 (dFdx (uv.y), dFdy (uv.y)))
4444 );
4545
46- float lodLevel = max (0.0 , log10 ((length (dudv) * tObjectInfo.tData.fGridMinPixelsBetweenCells) / tObjectInfo.tData.fGridCellSize) + 1.0 );
46+ float lodLevel = max (0.0 , pl_log10 ((length (dudv) * tObjectInfo.tData.fGridMinPixelsBetweenCells) / tObjectInfo.tData.fGridCellSize) + 1.0 );
4747 float lodFade = fract (lodLevel);
4848
4949 // cell sizes for lod0, lod1 and lod2
You can’t perform that action at this time.
0 commit comments