Skip to content

Commit

Permalink
v1.121:
Browse files Browse the repository at this point in the history
HIGHLIGHTS:

- NRI: improvements and bug fixes
- Helper: removed "before" state in "(Texture/Buffer)UploadDesc" to emphasize the initial raw state of a resource, we are uploading into
- D3D12: enhanced barriers: more parity with VK barriers
- WrapperVK: reworked "DeviceCreationVKDesc" and added "enabledExtensions"

MINOR (POTENTIALLY) BREAKING CHANGE:

- For barriers containing "Layout::PRESENT" the best (only?) valid barriers are:
Rendering:
    before = {.access = NriAccessBits_UNKNOWN, .layout = NriLayout_UNKNOWN, .stages = NriStageBits_NONE}
Presenting:
    after = {.access = NriAccessBits_UNKNOWN, .layout = NriLayout_PRESENT, .stages = <needed stages>}

DETAILS:

- NRI: set of booleans converted to bit field in "DeviceDesc"
- NRI: exposed "isMeshShaderPipelineStatsSupported" in "DeviceDesc"
- NRI: clarified usage of "PipelineStatisticsDesc"
- NRI: removed "DeviceDesc::isAPIValidationEnabled"
- NRI: "SPIRVBindingOffsets" moved to DeviceCreation ext
- D3D12/VK: access bits of "{UNKNOWN, PRESENT}" barrier get silently patched to "COMMON/MEMORY_READ" for D3D12/VK
- D3D12: enhanced barriers: AccessBits::UNKNOWN = D3D12_BARRIER_ACCESS_NO_ACCESS, Layout::UNKNOWN = D3D12_BARRIER_LAYOUT_UNDEFINED
- D3D12: "D3D12_QUERY_DATA_PIPELINE_STATISTICS1" usage moved under "NRI_USE_AGILITY_SDK" macro
- VK: rewritten initialization (with bug fixes)
- Helper: removed "before" state in "(Texture/Buffer)UploadDesc"
- WrapperVK: reworked "DeviceCreationVKDesc" and added "enabledExtensions"
- deleted outdated programming guide
- updated NVAPI
- updated README
- polishing
  • Loading branch information
dzhdanNV committed Feb 20, 2024
1 parent d8170ec commit 0abe7cc
Show file tree
Hide file tree
Showing 28 changed files with 749 additions and 1,952 deletions.
10 changes: 9 additions & 1 deletion Include/Extensions/NRIDeviceCreation.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,14 @@ NRI_STRUCT(CallbackInterface)
void* userArg;
};

NRI_STRUCT(SPIRVBindingOffsets)
{
uint32_t samplerOffset;
uint32_t textureOffset;
uint32_t constantBufferOffset;
uint32_t storageTextureAndBufferOffset;
};

NRI_STRUCT(VulkanExtensions)
{
const char* const* instanceExtensions;
Expand All @@ -43,9 +51,9 @@ NRI_STRUCT(DeviceCreationDesc)
const NRI_NAME(AdapterDesc)* adapterDesc;
NRI_NAME(CallbackInterface) callbackInterface;
NRI_NAME(MemoryAllocatorInterface) memoryAllocatorInterface;
NRI_NAME(GraphicsAPI) graphicsAPI;
NRI_NAME(SPIRVBindingOffsets) spirvBindingOffsets;
NRI_NAME(VulkanExtensions) vulkanExtensions;
NRI_NAME(GraphicsAPI) graphicsAPI;
bool enableNRIValidation;
bool enableAPIValidation;
bool enableMGPU;
Expand Down
2 changes: 0 additions & 2 deletions Include/Extensions/NRIHelper.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ NRI_STRUCT(TextureUploadDesc)
{
const NRI_NAME(TextureSubresourceUploadDesc)* subresources; // must include ALL subresources = arraySize * mipNum
NRI_NAME(Texture)* texture;
NRI_NAME(AccessLayoutStage) before;
NRI_NAME(AccessLayoutStage) after;
};

Expand All @@ -34,7 +33,6 @@ NRI_STRUCT(BufferUploadDesc)
uint64_t dataSize;
NRI_NAME(Buffer)* buffer;
uint64_t bufferOffset;
NRI_NAME(AccessStage) before;
NRI_NAME(AccessStage) after;
};

Expand Down
8 changes: 4 additions & 4 deletions Include/Extensions/NRIWrapperVK.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,17 @@ typedef void* NRIVkCommandBuffer;

NRI_STRUCT(DeviceCreationVKDesc)
{
NRI_NAME(CallbackInterface) callbackInterface;
NRI_NAME(MemoryAllocatorInterface) memoryAllocatorInterface;
NRI_NAME(SPIRVBindingOffsets) spirvBindingOffsets;
NRI_NAME(VulkanExtensions) enabledExtensions;
NRIVkInstance vkInstance;
NRIVkDevice vkDevice;
const NRIVkPhysicalDevice* vkPhysicalDevices;
uint32_t deviceGroupSize;
const uint32_t* queueFamilyIndices;
uint32_t queueFamilyIndexNum;
NRI_NAME(CallbackInterface) callbackInterface;
NRI_NAME(MemoryAllocatorInterface) memoryAllocatorInterface;
NRI_NAME(SPIRVBindingOffsets) spirvBindingOffsets;
const char* vulkanLoaderPath;
bool enableNRIValidation;
};

NRI_STRUCT(CommandQueueVKDesc)
Expand Down
4 changes: 2 additions & 2 deletions Include/NRI.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ Non-goals:
#include <stddef.h>

#define NRI_VERSION_MAJOR 1
#define NRI_VERSION_MINOR 120
#define NRI_VERSION_DATE "12 February 2024"
#define NRI_VERSION_MINOR 121
#define NRI_VERSION_DATE "20 February 2024"

#ifdef _WIN32
#define NRI_CALL __fastcall
Expand Down
38 changes: 15 additions & 23 deletions Include/NRIDescs.h
Original file line number Diff line number Diff line change
Expand Up @@ -307,14 +307,6 @@ NRI_STRUCT(SamplePosition)
int8_t x, y;
};

NRI_STRUCT(SPIRVBindingOffsets)
{
uint32_t samplerOffset;
uint32_t textureOffset;
uint32_t constantBufferOffset;
uint32_t storageTextureAndBufferOffset;
};

#pragma endregion

//===============================================================================================================================
Expand Down Expand Up @@ -1288,11 +1280,11 @@ NRI_STRUCT(PipelineStatisticsDesc)
uint64_t tessEvaluationShaderInvocationNum;
uint64_t computeShaderInvocationNum;

// If "isMeshShadersSupported" or D3D12
// If "isMeshShaderPipelineStatsSupported"
uint64_t meshControlShaderInvocationNum;
uint64_t meshEvaluationShaderInvocationNum;

// If D3D12
// If "isMeshShaderPipelineStatsSupported" and D3D12
uint64_t meshEvaluationShaderPrimitiveNum;
};

Expand Down Expand Up @@ -1455,19 +1447,19 @@ NRI_STRUCT(DeviceDesc)
uint8_t nodeNum;

// Features support
bool isAPIValidationEnabled;
bool isTextureFilterMinMaxSupported;
bool isLogicOpSupported;
bool isDepthBoundsTestSupported;
bool isProgrammableSampleLocationsSupported;
bool isComputeQueueSupported;
bool isCopyQueueSupported;
bool isCopyQueueTimestampSupported;
bool isRegisterAliasingSupported;
bool isSubsetAllocationSupported;
bool isFloat16Supported;
bool isRaytracingSupported;
bool isMeshShaderSupported;
uint32_t isTextureFilterMinMaxSupported : 1;
uint32_t isLogicOpSupported : 1;
uint32_t isDepthBoundsTestSupported : 1;
uint32_t isProgrammableSampleLocationsSupported : 1;
uint32_t isComputeQueueSupported : 1;
uint32_t isCopyQueueSupported : 1;
uint32_t isCopyQueueTimestampSupported : 1;
uint32_t isRegisterAliasingSupported : 1;
uint32_t isSubsetAllocationSupported : 1;
uint32_t isFloat16Supported : 1;
uint32_t isRaytracingSupported : 1;
uint32_t isMeshShaderSupported : 1;
uint32_t isMeshShaderPipelineStatsSupported : 1;
};

#pragma endregion
Expand Down
Loading

0 comments on commit 0abe7cc

Please sign in to comment.