Skip to content

Commit

Permalink
v1.143:
Browse files Browse the repository at this point in the history
HIGHLIGHTS:
- NRI: added shading rate support (aka VRS) for all GAPIs, including D3D11
- bug fixes and improvements

BREAKING_CHANGES:
- "DEPTH_STENCIL" in "Layout" and "Access" renamed to "DEPTH_STENCIL_ATTACHMENT" to emphasize the stage

DETAILS:
- D3D11/D3D12/VK/Validation: added shading rate support
- D3D11: fixed 0 values potentially sneaking into internally used "m_SubresourceInfo"
- D3D11: fixed "ForcedSampleCount" usage
- D3D11/D3D12: improved NVAPI usage and fixed some bugs
- VK: hooked up "VK_EXT_image_sliced_view_of_3d"
- VK: implemented read-only depth and/or stencil
- VK: 3D textures get created with "VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT" flag for flexibility and compatibility
- Validation: reduced code entropy
- added ".clang-format-ignore"
- updated docs
  • Loading branch information
dzhdanNV committed Aug 29, 2024
1 parent 1791bd8 commit 5f7fd91
Show file tree
Hide file tree
Showing 62 changed files with 1,605 additions and 1,155 deletions.
1 change: 1 addition & 0 deletions .clang-format-ignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
External/*
1 change: 1 addition & 0 deletions Include/Extensions/NRIMeshShader.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ NRI_STRUCT(DrawMeshTasksDesc)

NRI_STRUCT(MeshShaderInterface)
{
// Draw
void (NRI_CALL *CmdDrawMeshTasks)(NRI_NAME_REF(CommandBuffer) commandBuffer, const NRI_NAME_REF(DrawMeshTasksDesc) drawMeshTasksDesc);
void (NRI_CALL *CmdDrawMeshTasksIndirect)(NRI_NAME_REF(CommandBuffer) commandBuffer, const NRI_NAME_REF(Buffer) buffer, uint64_t offset, uint32_t drawNum, uint32_t stride); // buffer contains "DrawMeshTasksDesc" commands
};
Expand Down
10 changes: 5 additions & 5 deletions Include/Extensions/NRIRayTracing.h
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ NRI_STRUCT(RayTracingInterface)
// Shader table
NRI_NAME(Result) (NRI_CALL *WriteShaderGroupIdentifiers)(const NRI_NAME_REF(Pipeline) pipeline, uint32_t baseShaderGroupIndex, uint32_t shaderGroupNum, void* buffer); // TODO: add stride

// Command buffer
// Compute
void (NRI_CALL *CmdBuildTopLevelAccelerationStructure)(NRI_NAME_REF(CommandBuffer) commandBuffer, uint32_t instanceNum, const NRI_NAME_REF(Buffer) buffer, uint64_t bufferOffset,
NRI_NAME(AccelerationStructureBuildBits) flags, NRI_NAME_REF(AccelerationStructure) dst, NRI_NAME_REF(Buffer) scratch, uint64_t scratchOffset);
void (NRI_CALL *CmdBuildBottomLevelAccelerationStructure)(NRI_NAME_REF(CommandBuffer) commandBuffer, uint32_t geometryObjectNum, const NRI_NAME(GeometryObject)* geometryObjects,
Expand All @@ -227,13 +227,13 @@ NRI_STRUCT(RayTracingInterface)
void (NRI_CALL *CmdUpdateBottomLevelAccelerationStructure)(NRI_NAME_REF(CommandBuffer) commandBuffer, uint32_t geometryObjectNum, const NRI_NAME(GeometryObject)* geometryObjects,
NRI_NAME(AccelerationStructureBuildBits) flags, NRI_NAME_REF(AccelerationStructure) dst, NRI_NAME_REF(AccelerationStructure) src, NRI_NAME_REF(Buffer) scratch, uint64_t scratchOffset);

void (NRI_CALL *CmdCopyAccelerationStructure)(NRI_NAME_REF(CommandBuffer) commandBuffer, NRI_NAME_REF(AccelerationStructure) dst, NRI_NAME_REF(AccelerationStructure) src, NRI_NAME(CopyMode) copyMode);
void (NRI_CALL *CmdWriteAccelerationStructureSize)(NRI_NAME_REF(CommandBuffer) commandBuffer, const NRI_NAME(AccelerationStructure)* const* accelerationStructures, uint32_t accelerationStructureNum,
NRI_NAME_REF(QueryPool) queryPool, uint32_t queryPoolOffset);

void (NRI_CALL *CmdDispatchRays)(NRI_NAME_REF(CommandBuffer) commandBuffer, const NRI_NAME_REF(DispatchRaysDesc) dispatchRaysDesc);
void (NRI_CALL *CmdDispatchRaysIndirect)(NRI_NAME_REF(CommandBuffer) commandBuffer, const NRI_NAME_REF(Buffer) buffer, uint64_t offset); // buffer contains "DispatchRaysIndirectDesc" commands

// Copy
void (NRI_CALL *CmdCopyAccelerationStructure)(NRI_NAME_REF(CommandBuffer) commandBuffer, NRI_NAME_REF(AccelerationStructure) dst, NRI_NAME_REF(AccelerationStructure) src, NRI_NAME(CopyMode) copyMode);
void (NRI_CALL *CmdWriteAccelerationStructureSize)(NRI_NAME_REF(CommandBuffer) commandBuffer, const NRI_NAME(AccelerationStructure)* const* accelerationStructures, uint32_t accelerationStructureNum, NRI_NAME_REF(QueryPool) queryPool, uint32_t queryPoolOffset);

// Debug name
void (NRI_CALL *SetAccelerationStructureDebugName)(NRI_NAME_REF(AccelerationStructure) accelerationStructure, const char* name);

Expand Down
36 changes: 17 additions & 19 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 142
#define NRI_VERSION_DATE "26 August 2024"
#define NRI_VERSION_MINOR 143
#define NRI_VERSION_DATE "29 August 2024"

#ifdef _WIN32
#define NRI_CALL __fastcall
Expand Down Expand Up @@ -116,32 +116,30 @@ NRI_STRUCT(CoreInterface)
void (NRI_CALL *CmdSetPipeline)(NRI_NAME_REF(CommandBuffer) commandBuffer, const NRI_NAME_REF(Pipeline) pipeline);
void (NRI_CALL *CmdSetConstants)(NRI_NAME_REF(CommandBuffer) commandBuffer, uint32_t pushConstantIndex, const void* data, uint32_t size);

// Barrier (can be used inside "Graphics" with limited functionality)
// Barrier
void (NRI_CALL *CmdBarrier)(NRI_NAME_REF(CommandBuffer) commandBuffer, const NRI_NAME_REF(BarrierGroupDesc) barrierGroupDesc);

// Mandatory state, if enabled (can be set only once)
// Interacts with PSL enabled pipelines. Affects any depth-stencil operations, including clear and copy
// Input assembly
void (NRI_CALL *CmdSetIndexBuffer)(NRI_NAME_REF(CommandBuffer) commandBuffer, const NRI_NAME_REF(Buffer) buffer, uint64_t offset, NRI_NAME(IndexType) indexType);
void (NRI_CALL *CmdSetVertexBuffers)(NRI_NAME_REF(CommandBuffer) commandBuffer, uint32_t baseSlot, uint32_t bufferNum, const NRI_NAME(Buffer)* const* buffers, const uint64_t* offsets);

// Mandatory state for "Graphics"
void (NRI_CALL *CmdSetViewports)(NRI_NAME_REF(CommandBuffer) commandBuffer, const NRI_NAME(Viewport)* viewports, uint32_t viewportNum);
void (NRI_CALL *CmdSetScissors)(NRI_NAME_REF(CommandBuffer) commandBuffer, const NRI_NAME(Rect)* rects, uint32_t rectNum);

// Mandatory state for "Graphics", if enabled in the pipeline (since this state is global in D3D11/D3D12 better treat it as global)
void (NRI_CALL *CmdSetStencilReference)(NRI_NAME_REF(CommandBuffer) commandBuffer, uint8_t frontRef, uint8_t backRef); // "backRef" requires "isIndependentFrontAndBackStencilReferenceAndMasksSupported"
void (NRI_CALL *CmdSetDepthBounds)(NRI_NAME_REF(CommandBuffer) commandBuffer, float boundsMin, float boundsMax);
void (NRI_CALL *CmdSetBlendConstants)(NRI_NAME_REF(CommandBuffer) commandBuffer, const NRI_NAME_REF(Color32f) color);
void (NRI_CALL *CmdSetSamplePositions)(NRI_NAME_REF(CommandBuffer) commandBuffer, const NRI_NAME(SamplePosition)* positions, NRI_NAME(Sample_t) positionNum, NRI_NAME(Sample_t) sampleNum);
void (NRI_CALL *CmdSetShadingRate)(NRI_NAME_REF(CommandBuffer) commandBuffer, const NRI_NAME_REF(ShadingRateDesc) shadingRateDesc);

// Graphics
void (NRI_CALL *CmdBeginRendering)(NRI_NAME_REF(CommandBuffer) commandBuffer, const NRI_NAME_REF(AttachmentsDesc) attachmentsDesc);
// {
// Fast clear
void (NRI_CALL *CmdClearAttachments)(NRI_NAME_REF(CommandBuffer) commandBuffer, const NRI_NAME(ClearDesc)* clearDescs, uint32_t clearDescNum, const NRI_NAME(Rect)* rects, uint32_t rectNum);

// Mandatory state (can be set only once)
void (NRI_CALL *CmdSetViewports)(NRI_NAME_REF(CommandBuffer) commandBuffer, const NRI_NAME(Viewport)* viewports, uint32_t viewportNum);
void (NRI_CALL *CmdSetScissors)(NRI_NAME_REF(CommandBuffer) commandBuffer, const NRI_NAME(Rect)* rects, uint32_t rectNum);

// Mandatory state, if enabled (can be set only once)
void (NRI_CALL *CmdSetStencilReference)(NRI_NAME_REF(CommandBuffer) commandBuffer, uint8_t frontRef, uint8_t backRef); // "backRef" requires "isIndependentFrontAndBackStencilReferenceAndMasksSupported"
void (NRI_CALL *CmdSetDepthBounds)(NRI_NAME_REF(CommandBuffer) commandBuffer, float boundsMin, float boundsMax);
void (NRI_CALL *CmdSetBlendConstants)(NRI_NAME_REF(CommandBuffer) commandBuffer, const NRI_NAME_REF(Color32f) color);

// Input assembly
void (NRI_CALL *CmdSetIndexBuffer)(NRI_NAME_REF(CommandBuffer) commandBuffer, const NRI_NAME_REF(Buffer) buffer, uint64_t offset, NRI_NAME(IndexType) indexType);
void (NRI_CALL *CmdSetVertexBuffers)(NRI_NAME_REF(CommandBuffer) commandBuffer, uint32_t baseSlot, uint32_t bufferNum, const NRI_NAME(Buffer)* const* buffers, const uint64_t* offsets);

// Draw
void (NRI_CALL *CmdDraw)(NRI_NAME_REF(CommandBuffer) commandBuffer, const NRI_NAME_REF(DrawDesc) drawDesc);
void (NRI_CALL *CmdDrawIndexed)(NRI_NAME_REF(CommandBuffer) commandBuffer, const NRI_NAME_REF(DrawIndexedDesc) drawIndexedDesc);
Expand All @@ -166,7 +164,7 @@ NRI_STRUCT(CoreInterface)
void (NRI_CALL *CmdUploadBufferToTexture)(NRI_NAME_REF(CommandBuffer) commandBuffer, NRI_NAME_REF(Texture) dstTexture, const NRI_NAME_REF(TextureRegionDesc) dstRegionDesc, const NRI_NAME_REF(Buffer) srcBuffer, const NRI_NAME_REF(TextureDataLayoutDesc) srcDataLayoutDesc);
void (NRI_CALL *CmdReadbackTextureToBuffer)(NRI_NAME_REF(CommandBuffer) commandBuffer, NRI_NAME_REF(Buffer) dstBuffer, NRI_NAME_REF(TextureDataLayoutDesc) dstDataLayoutDesc, const NRI_NAME_REF(Texture) srcTexture, const NRI_NAME_REF(TextureRegionDesc) srcRegionDesc);

// Clear storage (slow clear)
// Clear storage (potentially slow clear)
void (NRI_CALL *CmdClearStorageBuffer)(NRI_NAME_REF(CommandBuffer) commandBuffer, const NRI_NAME_REF(ClearStorageBufferDesc) clearDesc);
void (NRI_CALL *CmdClearStorageTexture)(NRI_NAME_REF(CommandBuffer) commandBuffer, const NRI_NAME_REF(ClearStorageTextureDesc) clearDesc);

Expand Down
3 changes: 3 additions & 0 deletions Include/NRICompatibility.hlsli
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,9 @@ Draw parameters:
NRI_BUFFER_WRITE(buffer, cmdIndex * 7, 5, baseVertex); \
NRI_BUFFER_WRITE(buffer, cmdIndex * 7, 6, baseInstance)

// Shading rate
#define NRI_SHADING_RATE(xLogSize, yLogSize) ((xLogSize << 2) | yLogSize)

// SPIRV
#ifdef NRI_SPIRV
#define NRI_RESOURCE(resourceType, name, regName, bindingIndex, setIndex) \
Expand Down
115 changes: 85 additions & 30 deletions Include/NRIDescs.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ NRI_ENUM
// Plain: 8 bits per channel
R8_UNORM, // + + + - + - + + + -
R8_SNORM, // + + + - + - + + + -
R8_UINT, // + + + - - - + + + -
R8_UINT, // + + + - - - + + + - // SHADING_RATE compatible
R8_SINT, // + + + - - - + + + -

RG8_UNORM, // + + + - + - + + + -
Expand Down Expand Up @@ -381,6 +381,7 @@ NRI_ENUM
SHADER_RESOURCE_STORAGE_2D_ARRAY,
COLOR_ATTACHMENT,
DEPTH_STENCIL_ATTACHMENT,
SHADING_RATE_ATTACHMENT,

MAX_NUM
);
Expand Down Expand Up @@ -432,7 +433,8 @@ NRI_ENUM_BITS
SHADER_RESOURCE = NRI_SET_BIT(0),
SHADER_RESOURCE_STORAGE = NRI_SET_BIT(1),
COLOR_ATTACHMENT = NRI_SET_BIT(2),
DEPTH_STENCIL_ATTACHMENT = NRI_SET_BIT(3)
DEPTH_STENCIL_ATTACHMENT = NRI_SET_BIT(3),
SHADING_RATE_ATTACHMENT = NRI_SET_BIT(4)
);

NRI_ENUM_BITS
Expand All @@ -454,6 +456,7 @@ NRI_ENUM_BITS
(
ResourceViewBits, uint8_t,

NONE = 0,
READONLY_DEPTH = NRI_SET_BIT(0),
READONLY_STENCIL = NRI_SET_BIT(1)
);
Expand Down Expand Up @@ -513,7 +516,6 @@ NRI_STRUCT(Texture3DViewDesc)
NRI_NAME(Mip_t) mipNum;
NRI_NAME(Dim_t) sliceOffset;
NRI_NAME(Dim_t) sliceNum;
NRI_NAME(ResourceViewBits) flags;
};

NRI_STRUCT(BufferViewDesc)
Expand Down Expand Up @@ -718,6 +720,34 @@ NRI_ENUM
MAX_NUM
);

NRI_ENUM
(
ShadingRate, uint8_t,

_1x1,
_1x2,
_2x1,
_2x2,
_2x4,
_4x2,
_4x4,

MAX_NUM
);

NRI_ENUM
(
ShadingRateCombiner, uint8_t,

REPLACE,
KEEP,
MIN,
MAX,
SUM,

MAX_NUM
);

NRI_STRUCT(RasterizationDesc)
{
uint32_t viewportNum;
Expand All @@ -728,16 +758,32 @@ NRI_STRUCT(RasterizationDesc)
NRI_NAME(CullMode) cullMode;
bool frontCounterClockwise;
bool depthClamp;
bool antialiasedLines; // Requires "isLineSmoothingSupported"
bool conservativeRasterization; // Requires "conservativeRasterTier > 0"

// Requires "isLineSmoothingSupported"
bool antialiasedLines;

// Requires "conservativeRasterTier > 0"
bool conservativeRasterization;

// Requires "is[Pipeline/Primitive/Attachment]ShadingRateSupported", expects "CmdSetShadingRate" and optionally "AttachmentsDesc::shadingRate"
bool shadingRate;
};

NRI_STRUCT(MultisampleDesc)
{
uint32_t sampleMask;
NRI_NAME(Sample_t) sampleNum;
bool alphaToCoverage;
bool programmableSampleLocations; // Requires "isProgrammableSampleLocationsSupported"

// Requires "isProgrammableSampleLocationsSupported", expects "CmdSetSamplePositions"
bool programmableSampleLocations;
};

NRI_STRUCT(ShadingRateDesc)
{
NRI_NAME(ShadingRate) shadingRate;
NRI_NAME(ShadingRateCombiner) primitiveCombiner;
NRI_NAME(ShadingRateCombiner) attachmentCombiner;
};

#pragma endregion
Expand All @@ -749,11 +795,11 @@ NRI_STRUCT(MultisampleDesc)

NRI_ENUM
(
// Requires "isLogicOpSupported"
LogicFunc, uint8_t,

NONE,

// Requires "isLogicOpSupported"
// S - source color 0
// D - destination color

Expand Down Expand Up @@ -940,13 +986,17 @@ NRI_STRUCT(DepthAttachmentDesc)
{
NRI_NAME(CompareFunc) compareFunc;
bool write;
bool boundsTest; // Requires "isDepthBoundsTestSupported", expects "CmdSetDepthBounds"

// Requires "isDepthBoundsTestSupported", expects "CmdSetDepthBounds"
bool boundsTest;
};

NRI_STRUCT(StencilAttachmentDesc)
{
NRI_NAME(StencilDesc) front;
NRI_NAME(StencilDesc) back; // "back.writeMask" requires "isIndependentFrontAndBackStencilReferenceAndMasksSupported"

// Requires "isIndependentFrontAndBackStencilReferenceAndMasksSupported" for "back.writeMask"
NRI_NAME(StencilDesc) back;
};

NRI_STRUCT(OutputMergerDesc)
Expand All @@ -962,6 +1012,7 @@ NRI_STRUCT(OutputMergerDesc)
NRI_STRUCT(AttachmentsDesc)
{
NRI_OPTIONAL const NRI_NAME(Descriptor)* depthStencil;
NRI_OPTIONAL const NRI_NAME(Descriptor)* shadingRate;
const NRI_NAME(Descriptor)* const* colors;
uint32_t colorNum;
};
Expand Down Expand Up @@ -999,11 +1050,10 @@ NRI_ENUM

NRI_ENUM
(
// Requires "isTextureFilterMinMaxSupported"
FilterExt, uint8_t,

NONE,

// Requires "isTextureFilterMinMaxSupported"
MIN,
MAX,

Expand Down Expand Up @@ -1091,36 +1141,37 @@ NRI_ENUM

UNKNOWN,
COLOR_ATTACHMENT,
DEPTH_STENCIL,
DEPTH_STENCIL_READONLY,
DEPTH_STENCIL_ATTACHMENT,
DEPTH_STENCIL_READONLY, // attachment or shader resource
SHADER_RESOURCE,
SHADER_RESOURCE_STORAGE,
COPY_SOURCE,
COPY_DESTINATION,
PRESENT,
SHADING_RATE_ATTACHMENT,

MAX_NUM
);

NRI_ENUM_BITS
(
AccessBits, uint16_t, // Compatible "StageBits" (including ALL):

UNKNOWN = 0,
INDEX_BUFFER = NRI_SET_BIT(0), // INDEX_INPUT
VERTEX_BUFFER = NRI_SET_BIT(1), // VERTEX_SHADER
CONSTANT_BUFFER = NRI_SET_BIT(2), // GRAPHICS_SHADERS, COMPUTE_SHADER, RAY_TRACING_SHADERS
SHADER_RESOURCE = NRI_SET_BIT(3), // GRAPHICS_SHADERS, COMPUTE_SHADER, RAY_TRACING_SHADERS
SHADER_RESOURCE_STORAGE = NRI_SET_BIT(4), // GRAPHICS_SHADERS, COMPUTE_SHADER, RAY_TRACING_SHADERS, CLEAR_STORAGE
ARGUMENT_BUFFER = NRI_SET_BIT(5), // INDIRECT
COLOR_ATTACHMENT = NRI_SET_BIT(6), // COLOR_ATTACHMENT
DEPTH_STENCIL_WRITE = NRI_SET_BIT(7), // DEPTH_STENCIL_ATTACHMENT
DEPTH_STENCIL_READ = NRI_SET_BIT(8), // DEPTH_STENCIL_ATTACHMENT
COPY_SOURCE = NRI_SET_BIT(9), // COPY
COPY_DESTINATION = NRI_SET_BIT(10), // COPY
ACCELERATION_STRUCTURE_READ = NRI_SET_BIT(11), // COMPUTE_SHADER, RAY_TRACING_SHADERS, ACCELERATION_STRUCTURE
ACCELERATION_STRUCTURE_WRITE = NRI_SET_BIT(12), // COMPUTE_SHADER, RAY_TRACING_SHADERS, ACCELERATION_STRUCTURE
SHADING_RATE = NRI_SET_BIT(13) // FRAGMENT_SHADER // TODO: WIP
AccessBits, uint16_t, // Compatible "StageBits" (including ALL):

UNKNOWN = 0,
INDEX_BUFFER = NRI_SET_BIT(0), // INDEX_INPUT
VERTEX_BUFFER = NRI_SET_BIT(1), // VERTEX_SHADER
CONSTANT_BUFFER = NRI_SET_BIT(2), // GRAPHICS_SHADERS, COMPUTE_SHADER, RAY_TRACING_SHADERS
SHADER_RESOURCE = NRI_SET_BIT(3), // GRAPHICS_SHADERS, COMPUTE_SHADER, RAY_TRACING_SHADERS
SHADER_RESOURCE_STORAGE = NRI_SET_BIT(4), // GRAPHICS_SHADERS, COMPUTE_SHADER, RAY_TRACING_SHADERS, CLEAR_STORAGE
ARGUMENT_BUFFER = NRI_SET_BIT(5), // INDIRECT
COLOR_ATTACHMENT = NRI_SET_BIT(6), // COLOR_ATTACHMENT
DEPTH_STENCIL_ATTACHMENT_WRITE = NRI_SET_BIT(7), // DEPTH_STENCIL_ATTACHMENT
DEPTH_STENCIL_ATTACHMENT_READ = NRI_SET_BIT(8), // DEPTH_STENCIL_ATTACHMENT
COPY_SOURCE = NRI_SET_BIT(9), // COPY
COPY_DESTINATION = NRI_SET_BIT(10), // COPY
ACCELERATION_STRUCTURE_READ = NRI_SET_BIT(11), // COMPUTE_SHADER, RAY_TRACING_SHADERS, ACCELERATION_STRUCTURE
ACCELERATION_STRUCTURE_WRITE = NRI_SET_BIT(12), // COMPUTE_SHADER, RAY_TRACING_SHADERS, ACCELERATION_STRUCTURE
SHADING_RATE_ATTACHMENT = NRI_SET_BIT(13) // FRAGMENT_SHADER
);

NRI_STRUCT(AccessStage)
Expand Down Expand Up @@ -1566,6 +1617,7 @@ NRI_STRUCT(DeviceDesc)
uint32_t combinedClipAndCullDistanceMaxNum;
uint8_t conservativeRasterTier;
uint8_t programmableSampleLocationsTier;
uint8_t shadingRateAttachmentTileSize;

// Features
uint32_t isComputeQueueSupported : 1;
Expand All @@ -1582,6 +1634,9 @@ NRI_STRUCT(DeviceDesc)
uint32_t isMeshShaderPipelineStatsSupported : 1;
uint32_t isEnchancedBarrierSupported : 1; // aka - can "Layout" be ignored?
uint32_t isMemoryTier2Supported : 1; // a memory object can support resources from all 3 categories (buffers, attachments, all other textures)
uint32_t isPipelineShadingRateSupported : 1;
uint32_t isPrimitiveShadingRateSupported : 1;
uint32_t isAttachmentShadingRateSupported : 1;

// Shader features
uint32_t isShaderNativeI16Supported : 1;
Expand Down
2 changes: 1 addition & 1 deletion Resources/Version.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#define STR(x) STR_HELPER(x)

#define VERSION_MAJOR 1
#define VERSION_MINOR 142
#define VERSION_MINOR 143
#define VERSION_BUILD 0
#define VERSION_REVISION 0

Expand Down
4 changes: 2 additions & 2 deletions Source/D3D11/BufferD3D11.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ void* BufferD3D11::Map(uint64_t offset) {
D3D11_MAPPED_SUBRESOURCE mappedData = {};
HRESULT hr = m_Device.GetImmediateContext()->Map(m_Buffer, 0, map, 0, &mappedData);
if (FAILED(hr)) {
REPORT_ERROR(&m_Device, "ID3D11DeviceContext::Map() - FAILED!");
REPORT_ERROR(&m_Device, "ID3D11DeviceContext::Map() failed!");
return nullptr;
}

Expand All @@ -144,7 +144,7 @@ void* BufferD3D11::Map(uint64_t offset) {
hr = m_Device.GetImmediateContext()->Map(*m_ReadbackTexture, 0, D3D11_MAP_READ, 0, &srcData);
if (FAILED(hr)) {
m_Device.GetImmediateContext()->Unmap(m_Buffer, 0);
REPORT_ERROR(&m_Device, "ID3D11DeviceContext::Map() - FAILED!");
REPORT_ERROR(&m_Device, "ID3D11DeviceContext::Map() failed!");
return nullptr;
}

Expand Down
Loading

0 comments on commit 5f7fd91

Please sign in to comment.