Files
ospray/modules/cpu/fb/SparseFBShared.h
T
Will Usher 078c589aaa Start running OSPRay as DPC++ on the GPU
Use an enum + switch statements to avoid issues/limitations with
function ptrs.

Renable volumes with OpenVKL when running on CPU w/ enable volumes

Put both CPU and GPU modules behind CMake flags

workaround odd bug with AO renderer and intervals

Add spheres geometry and port to use Embree sphere point

Push math constants for RNG to USM instead of in global constant

WA for `Material_dispatch_getTransparency` hang, working path tracer

Re-enable subdivision surfaces for CPU-only

Port Texture2D to use switch statement dispatch

Migrate all materials to switch dispatch

Add option for large grf, does improve performance

Workaround for TextureParam get3f bug

Update headers and APIs for L0 interop header updates/deprecations
2023-01-11 13:07:49 +01:00

52 lines
1.3 KiB
C++

// Copyright 2022 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
#pragma once
#include "FrameBufferShared.h"
#include "TileShared.h"
#ifdef __cplusplus
namespace ispc {
#else
#include "rkcommon/math/vec.ih"
#endif // __cplusplus
// a SparseFrameBuffer stores a subset of the full framebuffer as Tiles
struct SparseFB
{
// superclass that we inherit from
FrameBuffer super;
// Number of tasks being used to render the image in x & y
vec2i numRenderTasks;
// The total number of tiles that the framebuffer is divided into
vec2i totalTiles;
uint32 numTiles;
// Image data for the tiles in this SparseFrameBuffer
Tile *tiles;
// holds accumID per task region, for adaptive accumulation
int32 *taskAccumID;
// holds the accumulated color for each tile, tile's rgba stores the final
// color
vec4f *accumulationBuffer;
// accumulates every other sample, for variance estimation / stopping
vec4f *varianceBuffer;
// holds error per task region, for adaptive accumulation
float *taskRegionError;
#ifdef __cplusplus
SparseFB()
: tiles(nullptr),
taskAccumID(nullptr),
accumulationBuffer(nullptr),
varianceBuffer(nullptr),
taskRegionError(nullptr)
{
super.type = FRAMEBUFFER_TYPE_SPARSE;
}
};
} // namespace ispc
#else
};
#endif // __cplusplus