#pragma region CPL License
/*
Nuclex Native Framework
Copyright (C) 2002-2013 Nuclex Development Labs
This library is free software; you can redistribute it and/or
modify it under the terms of the IBM Common Public License as
published by the IBM Corporation; either version 1.0 of the
License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
IBM Common Public License for more details.
You should have received a copy of the IBM Common Public
License along with this library
*/
#pragma endregion // CPL License
#ifndef NUCLEX_GRAPHICS_RASTERIZATION_USAGE_H
#define NUCLEX_GRAPHICS_RASTERIZATION_USAGE_H
namespace Nuclex { namespace Graphics { namespace Rasterization {
// ------------------------------------------------------------------------------------------- //
namespace Usage {
/// Indicates how a GPU resource is going to be used
enum Enum {
/// Resource will be filled once and will not change after that
///
/// This is generally the fastest type of resource since it can be aggressively
/// cached and used without synchronization. If the resource changes despite being
/// tagged as immutable, it may incur a hefty performance hit since the rasterizer
/// implementation likely needs to completely discard the original resource and
/// create a new one instead.
///
Immutable = 0,
/// Resource will be filled once but can be changed by the GPU
///
/// The resource will only be initialized by the CPU once, but can be read and written
/// to by the GPU. This kind of resource is often used by advanced rendering techniques
/// that produce intermediate data.
///
GpuChangeable = 1,
/// Resource is a buffer for data transfer from the CPU to the GPU
///
/// A resource that is optimized for writeability by the CPU. If you mass-generate
/// data on the CPU (eg. computational geometry of CPU-calculated particles) that
/// you wish to use on the GPU somehow, this is the usage you should indicate.
///
CpuToGpuTransfer = 2,
/// Resource is a buffer generated by the GPU for CPU consumption
///
/// Only useful for GPU computations and other rare cases, this indicates that
/// the resource is built on the GPU and will be read from by the CPU.
///
GpuToCpuTransfer = 3,
};
} // namespace Modality
// ------------------------------------------------------------------------------------------- //
}}} // namespace Nuclex::Graphics::Rasterization
#endif // NUCLEX_GRAPHICS_RASTERIZATION_USAGE_H