Trimmed trailing whitespace
This commit is contained in:
Родитель
dcbb278aaa
Коммит
19d9d7971e
|
@ -416,8 +416,8 @@ HRESULT AudioEngine::Impl::Reset(const WAVEFORMATEX* wfx, const wchar_t* deviceI
|
|||
// To see the trace output, you need to view ETW logs for this application:
|
||||
// Go to Control Panel, Administrative Tools, Event Viewer.
|
||||
// View->Show Analytic and Debug Logs.
|
||||
// Applications and Services Logs / Microsoft / Windows / XAudio2.
|
||||
// Right click on Microsoft Windows XAudio2 debug logging, Properties, then Enable Logging, and hit OK
|
||||
// Applications and Services Logs / Microsoft / Windows / XAudio2.
|
||||
// Right click on Microsoft Windows XAudio2 debug logging, Properties, then Enable Logging, and hit OK
|
||||
DebugTrace("INFO: XAudio 2.8 debugging enabled\n");
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -697,4 +697,3 @@ HRESULT DirectX::LoadWAVAudioFromFileEx(
|
|||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ namespace DirectX
|
|||
static const D3D12_BLEND_DESC AlphaBlend;
|
||||
static const D3D12_BLEND_DESC Additive;
|
||||
static const D3D12_BLEND_DESC NonPremultiplied;
|
||||
|
||||
|
||||
// Depth stencil states.
|
||||
static const D3D12_DEPTH_STENCIL_DESC DepthNone;
|
||||
static const D3D12_DEPTH_STENCIL_DESC DepthDefault;
|
||||
|
|
|
@ -239,7 +239,7 @@ namespace DirectX
|
|||
|
||||
VertexPositionNormalColor(VertexPositionNormalColor&&) = default;
|
||||
VertexPositionNormalColor& operator=(VertexPositionNormalColor&&) = default;
|
||||
|
||||
|
||||
VertexPositionNormalColor(XMFLOAT3 const& iposition, XMFLOAT3 const& inormal, XMFLOAT4 const& icolor) noexcept
|
||||
: position(iposition),
|
||||
normal(inormal),
|
||||
|
|
|
@ -61,7 +61,7 @@ public:
|
|||
|
||||
D3D12_GPU_DESCRIPTOR_HANDLE texture;
|
||||
D3D12_GPU_DESCRIPTOR_HANDLE textureSampler;
|
||||
|
||||
|
||||
int GetPipelineStatePermutation(uint32_t effectFlags) const noexcept;
|
||||
|
||||
void Apply(_In_ ID3D12GraphicsCommandList* commandList);
|
||||
|
@ -132,7 +132,7 @@ const int EffectBase<AlphaTestEffectTraits>::VertexShaderIndices[] =
|
|||
1, // lt/gt, no fog
|
||||
2, // lt/gt, vertex color
|
||||
3, // lt/gt, vertex color, no fog
|
||||
|
||||
|
||||
0, // eq/ne
|
||||
1, // eq/ne, no fog
|
||||
2, // eq/ne, vertex color
|
||||
|
@ -157,7 +157,7 @@ const int EffectBase<AlphaTestEffectTraits>::PixelShaderIndices[] =
|
|||
1, // lt/gt, no fog
|
||||
0, // lt/gt, vertex color
|
||||
1, // lt/gt, vertex color, no fog
|
||||
|
||||
|
||||
2, // eq/ne
|
||||
3, // eq/ne, no fog
|
||||
2, // eq/ne, vertex color
|
||||
|
@ -283,7 +283,7 @@ void AlphaTestEffect::Impl::Apply(_In_ ID3D12GraphicsCommandList* commandList)
|
|||
{
|
||||
// Compute derived parameter values.
|
||||
matrices.SetConstants(dirtyFlags, constants.worldViewProj);
|
||||
fog.SetConstants(dirtyFlags, matrices.worldView, constants.fogVector);
|
||||
fog.SetConstants(dirtyFlags, matrices.worldView, constants.fogVector);
|
||||
color.SetConstants(dirtyFlags, constants.diffuseColor);
|
||||
|
||||
UpdateConstants();
|
||||
|
@ -293,7 +293,7 @@ void AlphaTestEffect::Impl::Apply(_In_ ID3D12GraphicsCommandList* commandList)
|
|||
{
|
||||
// Convert reference alpha from 8 bit integer to 0-1 float format.
|
||||
auto reference = static_cast<float>(referenceAlpha) / 255.0f;
|
||||
|
||||
|
||||
// Comparison tolerance of half the 8 bit integer precision.
|
||||
const float threshold = 0.5f / 255.0f;
|
||||
|
||||
|
@ -362,7 +362,7 @@ void AlphaTestEffect::Impl::Apply(_In_ ID3D12GraphicsCommandList* commandList)
|
|||
|
||||
// x = compareTo, y = threshold, zw = resultSelector.
|
||||
constants.alphaTest = XMVectorPermute<0, 1, 4, 5>(XMVectorSet(compareTo, threshold, 0, 0), resultSelector);
|
||||
|
||||
|
||||
dirtyFlags &= ~EffectDirtyFlags::AlphaTest;
|
||||
dirtyFlags |= EffectDirtyFlags::ConstantBuffer;
|
||||
}
|
||||
|
|
|
@ -676,7 +676,7 @@ void BasicEffect::DisableSpecular()
|
|||
// Set specular color to black, power to 1
|
||||
// Note: Don't use a power of 0 or the shader will generate strange highlights on non-specular materials
|
||||
|
||||
pImpl->constants.specularColorAndPower = g_XMIdentityR3;
|
||||
pImpl->constants.specularColorAndPower = g_XMIdentityR3;
|
||||
|
||||
pImpl->dirtyFlags |= EffectDirtyFlags::ConstantBuffer;
|
||||
}
|
||||
|
|
|
@ -232,7 +232,7 @@ BasicPostProcess::Impl::Impl(_In_ ID3D12Device* device, const RenderTargetState&
|
|||
{
|
||||
if (ifx >= Effect_Max)
|
||||
throw std::invalid_argument("Effect not defined");
|
||||
|
||||
|
||||
switch (ifx)
|
||||
{
|
||||
case Copy:
|
||||
|
|
|
@ -29,7 +29,7 @@ namespace DirectX
|
|||
|
||||
BinaryReader(BinaryReader const&) = delete;
|
||||
BinaryReader& operator= (BinaryReader const&) = delete;
|
||||
|
||||
|
||||
// Reads a single value.
|
||||
template<typename T> T const& Read()
|
||||
{
|
||||
|
|
|
@ -113,7 +113,7 @@ namespace
|
|||
#include "XboxOneDebugEffect_PSRGBNormals.inc"
|
||||
#include "XboxOneDebugEffect_PSRGBTangents.inc"
|
||||
#include "XboxOneDebugEffect_PSRGBBiTangents.inc"
|
||||
#else
|
||||
#else
|
||||
#include "DebugEffect_VSDebug.inc"
|
||||
#include "DebugEffect_VSDebugInst.inc"
|
||||
|
||||
|
@ -136,7 +136,7 @@ namespace
|
|||
|
||||
template<>
|
||||
const D3D12_SHADER_BYTECODE EffectBase<DebugEffectTraits>::VertexShaderBytecode[] =
|
||||
{
|
||||
{
|
||||
{ DebugEffect_VSDebug, sizeof(DebugEffect_VSDebug) },
|
||||
{ DebugEffect_VSDebugVc, sizeof(DebugEffect_VSDebugVc) },
|
||||
{ DebugEffect_VSDebugBn, sizeof(DebugEffect_VSDebugBn) },
|
||||
|
|
|
@ -177,7 +177,7 @@ DualPostProcess::Impl::Impl(_In_ ID3D12Device* device, const RenderTargetState&
|
|||
{
|
||||
if (ifx >= Effect_Max)
|
||||
throw std::invalid_argument("Effect not defined");
|
||||
|
||||
|
||||
// Create root signature.
|
||||
{
|
||||
D3D12_ROOT_SIGNATURE_FLAGS rootSignatureFlags =
|
||||
|
|
|
@ -44,7 +44,7 @@ class DualTextureEffect::Impl : public EffectBase<DualTextureEffectTraits>
|
|||
{
|
||||
public:
|
||||
Impl(_In_ ID3D12Device* device, uint32_t effectFlags, const EffectPipelineStateDescription& pipelineDescription);
|
||||
|
||||
|
||||
enum RootParameterIndex
|
||||
{
|
||||
Texture1SRV,
|
||||
|
|
|
@ -44,7 +44,7 @@ _Use_decl_annotations_ void EffectMatrices::SetConstants(int& dirtyFlags, XMMATR
|
|||
worldView = XMMatrixMultiply(world, view);
|
||||
|
||||
worldViewProjConstant = XMMatrixTranspose(XMMatrixMultiply(worldView, projection));
|
||||
|
||||
|
||||
dirtyFlags &= ~EffectDirtyFlags::WorldViewProj;
|
||||
dirtyFlags |= EffectDirtyFlags::ConstantBuffer;
|
||||
}
|
||||
|
@ -81,7 +81,7 @@ void XM_CALLCONV EffectFog::SetConstants(int& dirtyFlags, FXMMATRIX worldView, X
|
|||
// Z value, then scale and offset according to the fog start/end distances.
|
||||
// Because we only care about the Z component, the shader can do all this
|
||||
// with a single dot product, using only the Z row of the world+view matrix.
|
||||
|
||||
|
||||
// _13, _23, _33, _43
|
||||
XMVECTOR worldViewZ = XMVectorMergeXY(XMVectorMergeZW(worldView.r[0], worldView.r[2]),
|
||||
XMVectorMergeZW(worldView.r[1], worldView.r[3]));
|
||||
|
@ -161,7 +161,7 @@ _Use_decl_annotations_ void EffectLights::InitializeConstants(XMVECTOR& specular
|
|||
{
|
||||
static const XMVECTORF32 defaultSpecular = { { { 1, 1, 1, 16 } } };
|
||||
static const XMVECTORF32 defaultLightDirection = { { { 0, -1, 0, 0 } } };
|
||||
|
||||
|
||||
specularColorAndPowerConstant = defaultSpecular;
|
||||
|
||||
for (int i = 0; i < MaxDirectionalLights; i++)
|
||||
|
@ -203,7 +203,7 @@ void EffectLights::SetConstants(int& dirtyFlags, EffectMatrices const& matrices,
|
|||
if (dirtyFlags & EffectDirtyFlags::EyePosition)
|
||||
{
|
||||
XMMATRIX viewInverse = XMMatrixInverse(nullptr, matrices.view);
|
||||
|
||||
|
||||
eyePositionConstant = viewInverse.r[3];
|
||||
|
||||
dirtyFlags &= ~EffectDirtyFlags::EyePosition;
|
||||
|
@ -303,7 +303,7 @@ int XM_CALLCONV EffectLights::SetLightDiffuseColor(int whichLight, FXMVECTOR val
|
|||
if (lightEnabled[whichLight])
|
||||
{
|
||||
lightDiffuseConstant[whichLight] = value;
|
||||
|
||||
|
||||
return EffectDirtyFlags::ConstantBuffer;
|
||||
}
|
||||
|
||||
|
@ -327,7 +327,7 @@ int XM_CALLCONV EffectLights::SetLightSpecularColor(int whichLight, FXMVECTOR va
|
|||
|
||||
return EffectDirtyFlags::ConstantBuffer;
|
||||
}
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -527,10 +527,10 @@ EffectFactory::~EffectFactory() = default;
|
|||
|
||||
|
||||
std::shared_ptr<IEffect> EffectFactory::CreateEffect(
|
||||
const EffectInfo& info,
|
||||
const EffectInfo& info,
|
||||
const EffectPipelineStateDescription& opaquePipelineState,
|
||||
const EffectPipelineStateDescription& alphaPipelineState,
|
||||
const D3D12_INPUT_LAYOUT_DESC& inputLayout,
|
||||
const D3D12_INPUT_LAYOUT_DESC& inputLayout,
|
||||
int textureDescriptorOffset,
|
||||
int samplerDescriptorOffset)
|
||||
{
|
||||
|
|
|
@ -101,7 +101,7 @@ void EffectPipelineStateDescription::CreatePipelineState(
|
|||
IID_GRAPHICS_PPV_ARGS(pPipelineState));
|
||||
|
||||
if (FAILED(hr))
|
||||
{
|
||||
{
|
||||
DebugTrace("ERROR: CreatePipelineState failed to create a PSO. Enable the Direct3D Debug Layer for more information (%08X)\n", static_cast<unsigned int>(hr));
|
||||
throw std::runtime_error("CreateGraphicsPipelineState");
|
||||
}
|
||||
|
|
|
@ -511,7 +511,7 @@ void EnvironmentMapEffect::Impl::Apply(_In_ ID3D12GraphicsCommandList* commandLi
|
|||
matrices.SetConstants(dirtyFlags, constants.worldViewProj);
|
||||
|
||||
fog.SetConstants(dirtyFlags, matrices.worldView, constants.fogVector);
|
||||
|
||||
|
||||
lights.SetConstants(dirtyFlags, matrices, constants.world, constants.worldInverseTranspose, constants.eyePosition, constants.diffuseColor, constants.emissiveColor, true);
|
||||
|
||||
UpdateConstants();
|
||||
|
|
|
@ -41,7 +41,7 @@ public:
|
|||
D3D12_RESOURCE_STATES stateAfterIB);
|
||||
|
||||
void DrawInstanced(_In_ ID3D12GraphicsCommandList* commandList, uint32_t instanceCount, uint32_t startInstanceLocation) const;
|
||||
|
||||
|
||||
UINT mIndexCount;
|
||||
SharedGraphicsResource mIndexBuffer;
|
||||
SharedGraphicsResource mVertexBuffer;
|
||||
|
@ -468,7 +468,7 @@ void GeometricPrimitive::CreateCone(
|
|||
VertexCollection& vertices,
|
||||
IndexCollection& indices,
|
||||
float diameter,
|
||||
float height,
|
||||
float height,
|
||||
size_t tessellation,
|
||||
bool rhcoords)
|
||||
{
|
||||
|
@ -487,7 +487,7 @@ std::unique_ptr<GeometricPrimitive> GeometricPrimitive::CreateTorus(
|
|||
size_t tessellation,
|
||||
bool rhcoords,
|
||||
_In_opt_ ID3D12Device* device)
|
||||
{
|
||||
{
|
||||
// Create the primitive object.
|
||||
std::unique_ptr<GeometricPrimitive> primitive(new GeometricPrimitive());
|
||||
|
||||
|
|
|
@ -394,7 +394,7 @@ void DirectX::ComputeGeoSphere(VertexCollection& vertices, IndexCollection& indi
|
|||
// occurs across that triangle. Eg. when the left hand side of the triangle has a U coordinate of 0.98 and the
|
||||
// right hand side has a U coordinate of 0.0. The intent is that such a triangle should render with a U of 0.98 to
|
||||
// 1.0, not 0.98 to 0.0. If we don't do this fixup, there will be a visible seam across one side of the sphere.
|
||||
//
|
||||
//
|
||||
// Luckily this is relatively easy to fix. There is a straight edge which runs down the prime meridian of the
|
||||
// completed sphere. If you imagine the vertices along that edge, they circumscribe a semicircular arc starting at
|
||||
// y=1 and ending at y=-1, and sweeping across the range of z=0 to z=1. x stays zero. It's along this edge that we
|
||||
|
|
|
@ -49,7 +49,7 @@ size_t LinearAllocatorPage::Suballocate(_In_ size_t size, _In_ size_t alignment)
|
|||
|
||||
void LinearAllocatorPage::Release() noexcept
|
||||
{
|
||||
assert(mRefCount > 0);
|
||||
assert(mRefCount > 0);
|
||||
|
||||
if (mRefCount.fetch_sub(1) == 1)
|
||||
{
|
||||
|
@ -496,4 +496,3 @@ void LinearAllocator::SetPageDebugName(LinearAllocatorPage* list) noexcept
|
|||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -2,31 +2,31 @@
|
|||
// LinearAllocator.h
|
||||
//
|
||||
// A linear allocator. When Allocate is called it will try to return you a pointer into
|
||||
// existing graphics memory. If there is no space left from what is allocated, more
|
||||
// existing graphics memory. If there is no space left from what is allocated, more
|
||||
// pages are allocated on-the-fly.
|
||||
//
|
||||
// Each allocation must be smaller or equal to pageSize. It is not necessary but is most
|
||||
// efficient for the sizes to be some fraction of pageSize. pageSize does not determine
|
||||
// efficient for the sizes to be some fraction of pageSize. pageSize does not determine
|
||||
// the size of the physical pages underneath the virtual memory (that's given by the
|
||||
// XMemAttributes) but is how much additional memory the allocator should allocate
|
||||
// XMemAttributes) but is how much additional memory the allocator should allocate
|
||||
// each time you run out of space.
|
||||
//
|
||||
// preallocatePages specifies how many pages to initially allocate. Specifying zero will
|
||||
// preallocatePages specifies how many pages to initially allocate. Specifying zero will
|
||||
// preallocate two pages by default.
|
||||
//
|
||||
// This class is NOT thread safe. You should protect this with the appropriate sync
|
||||
// primitives or, even better, use one linear allocator per thread.
|
||||
//
|
||||
// Pages are freed once the GPU is done with them. As such, you need to specify when a
|
||||
// page is in use and when it is no longer in use. Use RetirePages to prompt the
|
||||
// Pages are freed once the GPU is done with them. As such, you need to specify when a
|
||||
// page is in use and when it is no longer in use. Use RetirePages to prompt the
|
||||
// allocator to check if pages are no longer being used by the GPU. Use InsertFences to
|
||||
// mark all used pages as in-use by the GPU, removing them from the available pages
|
||||
// mark all used pages as in-use by the GPU, removing them from the available pages
|
||||
// list. It is recommended you call RetirePages and InsertFences once a frame, usually
|
||||
// just before Present().
|
||||
//
|
||||
// Why is RetirePages decoupled from InsertFences? It's possible that you might want to
|
||||
// reclaim pages more frequently than locking used pages. For example, if you find the
|
||||
// allocator is burning through pages too quickly you can call RetirePages to reclaim
|
||||
// Why is RetirePages decoupled from InsertFences? It's possible that you might want to
|
||||
// reclaim pages more frequently than locking used pages. For example, if you find the
|
||||
// allocator is burning through pages too quickly you can call RetirePages to reclaim
|
||||
// some that the GPU has finished with. However, this adds additional CPU overhead so it
|
||||
// is left to you to decide. In most cases this is sufficient:
|
||||
//
|
||||
|
@ -89,7 +89,7 @@ namespace DirectX
|
|||
|
||||
class LinearAllocator
|
||||
{
|
||||
public:
|
||||
public:
|
||||
// These values will be rounded up to the nearest 64k.
|
||||
// You can specify zero for incrementalSizeBytes to increment
|
||||
// by 1 page (64k).
|
||||
|
@ -142,7 +142,7 @@ namespace DirectX
|
|||
uint64_t m_fenceCount;
|
||||
Microsoft::WRL::ComPtr<ID3D12Device> m_device;
|
||||
Microsoft::WRL::ComPtr<ID3D12Fence> m_fence;
|
||||
|
||||
|
||||
LinearAllocatorPage* GetPageForAlloc(size_t sizeBytes, size_t alignment);
|
||||
LinearAllocatorPage* GetCleanPageForAlloc();
|
||||
|
||||
|
|
|
@ -202,7 +202,7 @@ namespace
|
|||
#include "XboxOneNormalMapEffect_PSNormalPixelLightingTxNoFog.inc"
|
||||
#include "XboxOneNormalMapEffect_PSNormalPixelLightingTxNoSpec.inc"
|
||||
#include "XboxOneNormalMapEffect_PSNormalPixelLightingTxNoFogSpec.inc"
|
||||
#else
|
||||
#else
|
||||
#include "NormalMapEffect_VSNormalPixelLightingTx.inc"
|
||||
#include "NormalMapEffect_VSNormalPixelLightingTxVc.inc"
|
||||
#include "NormalMapEffect_VSNormalPixelLightingTxNoSpec.inc"
|
||||
|
@ -719,7 +719,7 @@ void NormalMapEffect::DisableSpecular()
|
|||
// Set specular color to black, power to 1
|
||||
// Note: Don't use a power of 0 or the shader will generate strange highlights on non-specular materials
|
||||
|
||||
pImpl->constants.specularColorAndPower = g_XMIdentityR3;
|
||||
pImpl->constants.specularColorAndPower = g_XMIdentityR3;
|
||||
|
||||
pImpl->dirtyFlags |= EffectDirtyFlags::ConstantBuffer;
|
||||
}
|
||||
|
|
|
@ -286,10 +286,10 @@ PBREffectFactory::~PBREffectFactory() = default;
|
|||
|
||||
|
||||
std::shared_ptr<IEffect> PBREffectFactory::CreateEffect(
|
||||
const EffectInfo& info,
|
||||
const EffectInfo& info,
|
||||
const EffectPipelineStateDescription& opaquePipelineState,
|
||||
const EffectPipelineStateDescription& alphaPipelineState,
|
||||
const D3D12_INPUT_LAYOUT_DESC& inputLayout,
|
||||
const D3D12_INPUT_LAYOUT_DESC& inputLayout,
|
||||
int textureDescriptorOffset,
|
||||
int samplerDescriptorOffset)
|
||||
{
|
||||
|
|
|
@ -417,7 +417,7 @@ public:
|
|||
|
||||
if (desc.MipLevels == 1)
|
||||
{
|
||||
// Nothing to do
|
||||
// Nothing to do
|
||||
return;
|
||||
}
|
||||
if (desc.MipLevels == 0)
|
||||
|
@ -447,7 +447,7 @@ public:
|
|||
}
|
||||
|
||||
// If the texture's format doesn't support UAVs we'll have to copy it to a texture that does first.
|
||||
// This is true of BGRA or sRGB textures, for example.
|
||||
// This is true of BGRA or sRGB textures, for example.
|
||||
if (uavCompat)
|
||||
{
|
||||
GenerateMips_UnorderedAccessPath(resource);
|
||||
|
@ -813,7 +813,7 @@ private:
|
|||
mTrackedObjects.push_back(resource);
|
||||
mTrackedObjects.push_back(descriptorHeap);
|
||||
}
|
||||
|
||||
|
||||
// Resource is not UAV compatible
|
||||
void GenerateMips_TexturePath(
|
||||
_In_ ID3D12Resource* resource)
|
||||
|
@ -851,7 +851,7 @@ private:
|
|||
mList->CopyTextureRegion(&dst, 0, 0, 0, &src, nullptr);
|
||||
|
||||
TransitionResource(mList.Get(), resourceCopy.Get(), D3D12_RESOURCE_STATE_COPY_DEST, originalState);
|
||||
|
||||
|
||||
// Generate the mips
|
||||
GenerateMips_UnorderedAccessPath(resourceCopy.Get());
|
||||
|
||||
|
|
|
@ -310,7 +310,7 @@ void SkinnedEffect::Impl::Apply(_In_ ID3D12GraphicsCommandList* commandList)
|
|||
// **NOTE** If D3D asserts or crashes here, you probably need to call commandList->SetDescriptorHeaps() with the required descriptor heaps.
|
||||
commandList->SetGraphicsRootDescriptorTable(RootParameterIndex::TextureSRV, texture);
|
||||
commandList->SetGraphicsRootDescriptorTable(RootParameterIndex::TextureSampler, sampler);
|
||||
|
||||
|
||||
// Set constants
|
||||
commandList->SetGraphicsRootConstantBufferView(RootParameterIndex::ConstantBuffer, GetConstantBufferGpuAddress());
|
||||
|
||||
|
@ -416,7 +416,7 @@ void SkinnedEffect::DisableSpecular()
|
|||
// Set specular color to black, power to 1
|
||||
// Note: Don't use a power of 0 or the shader will generate strange highlights on non-specular materials
|
||||
|
||||
pImpl->constants.specularColorAndPower = g_XMIdentityR3;
|
||||
pImpl->constants.specularColorAndPower = g_XMIdentityR3;
|
||||
|
||||
pImpl->dirtyFlags |= EffectDirtyFlags::ConstantBuffer;
|
||||
}
|
||||
|
|
|
@ -50,7 +50,7 @@ const TeapotPatch TeapotPatches[] =
|
|||
|
||||
|
||||
// Static array defines the control point positions that make up the teapot.
|
||||
const DirectX::XMVECTORF32 TeapotControlPoints[] =
|
||||
const DirectX::XMVECTORF32 TeapotControlPoints[] =
|
||||
{
|
||||
{ { { 0, 0.345f, -0.05f, 0 } } },
|
||||
{ { { -0.028f, 0.345f, -0.05f, 0 } } },
|
||||
|
|
|
@ -330,7 +330,7 @@ ToneMapPostProcess::Impl::Impl(_In_ ID3D12Device* device, const RenderTargetStat
|
|||
0.f,
|
||||
D3D12_FLOAT32_MAX,
|
||||
D3D12_SHADER_VISIBILITY_PIXEL);
|
||||
|
||||
|
||||
CD3DX12_ROOT_PARAMETER rootParameters[RootParameterIndex::RootParameterCount] = {};
|
||||
|
||||
CD3DX12_DESCRIPTOR_RANGE texture1Range(D3D12_DESCRIPTOR_RANGE_TYPE_SRV, 1, 0);
|
||||
|
|
|
@ -86,25 +86,25 @@ namespace
|
|||
|
||||
{ GUID_WICPixelFormatBlackWhite, GUID_WICPixelFormat8bppGray }, // DXGI_FORMAT_R8_UNORM
|
||||
|
||||
{ GUID_WICPixelFormat1bppIndexed, GUID_WICPixelFormat32bppRGBA }, // DXGI_FORMAT_R8G8B8A8_UNORM
|
||||
{ GUID_WICPixelFormat2bppIndexed, GUID_WICPixelFormat32bppRGBA }, // DXGI_FORMAT_R8G8B8A8_UNORM
|
||||
{ GUID_WICPixelFormat4bppIndexed, GUID_WICPixelFormat32bppRGBA }, // DXGI_FORMAT_R8G8B8A8_UNORM
|
||||
{ GUID_WICPixelFormat8bppIndexed, GUID_WICPixelFormat32bppRGBA }, // DXGI_FORMAT_R8G8B8A8_UNORM
|
||||
{ GUID_WICPixelFormat1bppIndexed, GUID_WICPixelFormat32bppRGBA }, // DXGI_FORMAT_R8G8B8A8_UNORM
|
||||
{ GUID_WICPixelFormat2bppIndexed, GUID_WICPixelFormat32bppRGBA }, // DXGI_FORMAT_R8G8B8A8_UNORM
|
||||
{ GUID_WICPixelFormat4bppIndexed, GUID_WICPixelFormat32bppRGBA }, // DXGI_FORMAT_R8G8B8A8_UNORM
|
||||
{ GUID_WICPixelFormat8bppIndexed, GUID_WICPixelFormat32bppRGBA }, // DXGI_FORMAT_R8G8B8A8_UNORM
|
||||
|
||||
{ GUID_WICPixelFormat2bppGray, GUID_WICPixelFormat8bppGray }, // DXGI_FORMAT_R8_UNORM
|
||||
{ GUID_WICPixelFormat4bppGray, GUID_WICPixelFormat8bppGray }, // DXGI_FORMAT_R8_UNORM
|
||||
{ GUID_WICPixelFormat2bppGray, GUID_WICPixelFormat8bppGray }, // DXGI_FORMAT_R8_UNORM
|
||||
{ GUID_WICPixelFormat4bppGray, GUID_WICPixelFormat8bppGray }, // DXGI_FORMAT_R8_UNORM
|
||||
|
||||
{ GUID_WICPixelFormat16bppGrayFixedPoint, GUID_WICPixelFormat16bppGrayHalf }, // DXGI_FORMAT_R16_FLOAT
|
||||
{ GUID_WICPixelFormat32bppGrayFixedPoint, GUID_WICPixelFormat32bppGrayFloat }, // DXGI_FORMAT_R32_FLOAT
|
||||
{ GUID_WICPixelFormat16bppGrayFixedPoint, GUID_WICPixelFormat16bppGrayHalf }, // DXGI_FORMAT_R16_FLOAT
|
||||
{ GUID_WICPixelFormat32bppGrayFixedPoint, GUID_WICPixelFormat32bppGrayFloat }, // DXGI_FORMAT_R32_FLOAT
|
||||
|
||||
{ GUID_WICPixelFormat16bppBGR555, GUID_WICPixelFormat16bppBGRA5551 }, // DXGI_FORMAT_B5G5R5A1_UNORM
|
||||
|
||||
{ GUID_WICPixelFormat32bppBGR101010, GUID_WICPixelFormat32bppRGBA1010102 }, // DXGI_FORMAT_R10G10B10A2_UNORM
|
||||
|
||||
{ GUID_WICPixelFormat24bppBGR, GUID_WICPixelFormat32bppRGBA }, // DXGI_FORMAT_R8G8B8A8_UNORM
|
||||
{ GUID_WICPixelFormat24bppRGB, GUID_WICPixelFormat32bppRGBA }, // DXGI_FORMAT_R8G8B8A8_UNORM
|
||||
{ GUID_WICPixelFormat32bppPBGRA, GUID_WICPixelFormat32bppRGBA }, // DXGI_FORMAT_R8G8B8A8_UNORM
|
||||
{ GUID_WICPixelFormat32bppPRGBA, GUID_WICPixelFormat32bppRGBA }, // DXGI_FORMAT_R8G8B8A8_UNORM
|
||||
{ GUID_WICPixelFormat24bppBGR, GUID_WICPixelFormat32bppRGBA }, // DXGI_FORMAT_R8G8B8A8_UNORM
|
||||
{ GUID_WICPixelFormat24bppRGB, GUID_WICPixelFormat32bppRGBA }, // DXGI_FORMAT_R8G8B8A8_UNORM
|
||||
{ GUID_WICPixelFormat32bppPBGRA, GUID_WICPixelFormat32bppRGBA }, // DXGI_FORMAT_R8G8B8A8_UNORM
|
||||
{ GUID_WICPixelFormat32bppPRGBA, GUID_WICPixelFormat32bppRGBA }, // DXGI_FORMAT_R8G8B8A8_UNORM
|
||||
|
||||
{ GUID_WICPixelFormat48bppRGB, GUID_WICPixelFormat64bppRGBA }, // DXGI_FORMAT_R16G16B16A16_UNORM
|
||||
{ GUID_WICPixelFormat48bppBGR, GUID_WICPixelFormat64bppRGBA }, // DXGI_FORMAT_R16G16B16A16_UNORM
|
||||
|
@ -112,19 +112,19 @@ namespace
|
|||
{ GUID_WICPixelFormat64bppPRGBA, GUID_WICPixelFormat64bppRGBA }, // DXGI_FORMAT_R16G16B16A16_UNORM
|
||||
{ GUID_WICPixelFormat64bppPBGRA, GUID_WICPixelFormat64bppRGBA }, // DXGI_FORMAT_R16G16B16A16_UNORM
|
||||
|
||||
{ GUID_WICPixelFormat48bppRGBFixedPoint, GUID_WICPixelFormat64bppRGBAHalf }, // DXGI_FORMAT_R16G16B16A16_FLOAT
|
||||
{ GUID_WICPixelFormat48bppBGRFixedPoint, GUID_WICPixelFormat64bppRGBAHalf }, // DXGI_FORMAT_R16G16B16A16_FLOAT
|
||||
{ GUID_WICPixelFormat64bppRGBAFixedPoint, GUID_WICPixelFormat64bppRGBAHalf }, // DXGI_FORMAT_R16G16B16A16_FLOAT
|
||||
{ GUID_WICPixelFormat64bppBGRAFixedPoint, GUID_WICPixelFormat64bppRGBAHalf }, // DXGI_FORMAT_R16G16B16A16_FLOAT
|
||||
{ GUID_WICPixelFormat64bppRGBFixedPoint, GUID_WICPixelFormat64bppRGBAHalf }, // DXGI_FORMAT_R16G16B16A16_FLOAT
|
||||
{ GUID_WICPixelFormat64bppRGBHalf, GUID_WICPixelFormat64bppRGBAHalf }, // DXGI_FORMAT_R16G16B16A16_FLOAT
|
||||
{ GUID_WICPixelFormat48bppRGBHalf, GUID_WICPixelFormat64bppRGBAHalf }, // DXGI_FORMAT_R16G16B16A16_FLOAT
|
||||
{ GUID_WICPixelFormat48bppRGBFixedPoint, GUID_WICPixelFormat64bppRGBAHalf }, // DXGI_FORMAT_R16G16B16A16_FLOAT
|
||||
{ GUID_WICPixelFormat48bppBGRFixedPoint, GUID_WICPixelFormat64bppRGBAHalf }, // DXGI_FORMAT_R16G16B16A16_FLOAT
|
||||
{ GUID_WICPixelFormat64bppRGBAFixedPoint, GUID_WICPixelFormat64bppRGBAHalf }, // DXGI_FORMAT_R16G16B16A16_FLOAT
|
||||
{ GUID_WICPixelFormat64bppBGRAFixedPoint, GUID_WICPixelFormat64bppRGBAHalf }, // DXGI_FORMAT_R16G16B16A16_FLOAT
|
||||
{ GUID_WICPixelFormat64bppRGBFixedPoint, GUID_WICPixelFormat64bppRGBAHalf }, // DXGI_FORMAT_R16G16B16A16_FLOAT
|
||||
{ GUID_WICPixelFormat64bppRGBHalf, GUID_WICPixelFormat64bppRGBAHalf }, // DXGI_FORMAT_R16G16B16A16_FLOAT
|
||||
{ GUID_WICPixelFormat48bppRGBHalf, GUID_WICPixelFormat64bppRGBAHalf }, // DXGI_FORMAT_R16G16B16A16_FLOAT
|
||||
|
||||
{ GUID_WICPixelFormat128bppPRGBAFloat, GUID_WICPixelFormat128bppRGBAFloat }, // DXGI_FORMAT_R32G32B32A32_FLOAT
|
||||
{ GUID_WICPixelFormat128bppRGBFloat, GUID_WICPixelFormat128bppRGBAFloat }, // DXGI_FORMAT_R32G32B32A32_FLOAT
|
||||
{ GUID_WICPixelFormat128bppRGBAFixedPoint, GUID_WICPixelFormat128bppRGBAFloat }, // DXGI_FORMAT_R32G32B32A32_FLOAT
|
||||
{ GUID_WICPixelFormat128bppRGBFixedPoint, GUID_WICPixelFormat128bppRGBAFloat }, // DXGI_FORMAT_R32G32B32A32_FLOAT
|
||||
{ GUID_WICPixelFormat32bppRGBE, GUID_WICPixelFormat128bppRGBAFloat }, // DXGI_FORMAT_R32G32B32A32_FLOAT
|
||||
{ GUID_WICPixelFormat128bppPRGBAFloat, GUID_WICPixelFormat128bppRGBAFloat }, // DXGI_FORMAT_R32G32B32A32_FLOAT
|
||||
{ GUID_WICPixelFormat128bppRGBFloat, GUID_WICPixelFormat128bppRGBAFloat }, // DXGI_FORMAT_R32G32B32A32_FLOAT
|
||||
{ GUID_WICPixelFormat128bppRGBAFixedPoint, GUID_WICPixelFormat128bppRGBAFloat }, // DXGI_FORMAT_R32G32B32A32_FLOAT
|
||||
{ GUID_WICPixelFormat128bppRGBFixedPoint, GUID_WICPixelFormat128bppRGBAFloat }, // DXGI_FORMAT_R32G32B32A32_FLOAT
|
||||
{ GUID_WICPixelFormat32bppRGBE, GUID_WICPixelFormat128bppRGBAFloat }, // DXGI_FORMAT_R32G32B32A32_FLOAT
|
||||
|
||||
{ GUID_WICPixelFormat32bppCMYK, GUID_WICPixelFormat32bppRGBA }, // DXGI_FORMAT_R8G8B8A8_UNORM
|
||||
{ GUID_WICPixelFormat64bppCMYK, GUID_WICPixelFormat64bppRGBA }, // DXGI_FORMAT_R16G16B16A16_UNORM
|
||||
|
|
|
@ -570,7 +570,7 @@ HRESULT Xbox::CreateDDSTextureFromMemory(
|
|||
|
||||
//--------------------------------------------------------------------------------------
|
||||
_Use_decl_annotations_
|
||||
HRESULT Xbox::CreateDDSTextureFromFile(
|
||||
HRESULT Xbox::CreateDDSTextureFromFile(
|
||||
ID3D12Device* d3dDevice,
|
||||
const wchar_t* fileName,
|
||||
ID3D12Resource** texture,
|
||||
|
|
|
@ -33,4 +33,3 @@ namespace VBO
|
|||
} // namespace
|
||||
|
||||
static_assert(sizeof(VBO::header_t) == 8, "VBO header size mismatch");
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче