Skip to content

Commit cdb27fb

Browse files
committed
Refreshed samples
1 parent d9ee2bb commit cdb27fb

File tree

180 files changed

+843
-682
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

180 files changed

+843
-682
lines changed

Kits/ATGTK/ATGColors.h

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -20,37 +20,37 @@ namespace ATG
2020
{
2121
namespace Colors
2222
{
23-
XMGLOBALCONST DirectX::XMVECTORF32 Background = { 0.254901975f, 0.254901975f, 0.254901975f, 1.f }; // #414141
24-
XMGLOBALCONST DirectX::XMVECTORF32 Green = { 0.062745102f, 0.486274511f, 0.062745102f, 1.f }; // #107c10
25-
XMGLOBALCONST DirectX::XMVECTORF32 Blue = { 0.019607844f, 0.372549027f, 0.803921580f, 1.f }; // #055fcd
26-
XMGLOBALCONST DirectX::XMVECTORF32 Orange = { 0.764705896f, 0.176470593f, 0.019607844f, 1.f }; // #c32d05
27-
XMGLOBALCONST DirectX::XMVECTORF32 DarkGrey = { 0.200000003f, 0.200000003f, 0.200000003f, 1.f }; // #333333
28-
XMGLOBALCONST DirectX::XMVECTORF32 LightGrey = { 0.478431374f, 0.478431374f, 0.478431374f, 1.f }; // #7a7a7a
29-
XMGLOBALCONST DirectX::XMVECTORF32 OffWhite = { 0.635294139f, 0.635294139f, 0.635294139f, 1.f }; // #a2a2a2
30-
XMGLOBALCONST DirectX::XMVECTORF32 White = { 0.980392158f, 0.980392158f, 0.980392158f, 1.f }; // #fafafa
23+
XMGLOBALCONST DirectX::XMVECTORF32 Background = { { { 0.254901975f, 0.254901975f, 0.254901975f, 1.f } } }; // #414141
24+
XMGLOBALCONST DirectX::XMVECTORF32 Green = { { { 0.062745102f, 0.486274511f, 0.062745102f, 1.f } } }; // #107c10
25+
XMGLOBALCONST DirectX::XMVECTORF32 Blue = { { { 0.019607844f, 0.372549027f, 0.803921580f, 1.f } } }; // #055fcd
26+
XMGLOBALCONST DirectX::XMVECTORF32 Orange = { { { 0.764705896f, 0.176470593f, 0.019607844f, 1.f } } }; // #c32d05
27+
XMGLOBALCONST DirectX::XMVECTORF32 DarkGrey = { { { 0.200000003f, 0.200000003f, 0.200000003f, 1.f } } }; // #333333
28+
XMGLOBALCONST DirectX::XMVECTORF32 LightGrey = { { { 0.478431374f, 0.478431374f, 0.478431374f, 1.f } } }; // #7a7a7a
29+
XMGLOBALCONST DirectX::XMVECTORF32 OffWhite = { { { 0.635294139f, 0.635294139f, 0.635294139f, 1.f } } }; // #a2a2a2
30+
XMGLOBALCONST DirectX::XMVECTORF32 White = { { { 0.980392158f, 0.980392158f, 0.980392158f, 1.f } } }; // #fafafa
3131
};
3232

3333
namespace ColorsLinear
3434
{
35-
XMGLOBALCONST DirectX::XMVECTORF32 Background = { 0.052860655f, 0.052860655f, 0.052860655f, 1.f };
36-
XMGLOBALCONST DirectX::XMVECTORF32 Green = { 0.005181516f, 0.201556236f, 0.005181516f, 1.f };
37-
XMGLOBALCONST DirectX::XMVECTORF32 Blue = { 0.001517635f, 0.114435382f, 0.610495627f, 1.f };
38-
XMGLOBALCONST DirectX::XMVECTORF32 Orange = { 0.545724571f, 0.026241219f, 0.001517635f, 1.f };
39-
XMGLOBALCONST DirectX::XMVECTORF32 DarkGrey = { 0.033104762f, 0.033104762f, 0.033104762f, 1.f };
40-
XMGLOBALCONST DirectX::XMVECTORF32 LightGrey = { 0.194617808f, 0.194617808f, 0.194617808f, 1.f };
41-
XMGLOBALCONST DirectX::XMVECTORF32 OffWhite = { 0.361306787f, 0.361306787f, 0.361306787f, 1.f };
42-
XMGLOBALCONST DirectX::XMVECTORF32 White = { 0.955973506f, 0.955973506f, 0.955973506f, 1.f };
35+
XMGLOBALCONST DirectX::XMVECTORF32 Background = { { { 0.052860655f, 0.052860655f, 0.052860655f, 1.f } } };
36+
XMGLOBALCONST DirectX::XMVECTORF32 Green = { { { 0.005181516f, 0.201556236f, 0.005181516f, 1.f } } };
37+
XMGLOBALCONST DirectX::XMVECTORF32 Blue = { { { 0.001517635f, 0.114435382f, 0.610495627f, 1.f } } };
38+
XMGLOBALCONST DirectX::XMVECTORF32 Orange = { { { 0.545724571f, 0.026241219f, 0.001517635f, 1.f } } };
39+
XMGLOBALCONST DirectX::XMVECTORF32 DarkGrey = { { { 0.033104762f, 0.033104762f, 0.033104762f, 1.f } } };
40+
XMGLOBALCONST DirectX::XMVECTORF32 LightGrey = { { { 0.194617808f, 0.194617808f, 0.194617808f, 1.f } } };
41+
XMGLOBALCONST DirectX::XMVECTORF32 OffWhite = { { { 0.361306787f, 0.361306787f, 0.361306787f, 1.f } } };
42+
XMGLOBALCONST DirectX::XMVECTORF32 White = { { { 0.955973506f, 0.955973506f, 0.955973506f, 1.f } } };
4343
};
4444

4545
namespace ColorsHDR
4646
{
47-
XMGLOBALCONST DirectX::XMVECTORF32 Background = { 0.052860655f * 2.f, 0.052860655f * 2.f, 0.052860655f * 2.f, 1.f };
48-
XMGLOBALCONST DirectX::XMVECTORF32 Green = { 0.005181516f * 2.f, 0.201556236f * 2.f, 0.005181516f * 2.f, 1.f };
49-
XMGLOBALCONST DirectX::XMVECTORF32 Blue = { 0.001517635f * 2.f, 0.114435382f * 2.f, 0.610495627f * 2.f, 1.f };
50-
XMGLOBALCONST DirectX::XMVECTORF32 Orange = { 0.545724571f * 2.f, 0.026241219f * 2.f, 0.001517635f * 2.f, 1.f };
51-
XMGLOBALCONST DirectX::XMVECTORF32 DarkGrey = { 0.033104762f * 2.f, 0.033104762f * 2.f, 0.033104762f * 2.f, 1.f };
52-
XMGLOBALCONST DirectX::XMVECTORF32 LightGrey = { 0.194617808f * 2.f, 0.194617808f * 2.f, 0.194617808f * 2.f, 1.f };
53-
XMGLOBALCONST DirectX::XMVECTORF32 OffWhite = { 0.361306787f * 2.f, 0.361306787f * 2.f, 0.361306787f * 2.f, 1.f };
54-
XMGLOBALCONST DirectX::XMVECTORF32 White = { 0.955973506f * 2.f, 0.955973506f * 2.f, 0.955973506f * 2.f, 1.f };
47+
XMGLOBALCONST DirectX::XMVECTORF32 Background = { { { 0.052860655f * 2.f, 0.052860655f * 2.f, 0.052860655f * 2.f, 1.f } } };
48+
XMGLOBALCONST DirectX::XMVECTORF32 Green = { { { 0.005181516f * 2.f, 0.201556236f * 2.f, 0.005181516f * 2.f, 1.f } } };
49+
XMGLOBALCONST DirectX::XMVECTORF32 Blue = { { { 0.001517635f * 2.f, 0.114435382f * 2.f, 0.610495627f * 2.f, 1.f } } };
50+
XMGLOBALCONST DirectX::XMVECTORF32 Orange = { { { 0.545724571f * 2.f, 0.026241219f * 2.f, 0.001517635f * 2.f, 1.f } } };
51+
XMGLOBALCONST DirectX::XMVECTORF32 DarkGrey = { { { 0.033104762f * 2.f, 0.033104762f * 2.f, 0.033104762f * 2.f, 1.f } } };
52+
XMGLOBALCONST DirectX::XMVECTORF32 LightGrey = { { { 0.194617808f * 2.f, 0.194617808f * 2.f, 0.194617808f * 2.f, 1.f } } };
53+
XMGLOBALCONST DirectX::XMVECTORF32 OffWhite = { { { 0.361306787f * 2.f, 0.361306787f * 2.f, 0.361306787f * 2.f, 1.f } } };
54+
XMGLOBALCONST DirectX::XMVECTORF32 White = { { { 0.955973506f * 2.f, 0.955973506f * 2.f, 0.955973506f * 2.f, 1.f } } };
5555
};
5656
}

Kits/ATGTK/CSVReader.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ namespace DX
272272

273273
typedef std::unique_ptr<void, handle_closer> ScopedHandle;
274274

275-
inline HANDLE safe_handle(HANDLE h) { return (h == INVALID_HANDLE_VALUE) ? 0 : h; }
275+
inline HANDLE safe_handle(HANDLE h) { return (h == INVALID_HANDLE_VALUE) ? nullptr : h; }
276276

277277
std::unique_ptr<wchar_t[]> m_data;
278278
const wchar_t* m_end;

Kits/ATGTK/FrontPanel/FrontPanelDisplay.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ void FrontPanelDisplay::SaveWICToFile(_In_z_ const wchar_t *filename, REFGUID gu
249249

250250
ComPtr<IWICBitmapEncoder> encoder;
251251
ThrowIfFailed(
252-
pWIC->CreateEncoder(guidContainerFormat, 0, encoder.GetAddressOf())
252+
pWIC->CreateEncoder(guidContainerFormat, nullptr, encoder.GetAddressOf())
253253
);
254254

255255
ThrowIfFailed(
@@ -359,7 +359,7 @@ BufferDesc FrontPanelDisplay::LoadWICFromFile(_In_z_ const wchar_t* filename, st
359359

360360
ComPtr<IWICBitmapDecoder> decoder;
361361
ThrowIfFailed(
362-
pWIC->CreateDecoderFromFilename(filename, 0, GENERIC_READ, WICDecodeMetadataCacheOnDemand, decoder.GetAddressOf())
362+
pWIC->CreateDecoderFromFilename(filename, nullptr, GENERIC_READ, WICDecodeMetadataCacheOnDemand, decoder.GetAddressOf())
363363
);
364364

365365
UINT frameCount = 0;
@@ -399,7 +399,7 @@ BufferDesc FrontPanelDisplay::LoadWICFromFile(_In_z_ const wchar_t* filename, st
399399
{
400400
// No format conversion or resize needed
401401
ThrowIfFailed(
402-
frame->CopyPixels(0, static_cast<UINT>(rowPitch), static_cast<UINT>(imageSize), data.get())
402+
frame->CopyPixels(nullptr, static_cast<UINT>(rowPitch), static_cast<UINT>(imageSize), data.get())
403403
);
404404
}
405405
else if (m_displayWidth != width || m_displayHeight != height)
@@ -423,7 +423,7 @@ BufferDesc FrontPanelDisplay::LoadWICFromFile(_In_z_ const wchar_t* filename, st
423423
{
424424
// No format conversion needed
425425
ThrowIfFailed(
426-
scaler->CopyPixels(0, static_cast<UINT>(rowPitch), static_cast<UINT>(imageSize), data.get())
426+
scaler->CopyPixels(nullptr, static_cast<UINT>(rowPitch), static_cast<UINT>(imageSize), data.get())
427427
);
428428
}
429429
else
@@ -449,7 +449,7 @@ BufferDesc FrontPanelDisplay::LoadWICFromFile(_In_z_ const wchar_t* filename, st
449449
);
450450

451451
ThrowIfFailed(
452-
FC->CopyPixels(0, static_cast<UINT>(rowPitch), static_cast<UINT>(imageSize), data.get())
452+
FC->CopyPixels(nullptr, static_cast<UINT>(rowPitch), static_cast<UINT>(imageSize), data.get())
453453
);
454454
}
455455
}
@@ -477,7 +477,7 @@ BufferDesc FrontPanelDisplay::LoadWICFromFile(_In_z_ const wchar_t* filename, st
477477
);
478478

479479
ThrowIfFailed(
480-
FC->CopyPixels(0, static_cast<UINT>(rowPitch), static_cast<UINT>(imageSize), data.get())
480+
FC->CopyPixels(nullptr, static_cast<UINT>(rowPitch), static_cast<UINT>(imageSize), data.get())
481481
);
482482
}
483483

Kits/ATGTK/OSHelpers.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@ namespace DX
1515

1616
typedef std::unique_ptr<void, handle_closer> ScopedHandle;
1717

18-
inline HANDLE safe_handle(HANDLE h) { return (h == INVALID_HANDLE_VALUE) ? 0 : h; }
18+
inline HANDLE safe_handle(HANDLE h) { return (h == INVALID_HANDLE_VALUE) ? nullptr : h; }
1919
}

Kits/ATGTK/PerformanceTimersXbox.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ void GPUCommandListTimer<t_CommandList>::Frame::ComputeFrame(_In_ t_CommandList*
365365

366366
DebugWarnings(j, start, end);
367367

368-
const static double c_FrequencyInvMS = 1000.0 / double(D3D11X_XBOX_GPU_TIMESTAMP_FREQUENCY);
368+
static const double c_FrequencyInvMS = 1000.0 / double(D3D11X_XBOX_GPU_TIMESTAMP_FREQUENCY);
369369
float value = float(double(end - start) * c_FrequencyInvMS);
370370
m_timing[j] = value;
371371
m_avg[j] = UpdateRunningAverage(m_avg[j], value);
@@ -578,7 +578,7 @@ void GPUContextTimer<t_Context>::Frame::ComputeFrame(_In_ t_Context* context)
578578

579579
DebugWarnings(j, start, end);
580580

581-
const static double c_FrequencyInvMS = 1000.0 / double(D3D11X_XBOX_GPU_TIMESTAMP_FREQUENCY);
581+
static const double c_FrequencyInvMS = 1000.0 / double(D3D11X_XBOX_GPU_TIMESTAMP_FREQUENCY);
582582
float value = float(double(end - start) * c_FrequencyInvMS);
583583
m_timing[j] = value;
584584
m_avg[j] = UpdateRunningAverage(m_avg[j], value);

Kits/ATGTK/PerformanceTimersXbox.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ namespace DX
6666
{
6767
typedef uint64_t Timestamp;
6868

69-
const static Timestamp c_invalidTimestamp = 0;
69+
static const Timestamp c_invalidTimestamp = 0;
7070

7171
public:
7272
static const size_t c_maxTimers = 8;
@@ -158,7 +158,7 @@ namespace DX
158158
{
159159
typedef uint64_t Timestamp;
160160

161-
const static Timestamp c_invalidTimestamp = 0;
161+
static const Timestamp c_invalidTimestamp = 0;
162162

163163
public:
164164
static const size_t c_maxTimers = 8;

Kits/ATGTK/WAVFileReader.cpp

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,27 +10,32 @@
1010
#include "pch.h"
1111
#include "WAVFileReader.h"
1212

13+
#ifndef MAKEFOURCC
14+
#define MAKEFOURCC(ch0, ch1, ch2, ch3) \
15+
((uint32_t)(uint8_t)(ch0) | ((uint32_t)(uint8_t)(ch1) << 8) | \
16+
((uint32_t)(uint8_t)(ch2) << 16) | ((uint32_t)(uint8_t)(ch3) << 24 ))
17+
#endif /* defined(MAKEFOURCC) */
1318

1419
namespace
1520
{
1621
struct handle_closer { void operator()(HANDLE h) { if (h) CloseHandle(h); } };
1722

18-
typedef public std::unique_ptr<void, handle_closer> ScopedHandle;
23+
typedef std::unique_ptr<void, handle_closer> ScopedHandle;
1924

20-
inline HANDLE safe_handle(HANDLE h) { return (h == INVALID_HANDLE_VALUE) ? 0 : h; }
25+
inline HANDLE safe_handle(HANDLE h) { return (h == INVALID_HANDLE_VALUE) ? nullptr : h; }
2126

2227
//---------------------------------------------------------------------------------
2328
// .WAV files
2429
//---------------------------------------------------------------------------------
25-
const uint32_t FOURCC_RIFF_TAG = 'FFIR';
26-
const uint32_t FOURCC_FORMAT_TAG = ' tmf';
27-
const uint32_t FOURCC_DATA_TAG = 'atad';
28-
const uint32_t FOURCC_WAVE_FILE_TAG = 'EVAW';
29-
const uint32_t FOURCC_XWMA_FILE_TAG = 'AMWX';
30-
const uint32_t FOURCC_DLS_SAMPLE = 'pmsw';
31-
const uint32_t FOURCC_MIDI_SAMPLE = 'lpms';
32-
const uint32_t FOURCC_XWMA_DPDS = 'sdpd';
33-
const uint32_t FOURCC_XMA_SEEK = 'kees';
30+
const uint32_t FOURCC_RIFF_TAG = MAKEFOURCC('R', 'I', 'F', 'F');
31+
const uint32_t FOURCC_FORMAT_TAG = MAKEFOURCC('f', 'm', 't', ' ');
32+
const uint32_t FOURCC_DATA_TAG = MAKEFOURCC('d', 'a', 't', 'a');
33+
const uint32_t FOURCC_WAVE_FILE_TAG = MAKEFOURCC('W', 'A', 'V', 'E');
34+
const uint32_t FOURCC_XWMA_FILE_TAG = MAKEFOURCC('X', 'W', 'M', 'A');
35+
const uint32_t FOURCC_DLS_SAMPLE = MAKEFOURCC('w', 's', 'm', 'p');
36+
const uint32_t FOURCC_MIDI_SAMPLE = MAKEFOURCC('s', 'm', 'p', 'l');
37+
const uint32_t FOURCC_XWMA_DPDS = MAKEFOURCC('d', 'p', 'd', 's');
38+
const uint32_t FOURCC_XMA_SEEK = MAKEFOURCC('s', 'e', 'e', 'k');
3439

3540
#pragma pack(push,1)
3641
struct RIFFChunk

0 commit comments

Comments
 (0)