Commit b05d5470 authored by Chuck Walbourn's avatar Chuck Walbourn
Browse files

DirectXTK12 updated for Sept 13, 2018 release

parent b2cf483a
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -40,6 +40,7 @@ if exist %PCFXC% goto continue
set PCFXC=fxc.exe

:continue
@if not exist Compiled mkdir Compiled
call :CompileShader%1 AlphaTestEffect vs VSAlphaTest
call :CompileShader%1 AlphaTestEffect vs VSAlphaTestNoFog
call :CompileShader%1 AlphaTestEffect vs VSAlphaTestVc
+10 −6
Original line number Diff line number Diff line
@@ -11,10 +11,8 @@

#if defined(_XBOX_ONE) && defined(_TITLE)
#include <d3d12_x.h>
#include <d3dx12_x.h>
#else
#include <d3d12.h>
#include "d3dx12.h"
#endif

#include <stdexcept>
@@ -89,7 +87,10 @@ namespace DirectX
                throw std::out_of_range("D3DX12_GPU_DESCRIPTOR_HANDLE");
            }
            assert(m_desc.Flags & D3D12_DESCRIPTOR_HEAP_FLAG_SHADER_VISIBLE);
            return CD3DX12_GPU_DESCRIPTOR_HANDLE(m_hGPU, static_cast<INT>(index), m_increment);

            D3D12_GPU_DESCRIPTOR_HANDLE handle;
            handle.ptr = m_hGPU.ptr + UINT64(index) * UINT64(m_increment);
            return handle;
        }

        D3D12_CPU_DESCRIPTOR_HANDLE GetCpuHandle(_In_ size_t index) const
@@ -99,7 +100,10 @@ namespace DirectX
            {
                throw std::out_of_range("D3DX12_CPU_DESCRIPTOR_HANDLE");
            }
            return CD3DX12_CPU_DESCRIPTOR_HANDLE(m_hCPU, static_cast<INT>(index), m_increment);

            D3D12_CPU_DESCRIPTOR_HANDLE handle;
            handle.ptr = m_hCPU.ptr + UINT64(index) * UINT64(m_increment);
            return handle;
        }

        size_t Count() const { return m_desc.NumDescriptors; }
@@ -117,8 +121,8 @@ namespace DirectX

        Microsoft::WRL::ComPtr<ID3D12DescriptorHeap>    m_pHeap;
        D3D12_DESCRIPTOR_HEAP_DESC                      m_desc;
        CD3DX12_CPU_DESCRIPTOR_HANDLE                   m_hCPU;
        CD3DX12_GPU_DESCRIPTOR_HANDLE                   m_hGPU;
        D3D12_CPU_DESCRIPTOR_HANDLE                     m_hCPU;
        D3D12_GPU_DESCRIPTOR_HANDLE                     m_hGPU;
        uint32_t                                        m_increment;
    };

+4 −1
Original line number Diff line number Diff line
@@ -4,7 +4,7 @@ DirectXTK - the DirectX Tool Kit for DirectX 12

Copyright (c) Microsoft Corporation. All rights reserved.

August 17, 2018
September 13, 2018

This package contains the "DirectX Tool Kit", a collection of helper classes for 
writing Direct3D 12 C++ code for Universal Windows Platform (UWP) apps, Win32 desktop
@@ -115,6 +115,9 @@ RELEASE NOTES
RELEASE HISTORY
---------------

September 13, 2018
    Broke DescriptorHeap header dependency on D3DX12.H

August 17, 2018
    Improved validation for 16k textures and other large resources
    Improved debug output for failed texture loads and screengrabs
+6 −2
Original line number Diff line number Diff line
@@ -52,6 +52,8 @@ DescriptorHeap::DescriptorHeap(
    ID3D12Device* device,
    const D3D12_DESCRIPTOR_HEAP_DESC* pDesc) :
    m_desc{},
    m_hCPU{},
    m_hGPU{},
    m_increment(0)
{
    Create(device, pDesc);
@@ -64,6 +66,8 @@ DescriptorHeap::DescriptorHeap(
    D3D12_DESCRIPTOR_HEAP_FLAGS flags,
    size_t count) :
    m_desc{},
    m_hCPU{},
    m_hGPU{},
    m_increment(0)
{
    if (count > UINT32_MAX)
@@ -153,8 +157,8 @@ void DescriptorHeap::Create(
    if (pDesc->NumDescriptors == 0)
    {
        m_pHeap.Reset();
        m_hCPU = CD3DX12_CPU_DESCRIPTOR_HANDLE(D3D12_DEFAULT);
        m_hGPU = CD3DX12_GPU_DESCRIPTOR_HANDLE(D3D12_DEFAULT);
        m_hCPU.ptr = 0;
        m_hGPU.ptr = 0;
    }
    else
    {
+1 −0
Original line number Diff line number Diff line
@@ -39,6 +39,7 @@ if exist %PCFXC% goto continue
set PCFXC=fxc.exe

:continue
@if not exist Compiled mkdir Compiled
call :CompileShader%1 AlphaTestEffect vs VSAlphaTest
call :CompileShader%1 AlphaTestEffect vs VSAlphaTestNoFog
call :CompileShader%1 AlphaTestEffect vs VSAlphaTestVc
Loading