Skip to content

Commit

Permalink
RSN: updated RenderDeviceInfo parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
TheMostDiligent committed Apr 15, 2023
1 parent 1b9cfeb commit 42f2b31
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 2 deletions.
1 change: 1 addition & 0 deletions RenderStateNotation/scripts/cxx_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
"ShaderResourceDesc",
"ShaderCreateInfo",

"RenderDeviceShaderVersionInfo",
"RenderDeviceInfo",
"GraphicsAdapterInfo",
"DeviceFeatures",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,23 @@
"NDC": {
"MinZ": -1.0
},
"Type": "VULKAN"
"Type": "VULKAN",
"MaxShaderVersion": {
"HLSL": {
"Major": 3,
"Minor": 4
},
"GLSL": {
"Major": 5,
"Minor": 6
},
"GLESSL": {
"Major": 7,
"Minor": 8
},
"MSL": {
"Major": 9,
"Minor": 10
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ TEST(Tools_RenderStateNotationParser, ParseNDCAttribs)

TEST(Tools_RenderStateNotationParser, ParseRenderDeviceInfo)
{
CHECK_STRUCT_SIZE(RenderDeviceInfo, 68);
CHECK_STRUCT_SIZE(RenderDeviceInfo, 100);

DynamicLinearAllocator Allocator{DefaultRawMemoryAllocator::GetAllocator()};

Expand All @@ -314,6 +314,10 @@ TEST(Tools_RenderStateNotationParser, ParseRenderDeviceInfo)
DescReference.NDC.MinZ = -1.0f;
DescReference.Type = RENDER_DEVICE_TYPE_VULKAN;
DescReference.Features.BinaryOcclusionQueries = DEVICE_FEATURE_STATE_ENABLED;
DescReference.MaxShaderVersion.HLSL = {3, 4};
DescReference.MaxShaderVersion.GLSL = {5, 6};
DescReference.MaxShaderVersion.GLESSL = {7, 8};
DescReference.MaxShaderVersion.MSL = {9, 10};

RenderDeviceInfo Desc{};
ParseRSN(JsonReference, Desc, Allocator);
Expand Down

0 comments on commit 42f2b31

Please sign in to comment.