diff --git a/assets/benchmarks/shaders/Benchmark_RandomNoise.hlsl b/assets/benchmarks/shaders/Benchmark_RandomNoise.hlsl index 3e69939f1..666c5adcf 100644 --- a/assets/benchmarks/shaders/Benchmark_RandomNoise.hlsl +++ b/assets/benchmarks/shaders/Benchmark_RandomNoise.hlsl @@ -14,16 +14,6 @@ #include "VsOutput.hlsli" -// struct RandomParams -// { -// uint32_t Seed; -// }; - -// #if defined(__spirv__) -// [[vk::push_constant]] -// #endif -// ConstantBuffer Random : register(b0); - float random(float2 st, uint32_t seed) { float underOne = sin(float(seed) + 0.5f); float2 randomVector = float2(15.0f + underOne, 15.0f - underOne); diff --git a/assets/benchmarks/shaders/Benchmark_VsSimpleQuads.hlsl b/assets/benchmarks/shaders/Benchmark_VsSimpleQuads.hlsl index 64577312a..e90a2a17b 100644 --- a/assets/benchmarks/shaders/Benchmark_VsSimpleQuads.hlsl +++ b/assets/benchmarks/shaders/Benchmark_VsSimpleQuads.hlsl @@ -15,12 +15,12 @@ #include "VsOutput.hlsli" float randomCompute(uint32_t instCount, float4 Position) { - float ret = frac(sin(Position.x) + cos(Position.y)); - for (int i = 0; i < instCount; i++) { - ret = frac(sin(ret) + cos(ret)); + float randNum = frac(float(instCount) * 123.456f); + for (uint32_t i = 0; i < instCount; i++) { + Position.z += Position.x * (1 - randNum) + randNum * Position.y; } - return ret; + return frac(Position.z);; } VSOutputPos vsmain(float4 Position : POSITION) { diff --git a/benchmarks/graphics_pipeline/GraphicsBenchmarkApp.cpp b/benchmarks/graphics_pipeline/GraphicsBenchmarkApp.cpp index b7ab01b90..05a1119c6 100644 --- a/benchmarks/graphics_pipeline/GraphicsBenchmarkApp.cpp +++ b/benchmarks/graphics_pipeline/GraphicsBenchmarkApp.cpp @@ -193,7 +193,7 @@ void GraphicsBenchmarkApp::Config(ppx::ApplicationSettings& settings) #if defined(PPX_BUILD_XR) // XR specific settings settings.grfx.pacedFrameRate = 0; - settings.xr.enable = false; // Change this to true to enable the XR mode + settings.xr.enable = true; // Change this to true to enable the XR mode #endif settings.standardKnobsDefaultValue.enableMetrics = true; settings.standardKnobsDefaultValue.overwriteMetricsFile = true; @@ -814,10 +814,6 @@ void GraphicsBenchmarkApp::SetupFullscreenQuadsPipelines() piCreateInfo.sets[0].set = 0; piCreateInfo.sets[0].pLayout = mFullscreenQuads.descriptorSetLayout; - // piCreateInfo.pushConstants.count = (2 * sizeof(uint32_t) + sizeof(float3)) / 4; - // piCreateInfo.pushConstants.binding = 0; - // piCreateInfo.pushConstants.set = 0; - PPX_CHECKED_CALL(GetDevice()->CreatePipelineInterface(&piCreateInfo, &mQuadsPipelineInterfaces[2])); } @@ -1731,7 +1727,7 @@ void GraphicsBenchmarkApp::RecordCommandBufferFullscreenQuad(PerFrame& frame, si switch (pFullscreenQuadsType->GetValue()) { case FullscreenQuadsType::FULLSCREEN_QUADS_TYPE_NOISE: { uint32_t noiseQuadRandomSeed = (uint32_t)seed; - frame.cmd->PushGraphicsConstants(mQuadsPipelineInterfaces[0], sizeof(uint32_t) / 4, &noiseQuadRandomSeed, sizeof(uint32_t) / 4); + frame.cmd->PushGraphicsConstants(mQuadsPipelineInterfaces[0], sizeof(uint32_t) / sizeof(uint32_t), &noiseQuadRandomSeed, sizeof(uint32_t) / 4); break; } case FullscreenQuadsType::FULLSCREEN_QUADS_TYPE_SOLID_COLOR: { @@ -1748,11 +1744,10 @@ void GraphicsBenchmarkApp::RecordCommandBufferFullscreenQuad(PerFrame& frame, si } float3 colorValues = pFullscreenQuadsColor->GetValue(); colorValues *= intensity; - uint32_t inst = pKnobVsAluCount->GetValue(); - PPX_LOG_INFO("ALU instruction count " << inst); + uint32_t instCount = pKnobVsAluCount->GetValue(); - frame.cmd->PushGraphicsConstants(mQuadsPipelineInterfaces[1], sizeof(uint32_t) / 4, &inst, 0); - frame.cmd->PushGraphicsConstants(mQuadsPipelineInterfaces[1], sizeof(float3) / 4, &colorValues, 2 * sizeof(uint32_t) / 4); + frame.cmd->PushGraphicsConstants(mQuadsPipelineInterfaces[1], sizeof(uint32_t) / sizeof(uint32_t), &instCount, 0); + frame.cmd->PushGraphicsConstants(mQuadsPipelineInterfaces[1], sizeof(float3) / sizeof(uint32_t), &colorValues, 2 * sizeof(uint32_t) / sizeof(uint32_t)); break; } case FullscreenQuadsType::FULLSCREEN_QUADS_TYPE_TEXTURE: