Skip to content

Commit

Permalink
v1.2.13 release
Browse files Browse the repository at this point in the history
  • Loading branch information
acmarrs-nvidia committed Sep 12, 2022
1 parent 3f9fdfc commit aca70da
Show file tree
Hide file tree
Showing 10 changed files with 64 additions and 50 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.venv/*
.vscode/settings.json
.vscode/*.log
log.txt
build/*
dxc
Expand Down
11 changes: 11 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# RTXGI SDK Change Log

## 1.2.13

### SDK
Bug Fixes:
- Fixes a bit packing issue in `DDGIVolumeDescGPU.h`
- This bug causes the irradiance texture format to be improperly packed and unpacked. This problem may also affect feature bits, depending on which ones are set.

### Test Harness
Bug Fixes:
- Fixes Vulkan validation layer errors related to the ray query extension not being enabled

## 1.2.12a

### SDK
Expand Down
4 changes: 2 additions & 2 deletions rtxgi-sdk/include/rtxgi/Common.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ namespace rtxgi
{
static const int major = 1;
static const int minor = 2;
static const int revision = 12;
static const int revision = 13;

inline static const char* getVersionString()
{
return "1.2.12";
return "1.2.13";
}
};

Expand Down
66 changes: 33 additions & 33 deletions rtxgi-sdk/include/rtxgi/ddgi/DDGIVolumeDescGPU.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,10 @@ struct DDGIVolumeDescGPU
bool probeRelocationEnabled; // whether probe relocation is enabled for this volume
bool probeClassificationEnabled; // whether probe classification is enabled for this volume

#ifndef HLSL
#ifndef HLSL // CPU only
rtxgi::DDGIVolumeDescGPUPacked GetPackedData()
{
rtxgi::DDGIVolumeDescGPUPacked data;
rtxgi::DDGIVolumeDescGPUPacked data = {};
data.origin = origin;
data.probeHysteresis = probeHysteresis;
data.rotation = rotation;
Expand All @@ -115,7 +115,7 @@ struct DDGIVolumeDescGPU
data.packed0 = (uint32_t)probeCounts.x;
data.packed0 |= (uint32_t)probeCounts.y << 8;
data.packed0 |= (uint32_t)probeCounts.z << 16;
//data.packed0 |= 8 bits unused
//data.packed0, 8 bits unused

data.probeIrradianceEncodingGamma = probeIrradianceEncodingGamma;
data.probeIrradianceThreshold = probeIrradianceThreshold;
Expand All @@ -131,36 +131,36 @@ struct DDGIVolumeDescGPU
data.packed2 |= (uint32_t)probeNumDistanceTexels << 24;

// Probe Scroll Offsets
data.packed3 = (uint32_t)abs(probeScrollOffsets.x);
data.packed3 |= ((uint32_t)(probeScrollOffsets.x < 0) << 15);
data.packed3 |= (uint32_t)abs(probeScrollOffsets.y) << 16;
data.packed3 |= ((uint32_t)(probeScrollOffsets.y < 0) << 31);
data.packed4 = (uint32_t)abs(probeScrollOffsets.z);
data.packed4 |= ((uint32_t)(probeScrollOffsets.z < 0) << 15);
data.packed3 = (data.packed3 & ~0x7FFF) | abs(probeScrollOffsets.x);
data.packed3 = (data.packed3 & ~0x8000) | ((probeScrollOffsets.x < 0) << 15);
data.packed3 = (data.packed3 & ~0x10000) | abs(probeScrollOffsets.y) << 16;
data.packed3 = (data.packed3 & ~0x80000000) | ((probeScrollOffsets.y < 0) << 31);
data.packed4 = (data.packed4 & ~0x7FFF) | abs(probeScrollOffsets.z);
data.packed4 = (data.packed4 & ~0x8000) | ((probeScrollOffsets.z < 0) << 15);

// Feature Bits
data.packed4 |= movementType << 16;
data.packed4 |= probeRayDataFormat << 17;
data.packed4 |= probeIrradianceFormat << 18;
data.packed4 |= (uint32_t)probeRelocationEnabled << 19;
data.packed4 |= (uint32_t)probeClassificationEnabled << 20;
data.packed4 |= (uint32_t)probeScrollClear[0] << 21;
data.packed4 |= (uint32_t)probeScrollClear[1] << 22;
data.packed4 |= (uint32_t)probeScrollClear[2] << 23;
data.packed4 |= (uint32_t)(probeScrollDirections[0]) << 24;
data.packed4 |= (uint32_t)(probeScrollDirections[1]) << 25;
data.packed4 |= (uint32_t)(probeScrollDirections[2]) << 26;
//data.packed4 |= 5 bits unused
data.packed4 = (data.packed4 & ~0x10000) | (movementType << 16);
data.packed4 = (data.packed4 & ~0x20000) | (probeRayDataFormat << 17);
data.packed4 = (data.packed4 & ~0xC0000) | (probeIrradianceFormat << 18);
data.packed4 = (data.packed4 & ~0x100000) | (probeRelocationEnabled << 20);
data.packed4 = (data.packed4 & ~0x200000) | (probeClassificationEnabled << 21);
data.packed4 = (data.packed4 & ~0x400000) | (probeScrollClear[0] << 22);
data.packed4 = (data.packed4 & ~0x800000) | (probeScrollClear[1] << 23);
data.packed4 = (data.packed4 & ~0x1000000) | (probeScrollClear[2] << 24);
data.packed4 = (data.packed4 & ~0x2000000) | (probeScrollDirections[0] << 25);
data.packed4 = (data.packed4 & ~0x4000000) | (probeScrollDirections[1] << 26);
data.packed4 = (data.packed4 & ~0x8000000) | (probeScrollDirections[2] << 27);
//data.packed4, 4 bits unused

return data;
}
#endif
#endif // ifndef HLSL
};

#ifdef HLSL
#ifdef HLSL // GPU
DDGIVolumeDescGPU UnpackDDGIVolumeDescGPU(DDGIVolumeDescGPUPacked input)
{
DDGIVolumeDescGPU output;
DDGIVolumeDescGPU output = (DDGIVolumeDescGPU)0;
output.origin = input.origin;
output.probeHysteresis = input.probeHysteresis;
output.rotation = input.rotation;
Expand Down Expand Up @@ -201,15 +201,15 @@ DDGIVolumeDescGPU UnpackDDGIVolumeDescGPU(DDGIVolumeDescGPUPacked input)
// Feature Bits
output.movementType = (input.packed4 >> 16) & 0x00000001;
output.probeRayDataFormat = (uint)((input.packed4 >> 17) & 0x00000001);
output.probeIrradianceFormat = (uint)((input.packed4 >> 18) & 0x00000001);
output.probeRelocationEnabled = (bool)((input.packed4 >> 19) & 0x00000001);
output.probeClassificationEnabled = (bool)((input.packed4 >> 20) & 0x00000001);
output.probeScrollClear[0] = (bool)((input.packed4 >> 21) & 0x00000001);
output.probeScrollClear[1] = (bool)((input.packed4 >> 22) & 0x00000001);
output.probeScrollClear[2] = (bool)((input.packed4 >> 23) & 0x00000001);
output.probeScrollDirections[0] = (bool)((input.packed4 >> 24) & 0x00000001);
output.probeScrollDirections[1] = (bool)((input.packed4 >> 25) & 0x00000001);
output.probeScrollDirections[2] = (bool)((input.packed4 >> 26) & 0x00000001);
output.probeIrradianceFormat = (uint)((input.packed4 >> 18) & 0x00000003);
output.probeRelocationEnabled = (bool)((input.packed4 >> 20) & 0x00000001);
output.probeClassificationEnabled = (bool)((input.packed4 >> 21) & 0x00000001);
output.probeScrollClear[0] = (bool)((input.packed4 >> 22) & 0x00000001);
output.probeScrollClear[1] = (bool)((input.packed4 >> 23) & 0x00000001);
output.probeScrollClear[2] = (bool)((input.packed4 >> 24) & 0x00000001);
output.probeScrollDirections[0] = (bool)((input.packed4 >> 25) & 0x00000001);
output.probeScrollDirections[1] = (bool)((input.packed4 >> 26) & 0x00000001);
output.probeScrollDirections[2] = (bool)((input.packed4 >> 27) & 0x00000001);

return output;
}
Expand Down
8 changes: 7 additions & 1 deletion samples/test-harness/src/Vulkan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,7 @@ namespace Graphics
{
VK_KHR_SWAPCHAIN_EXTENSION_NAME,
VK_KHR_BUFFER_DEVICE_ADDRESS_EXTENSION_NAME,
VK_KHR_RAY_QUERY_EXTENSION_NAME,
VK_KHR_ACCELERATION_STRUCTURE_EXTENSION_NAME,
VK_KHR_RAY_TRACING_PIPELINE_EXTENSION_NAME,
VK_KHR_GET_MEMORY_REQUIREMENTS_2_EXTENSION_NAME,
Expand All @@ -353,9 +354,14 @@ namespace Graphics
bufferDeviceAdressFeatures.pNext = &robusness2Features;
bufferDeviceAdressFeatures.bufferDeviceAddress = VK_TRUE;

VkPhysicalDeviceRayQueryFeaturesKHR rayQueryFeatures = {};
rayQueryFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_QUERY_FEATURES_KHR;
rayQueryFeatures.pNext = &bufferDeviceAdressFeatures;
rayQueryFeatures.rayQuery = VK_TRUE;

VkPhysicalDeviceAccelerationStructureFeaturesKHR accelerationStructureFeatures = {};
accelerationStructureFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ACCELERATION_STRUCTURE_FEATURES_KHR;
accelerationStructureFeatures.pNext = &bufferDeviceAdressFeatures;
accelerationStructureFeatures.pNext = &rayQueryFeatures;
accelerationStructureFeatures.accelerationStructure = VK_TRUE;
accelerationStructureFeatures.accelerationStructureCaptureReplay = VK_FALSE;
accelerationStructureFeatures.accelerationStructureIndirectBuild = VK_FALSE;
Expand Down
4 changes: 2 additions & 2 deletions samples/test-harness/src/graphics/Composite_VK.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@ namespace Graphics
// Load and compile the vertex shader
resources.shaders.vs.filepath = shaderPath.c_str();
resources.shaders.vs.entryPoint = L"VS";
resources.shaders.vs.targetProfile = L"vs_6_5";
resources.shaders.vs.targetProfile = L"vs_6_4";
resources.shaders.vs.arguments = { L"-spirv", L"-D SPIRV=1", L"-fspv-target-env=vulkan1.2" };
CHECK(Shaders::Compile(vk.shaderCompiler, resources.shaders.vs, true), "compile composition vertex shader!\n", log);

// Load and compile the pixel shader
resources.shaders.ps.filepath = shaderPath.c_str();
resources.shaders.ps.entryPoint = L"PS";
resources.shaders.ps.targetProfile = L"ps_6_5";
resources.shaders.ps.targetProfile = L"ps_6_4";
resources.shaders.ps.arguments = { L"-spirv", L"-D SPIRV=1", L"-fspv-target-env=vulkan1.2" };
CHECK(Shaders::Compile(vk.shaderCompiler, resources.shaders.ps, true), "compile composition pixel shader!\n", log);

Expand Down
4 changes: 2 additions & 2 deletions samples/test-harness/src/graphics/DDGI_D3D12.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -941,8 +941,8 @@ namespace Graphics
// Validate the SDK version
assert(RTXGI_VERSION::major == 1);
assert(RTXGI_VERSION::minor == 2);
assert(RTXGI_VERSION::revision == 12);
assert(std::strcmp(RTXGI_VERSION::getVersionString(), "1.2.12") == 0);
assert(RTXGI_VERSION::revision == 13);
assert(std::strcmp(RTXGI_VERSION::getVersionString(), "1.2.13") == 0);

UINT numVolumes = static_cast<UINT>(config.ddgi.volumes.size());

Expand Down
4 changes: 2 additions & 2 deletions samples/test-harness/src/graphics/DDGI_VK.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1368,8 +1368,8 @@ namespace Graphics
// Validate the SDK version
assert(RTXGI_VERSION::major == 1);
assert(RTXGI_VERSION::minor == 2);
assert(RTXGI_VERSION::revision == 12);
assert(std::strcmp(RTXGI_VERSION::getVersionString(), "1.2.12") == 0);
assert(RTXGI_VERSION::revision == 13);
assert(std::strcmp(RTXGI_VERSION::getVersionString(), "1.2.13") == 0);

// Reset the command list before initialization
CHECK(ResetCmdList(vk), "reset command list!", log);
Expand Down
6 changes: 2 additions & 4 deletions samples/test-harness/src/graphics/GBuffer_VK.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,17 +55,15 @@ namespace Graphics
group.chs.filepath = shaderPath.c_str();
group.chs.entryPoint = L"CHS_PRIMARY";
group.chs.exportName = L"GBufferCHS";
group.chs.targetProfile = L"lib_6_4";
group.chs.arguments = { L"-spirv", L"-T lib_6_4", L"-D SPIRV=1", L"-fspv-target-env=vulkan1.2" };
group.chs.arguments = { L"-spirv", L"-D SPIRV=1", L"-fspv-target-env=vulkan1.2" };
CHECK(Shaders::Compile(vk.shaderCompiler, group.chs, true), "compile GBuffer closest hit shader!\n", log);

// Load and compile the AHS
shaderPath = root + L"shaders/AHS.hlsl";
group.ahs.filepath = shaderPath.c_str();
group.ahs.entryPoint = L"AHS_PRIMARY";
group.ahs.exportName = L"GBufferAHS";
group.ahs.targetProfile = L"lib_6_4";
group.ahs.arguments = { L"-spirv", L"-T lib_6_4", L"-D SPIRV=1", L"-fspv-target-env=vulkan1.2" };
group.ahs.arguments = { L"-spirv", L"-D SPIRV=1", L"-fspv-target-env=vulkan1.2" };
CHECK(Shaders::Compile(vk.shaderCompiler, group.ahs, true), "compile GBuffer any hit shader!\n", log);

return true;
Expand Down
6 changes: 2 additions & 4 deletions samples/test-harness/src/graphics/PathTracing_VK.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,17 +90,15 @@ namespace Graphics
group.chs.filepath = shaderPath.c_str();
group.chs.entryPoint = L"CHS_LOD0";
group.chs.exportName = L"PathTraceCHS";
group.chs.targetProfile = L"lib_6_4";
group.chs.arguments = { L"-spirv", L"-T lib_6_4", L"-D SPIRV=1", L"-fspv-target-env=vulkan1.2" };
group.chs.arguments = { L"-spirv", L"-D SPIRV=1", L"-fspv-target-env=vulkan1.2" };
CHECK(Shaders::Compile(vk.shaderCompiler, group.chs, true), "compile path tracing closest hit shader!\n", log);

// Load and compile the AHS
shaderPath = root + L"shaders/AHS.hlsl";
group.ahs.filepath = shaderPath.c_str();
group.ahs.entryPoint = L"AHS_LOD0";
group.ahs.exportName = L"PathTraceAHS";
group.ahs.targetProfile = L"lib_6_4";
group.ahs.arguments = { L"-spirv", L"-T lib_6_4", L"-D SPIRV=1", L"-fspv-target-env=vulkan1.2" };
group.ahs.arguments = { L"-spirv", L"-D SPIRV=1", L"-fspv-target-env=vulkan1.2" };
CHECK(Shaders::Compile(vk.shaderCompiler, group.ahs, true), "compile path tracing any hit shader!\n", log);

return true;
Expand Down

0 comments on commit aca70da

Please sign in to comment.