Skip to content

Commit

Permalink
Merge branch 'pkristof/struct_alignment' into 'main'
Browse files Browse the repository at this point in the history
Fixed GPU struct alignment

See merge request lightspeedrtx/dxvk-remix-nv!885
  • Loading branch information
pkristof committed Jul 1, 2024
2 parents d42dbe6 + 41cf4b3 commit 3c41a66
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 15 deletions.
10 changes: 8 additions & 2 deletions src/dxvk/imgui/dxvk_imgui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2712,8 +2712,14 @@ namespace dxvk {
ImGui::Checkbox("Enable ReSTIR GI", &RtxOptions::Get()->useReSTIRGIObject());

ImGui::PushID("ReSTIR GI");
auto& restirGI = common->metaReSTIRGIRayQuery();
restirGI.showImguiSettings();
if (ImGui::CollapsingHeader("Settings", collapsingHeaderClosedFlags)) {
ImGui::Indent();

auto& restirGI = common->metaReSTIRGIRayQuery();
restirGI.showImguiSettings();

ImGui::Unindent();
}
ImGui::PopID();
ImGui::Unindent();
}
Expand Down
5 changes: 4 additions & 1 deletion src/dxvk/rtx_render/rtx_context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1223,11 +1223,14 @@ namespace dxvk {

void RtxContext::dispatchIntegrate(const Resources::RaytracingOutput& rtOutput) {
ScopedGpuProfileZone(this, "Integrate Raytracing");


// Integrate direct
m_common->metaPathtracerIntegrateDirect().dispatch(this, rtOutput);

// RTXDI Gradient pass
m_common->metaRtxdiRayQuery().dispatchGradient(this, rtOutput);

// Integrate indirect
m_common->metaPathtracerIntegrateIndirect().dispatch(this, rtOutput);
m_common->metaPathtracerIntegrateIndirect().dispatchNEE(this, rtOutput);
}
Expand Down
2 changes: 1 addition & 1 deletion src/dxvk/rtx_render/rtx_debug_view.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ namespace dxvk {

{DEBUG_VIEW_MATERIAL_TYPE, "Material Type"},
{DEBUG_VIEW_ALBEDO, "Diffuse Albedo"},
{DEBUG_VIEW_RAW_ALBEDO, "Diffuse Raw Albedo (RGS only)"},
{DEBUG_VIEW_RAW_ALBEDO, "Diffuse Raw Albedo (RGS only)"},
{DEBUG_VIEW_OPAQUE_RAW_ALBEDO_RESOLUTION_CHECKERS, "Opaque Material Raw Albedo + Texture Resolution Checkers (RGS only)",
"Parameterize via:\n"
"Debug Knob [0]: num texels per checker box [Default: 64]\n"
Expand Down
2 changes: 1 addition & 1 deletion src/dxvk/rtx_render/rtx_rtxdi_rayquery.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ namespace dxvk {

void DxvkRtxdiRayQuery::dispatchConfidence(RtxContext* ctx, const Resources::RaytracingOutput& rtOutput) {

if (!RtxOptions::Get()->useRTXDI() ||
if (!RtxOptions::Get()->useRTXDI() ||
!getEnableDenoiserConfidence()) {
return;
}
Expand Down
4 changes: 2 additions & 2 deletions src/dxvk/shaders/rtx/algorithm/integrator_direct.slangh
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ void calculateRussianRouletteOnFirstBounce(
throughput = 0;
}
else
{
{
// Note: Factor the probability of continuing the path into the throughput. This causes odd brightness
// in denoising when the continue probability is very low, but this math has been validated to be
// correct as far as I can tell.
Expand Down Expand Up @@ -219,7 +219,7 @@ void sampleIndirectRayForFirstBounce(
// Note: Opacity on opaque objects treated as a specular lobe as it should be filtered like a reflection (not blurred).
firstSampledLobeIsSpecular = firstRayPathSampledLobe != opaqueLobeTypeDiffuseReflection;
}

// Apply Russian Roulette prior to checking this ray path being valid to integrate
calculateRussianRouletteOnFirstBounce(randomState, throughput, firstSampledSolidAnglePdf);
}
Expand Down
2 changes: 1 addition & 1 deletion src/dxvk/shaders/rtx/algorithm/integrator_indirect.slangh
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ void integratePathVertex(
}
accumulateRadiance(pathState, emissiveLight * misWeight);
pathState.segmentHitDistance = 0.0;

// We don't need to sample lights or surface rays in the portal closest hit shader
#if (SURFACE_MATERIAL_RESOLVE_TYPE_ACTIVE_MASK & SURFACE_MATERIAL_RESOLVE_TYPE_RAY_PORTAL) != 0
if (materialType == surfaceMaterialTypeOpaque || materialType == surfaceMaterialTypeTranslucent)
Expand Down
6 changes: 3 additions & 3 deletions src/dxvk/shaders/rtx/pass/post_fx/post_fx.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,15 @@ struct PostFxArgs {
// Post Fx Attributes
// Motion Blur
uint motionBlurSampleCount;
float exposureFraction;
float blurDiameterFraction;
bool enableMotionBlurNoiseSample;

float motionBlurMinimumVelocityThresholdInPixel;

// Chromatic Aberration
float2 chromaticAberrationScale;
float chromaticCenterAttenuationAmount;

float exposureFraction;

// Vignette
float vignetteIntensity;
float vignetteRadius;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,6 @@
struct RayReconstructionArgs {
Camera camera;

uint combineSpecularAlbedo;
uint useExternalExposure;
uint rayReconstructionUseVirtualNormals;

vec4 debugKnob;

uint enableDemodulateRoughness;
Expand All @@ -78,4 +74,9 @@ struct RayReconstructionArgs {
uint particleBufferMode;
uint enableDemodulateAttenuation;
uint filterHitT;

uint combineSpecularAlbedo;
uint useExternalExposure;
uint rayReconstructionUseVirtualNormals;
uint pad;
};

0 comments on commit 3c41a66

Please sign in to comment.