DLSS 5 Neural Rendering for Images & Video with Frame Generation, RTX Video Super Resolution, HDR, and Color Grading
TypeScript ai-upscalingdlssdlss-5dlss5dlssgframe-generationframe-interpolationimage-enhancementimage-upscalingneural-renderingnvidianvidia-dlss-5nvidia-rtxrtx-videortx-video-super-resolutionvideo-enhancementvideo-upscaling
Add files via upload
Merserk029c5b005283
diff --git a/README.md b/README.mddeleted file mode 100644index c25770c..0000000--- a/README.md+++ /dev/null@@ -1,46 +0,0 @@-# DLSS 5 Video Converter (Experimental)--This Windows application renders every frame through the supplied DLSS 5 Neural Rendering feature-18 runtime and writes a new video with the original audio and metadata. Optical flow supplies only the current-to-previous motion vectors required by the model. No heuristic depth, masks, sharpening, denoising, resizing, DLAA, ReShade, or RenoDX stage modifies the image.--<img width="1411" height="368" alt="image" src="https://github.com/user-attachments/assets/fc5aceb8-c010-4bf0-be9e-f5e38b29fffa" />---# Original-https://github.com/user-attachments/assets/f27f61a3-cad3-4278-af66-eb11c54600fb--# DLSS 5-https://github.com/user-attachments/assets/d91591a9-2df1-4b4b-b18f-bd4dff73d5bc--## Start--Double-click `start.bat`. The portable Gradio interface opens at `http://127.0.0.1:7860`. No installation or internet connection is required.--1. Upload a video.-2. **Strong / Cinematic** is selected by default. Faithful and Natural remain available for a milder result.-3. Click **Render whole video**.-4. Download the video and its JSON report. Every output frame must carry an exact successful feature-18 result or the render is rejected.--Outputs and their JSON reports are written to the automatically created `outputs` directory. Temporary job data is removed after every completed, failed, or cancelled render. **Stop** terminates the decoder, DLSS worker, and encoder and removes incomplete output.--## GPU support--- RTX 40/50: primary support target.-- RTX 30: allowed in beta mode and may be extremely slow.-- RTX 20, non-RTX NVIDIA, AMD, and Intel GPUs: rejected for DLSS processing.--## Output and limitations--- Source resolution is always preserved. There is no pre-upscaling or DLSS Super Resolution pass.-- H.264 NVENC MP4 with AAC is the default. HEVC, AV1, and MKV are available when the GPU and container support them. H.264/HEVC fall back to software encoding when NVENC is unavailable.-- Variable timestamps are carried in a NUT stream to FFmpeg. The first video stream is processed; audio and metadata are remuxed, and MKV also preserves compatible subtitle streams.-- HDR preservation is disabled because the verified path is RGBA8. HDR files are handled as SDR rather than being incorrectly tagged as HDR.-- Optical-flow motion cannot equal engine-provided object motion. Fast motion, occlusions, thin objects, and cuts may show temporal artifacts.-- The supplied modified model is experimental. Its original snippet checks that its caller is named `nvngx.dll`, so the standalone executable intentionally uses that filename; it is not NVIDIA's NGX core DLL.--## Source layout--- `app.py` — Gradio interface.-- `dlss5_converter` — probing, optical-flow motion generation, D5V2 worker protocol, encoding, cancellation, and verification.-- `native/DLSS5-Feeder` — MIT reference host adapted with NVIDIA-adapter selection and video-frame transport.-- `native/NVIDIA-DLSS` — the NVIDIA NGX headers, required x64 import library, and license needed to rebuild the worker.-- `bin/runtime` — clean offline runtime containing only the standalone worker image and supplied DLSSNR model.diff --git a/app.py b/app.pyindex 32a834d..6571c54 100644--- a/app.py+++ b/app.py@@ -1,46 +1,217 @@from __future__ import annotations+import threadingimport traceback+from dataclasses import replacefrom pathlib import Pathimport gradio as gr+from PIL import Image-from dlss5_converter.core import (- ConversionOptions,+from src.images import (+ IMAGE_FORMATS,+ RAW_EXTENSIONS,+ ImageConversionOptions,+ convert_images,+ decode_image,+)+from src.runtime import (+ LOGS,OUTPUTS,cancel_active_job,+)+from src.settings import (+ CODEC_CHOICES,+ CONTAINER_CHOICES,+ DEFAULT_SETTINGS,+ QUALITY_CHOICES,+ UISettings,+ load_settings,+ save_settings,+)+from src.video import (+ ConversionOptions,+ NR_PRESETS,+ NR_STYLES,+ UPSCALING_CHOICES,convert_video,- detect_gpu,)-def gpu_banner() -> str:- try:- gpu = detect_gpu()- beta = " — RTX 30 beta mode" if gpu["beta"] else ""- return (- f"**Ready:** {gpu['name']} · driver {gpu['driver']} · "- f"{gpu['memory_mb'] // 1024} GB VRAM{beta}"+CONFIG_PATH = Path(__file__).resolve().with_name("config.ini")+PREVIEW_SECONDS = 3.0+_CONFIG_LOCK = threading.Lock()++APP_CSS = """+/* Keep large upload batches compact: roughly three file rows, then scroll. */+#image-upload-list .file-preview-holder {+ max-height: 210px !important;+ overflow-x: hidden !important;+ overflow-y: auto !important;+ overscroll-behavior: contain;+ scrollbar-gutter: stable;+}++#image-upload-list .file-preview {+ max-height: none !important;+}++/* A single input preview is a true 16:9 viewport containing the whole image. */+#image-input-preview:has(.gallery-item:only-child) {+ aspect-ratio: 16 / 9;+ height: auto !important;+ min-height: 0 !important;+}++#image-input-preview:has(.gallery-item:only-child) .gallery-container,+#image-input-preview:has(.gallery-item:only-child) .grid-wrap,+#image-input-preview:has(.gallery-item:only-child) .grid-container,+#image-input-preview:has(.gallery-item:only-child) .gallery-item,+#image-input-preview:has(.gallery-item:only-child) .thumbnail-lg {+ box-sizing: border-box;+ height: 100% !important;+ min-height: 0 !important;+}++#image-input-preview:has(.gallery-item:only-child) .grid-wrap {+ overflow: hidden !important;+}++#image-input-preview:has(.gallery-item:only-child) .grid-container {+ grid-template-rows: minmax(0, 1fr) !important;+ grid-auto-rows: minmax(0, 1fr) !important;+}++#image-input-preview:has(.gallery-item:only-child) img {+ height: 100% !important;+ width: 100% !important;+ object-fit: contain !important;+}+"""+++def _neural_values(settings: UISettings) -> tuple[str, str, float, float, float, float, float]:+ return (+ settings.nr_preset,+ settings.nr_style,+ settings.nr_intensity,+ settings.local_tone_strength,+ settings.local_structure_strength,+ settings.skin_structure_strength,+ settings.upscaling_factor,+ )+++def persist_image_settings(+ nr_preset: str,+ nr_style: str,+ nr_intensity: float,+ local_tone_strength: float,+ local_structure_strength: float,+ skin_structure_strength: float,+ upscaling_factor: float,+ image_format: str,+ image_quality: float,+) -> tuple[str, float, float, float, float, float]:+ with _CONFIG_LOCK:+ current = load_settings(CONFIG_PATH)+ settings = replace(+ current,+ nr_preset=nr_preset,+ nr_style=nr_style,+ nr_intensity=nr_intensity,+ local_tone_strength=local_tone_strength,+ local_structure_strength=local_structure_strength,+ skin_structure_strength=skin_structure_strength,+ upscaling_factor=upscaling_factor,+ image_format=image_format,+ image_quality=int(image_quality),)- except Exception as exc:- return f"**Not ready:** {exc}"+ save_settings(CONFIG_PATH, settings)+ return _neural_values(settings)-def render_video(+def persist_video_settings(+ nr_preset: str,+ nr_style: str,+ nr_intensity: float,+ local_tone_strength: float,+ local_structure_strength: float,+ skin_structure_strength: float,+ upscaling_factor: float,+ codec: str,+ container: str,+ quality: str,+) -> tuple[str, float, float, float, float, float]:+ with _CONFIG_LOCK:+ current = load_settings(CONFIG_PATH)+ settings = replace(+ current,+ nr_preset=nr_preset,+ nr_style=nr_style,+ nr_intensity=nr_intensity,+ local_tone_strength=local_tone_strength,+ local_structure_strength=local_structure_strength,+ skin_structure_strength=skin_structure_strength,+ upscaling_factor=upscaling_factor,+ codec=codec,+ container=container,+ quality=quality,+ )+ save_settings(CONFIG_PATH, settings)+ return _neural_values(settings)+++def reset_saved_settings() -> tuple:+ with _CONFIG_LOCK:+ save_settings(CONFIG_PATH, DEFAULT_SETTINGS)+ neural = _neural_values(DEFAULT_SETTINGS)+ message = "All Image and Video settings were reset to defaults."+ return (+ *neural,+ *neural,+ DEFAULT_SETTINGS.image_format,+ DEFAULT_SETTINGS.image_quality,+ DEFAULT_SETTINGS.codec,+ DEFAULT_SETTINGS.container,+ DEFAULT_SETTINGS.quality,+ message,+ message,+ )+++def _process_video(input_path: str,- profile: str,+ nr_preset: str,+ nr_style: str,+ nr_intensity: float,+ local_tone_strength: float,+ local_structure_strength: float,+ skin_structure_strength: float,+ upscaling_factor: float,codec: str,container: str,quality: str,- progress=gr.Progress(track_tqdm=False),-):+ progress,+ preview_seconds: float | None,+ preview_frames: int | None,+) -> tuple[str | None, str]:if not input_path:raise gr.Error("Choose a video first.")+ is_preview = preview_seconds is not None or preview_frames is not Noneoptions = ConversionOptions(- profile=profile,- codec=codec,- container=container,+ nr_preset=nr_preset,+ nr_style=nr_style,+ nr_intensity=nr_intensity,+ local_tone_strength=local_tone_strength,+ local_structure_strength=local_structure_strength,+ skin_structure_strength=skin_structure_strength,+ upscaling_factor=upscaling_factor,+ codec="H.264" if is_preview else codec,+ container="MP4" if is_preview else container,quality=quality,+ preview_seconds=preview_seconds,+ preview_frames=preview_frames,)def report(value: float, message: str) -> None:@@ -51,65 +222,448 @@ def render_video(except Exception as exc:traceback.print_exc()raise gr.Error(str(exc)) from exc- preview = result.output_path if Path(result.output_path).suffix.lower() == ".mp4" else None+ output_preview = result.output_path if options.container == "MP4" else None+ if preview_frames is not None:+ return output_preview, (+ f"One-frame preview complete on {result.gpu} in {result.elapsed_seconds:.1f}s. "+ f"DLSS {result.dlss_mode}: {result.render_width}×{result.render_height} → "+ f"{result.output_width}×{result.output_height}. Signed feature 18 confirmed."+ )+ if is_preview:+ return output_preview, (+ f"Preview complete: {result.frames} frames from the first {PREVIEW_SECONDS:g} seconds processed "+ f"on {result.gpu} in {result.elapsed_seconds:.1f}s. DLSS {result.dlss_mode}: "+ f"{result.render_width}×{result.render_height} → {result.output_width}×{result.output_height}. "+ "All frames returned success with signed feature 18 confirmed."+ )+ status = (+ f"Complete: {result.frames} frames processed on {result.gpu} in {result.elapsed_seconds:.1f}s. "+ f"All {result.nr_count_evidence} frames returned success with signed feature 18 confirmed. "+ f"DLSS {result.dlss_mode}: {result.render_width}×{result.render_height} → "+ f"{result.output_width}×{result.output_height}."+ )+ if container != "MP4":+ status += f" {container} output was created successfully, but browser preview is unavailable."+ return output_preview, status+++def render_video(+ input_path: str,+ nr_preset: str,+ nr_style: str,+ nr_intensity: float,+ local_tone_strength: float,+ local_structure_strength: float,+ skin_structure_strength: float,+ upscaling_factor: float,+ codec: str,+ container: str,+ quality: str,+ progress=gr.Progress(track_tqdm=False),+):+ return _process_video(+ input_path, nr_preset, nr_style, nr_intensity, local_tone_strength, local_structure_strength,+ skin_structure_strength, upscaling_factor, codec, container, quality, progress, None, None+ )+++def preview_video(+ input_path: str,+ nr_preset: str,+ nr_style: str,+ nr_intensity: float,+ local_tone_strength: float,+ local_structure_strength: float,+ skin_structure_strength: float,+ upscaling_factor: float,+ codec: str,+ container: str,+ quality: str,+ progress=gr.Progress(track_tqdm=False),+):+ return _process_video(+ input_path, nr_preset, nr_style, nr_intensity, local_tone_strength, local_structure_strength,+ skin_structure_strength, upscaling_factor, codec, container, quality, progress,+ PREVIEW_SECONDS, None+ )+++def preview_one_frame(+ input_path: str,+ nr_preset: str,+ nr_style: str,+ nr_intensity: float,+ local_tone_strength: float,+ local_structure_strength: float,+ skin_structure_strength: float,+ upscaling_factor: float,+ codec: str,+ container: str,+ quality: str,+ progress=gr.Progress(track_tqdm=False),+):+ return _process_video(+ input_path, nr_preset, nr_style, nr_intensity, local_tone_strength, local_structure_strength,+ skin_structure_strength, upscaling_factor, codec, container, quality, progress, None, 1+ )+++def preview_input_images(paths: list[str] | str | None):+ if not paths:+ return []+ if isinstance(paths, str):+ paths = [paths]+ previews = []+ for raw_path in paths:+ try:+ decoded = decode_image(raw_path)+ image = Image.fromarray(decoded.rgba, mode="RGBA")+ image.thumbnail((1200, 900), Image.Resampling.LANCZOS)+ previews.append((image, Path(raw_path).name))+ except Exception:+ continue+ return previews+++def render_image_batch(+ input_paths: list[str] | str | None,+ nr_preset: str,+ nr_style: str,+ nr_intensity: float,+ local_tone_strength: float,+ local_structure_strength: float,+ skin_structure_strength: float,+ upscaling_factor: float,+ image_format: str,+ image_quality: float,+ progress=gr.Progress(track_tqdm=False),+):+ if not input_paths:+ raise gr.Error("Choose at least one image first.")+ if isinstance(input_paths, str):+ input_paths = [input_paths]+ options = ImageConversionOptions(+ nr_preset=nr_preset,+ nr_style=nr_style,+ nr_intensity=nr_intensity,+ local_tone_strength=local_tone_strength,+ local_structure_strength=local_structure_strength,+ skin_structure_strength=skin_structure_strength,+ upscaling_factor=upscaling_factor,+ output_format=image_format,+ quality=int(image_quality),+ )++ def report(value: float, message: str) -> None:+ progress(value, desc=message)++ try:+ result = convert_images(input_paths, options, progress=report)+ except Exception as exc:+ traceback.print_exc()+ raise gr.Error(str(exc)) from exc++ gallery = []+ for item in result.successes:+ with Image.open(item.output_path) as output:+ preview = output.convert("RGBA")+ preview.thumbnail((1600, 1200), Image.Resampling.LANCZOS)+ gallery.append((preview.copy(), Path(item.output_path).name))+ files = [item.output_path for item in result.successes]+ rows = [+ [Path(item.input_path).name, "Complete", Path(item.output_path).name, "; ".join(item.warnings)]+ for item in result.successes+ ]+ rows.extend(+ [Path(item.input_path).name, "Failed", "", item.error] for item in result.failures+ )+ state = "Cancelled" if result.cancelled else "Complete"status = (- f"Complete: {result.frames} frames processed on {result.gpu} in "- f"{result.elapsed_seconds:.1f}s. All {result.nr_count_evidence} frames returned success "- "from direct feature 18."+ f"{state}: {len(result.successes)} image(s) rendered, {len(result.failures)} failed. "+ "Every successful output returned feature-18 success and has a diagnostic report.")- return preview, result.output_path, result.report_path, status+ return gallery, files, result.zip_path, rows, status-with gr.Blocks(title="DLSS 5 Video Converter") as demo:- gr.Markdown(- "# DLSS 5 Video Converter\n"- "Render an entire video through the experimental NVIDIA DLSS 5 Neural Rendering runtime. "- "The supplied `nvngx_dlssnr.dll` is the only image-transforming stage. Optical flow supplies required motion vectors; "- "there is no DLAA, ReShade, RenoDX, depth enhancer, resize, sharpening, or denoising fallback.\n\n"- "> Experimental reverse-engineered integration. RTX 40/50 are primary; RTX 30 is beta. A failed feature-18 call aborts the render."+def build_neural_controls(settings: UISettings):+ nr_preset = gr.Dropdown(+ list(NR_PRESETS), value=settings.nr_preset, label="NR Preset",+ info="Experimental content-dependent neural-rendering model hint. Default is recommended."+ )+ nr_style = gr.Radio(+ list(NR_STYLES), value=settings.nr_style, label="NR Style",+ info="Selects the native neural-rendering style."+ )+ upscaling_factor = gr.Dropdown(+ choices=list(UPSCALING_CHOICES), value=settings.upscaling_factor,+ label="Upscaling factor", info="Uses NVIDIA's fixed DLSS modes. DLAA keeps source resolution.")- gr.Markdown(gpu_banner())with gr.Row():- with gr.Column(scale=3):- source = gr.Video(label="Input video", sources=["upload"], format=None)- with gr.Column(scale=2):- profile = gr.Radio(- ["Faithful", "Natural", "Strong / Cinematic"], value="Strong / Cinematic", label="Native DLSS 5 profile"+ nr_intensity = gr.Slider(+ 0.0, 2.0, value=settings.nr_intensity, step=0.05, precision=2,+ label="NR Intensity", info="Overall neural-rendering strength.", buttons=["reset"]+ )+ local_tone_strength = gr.Slider(+ 0.0, 2.0, value=settings.local_tone_strength, step=0.05, precision=2,+ label="Local Tone Strength", info="Local tone and contrast enhancement.", buttons=["reset"]+ )+ with gr.Row():+ local_structure_strength = gr.Slider(+ 0.0, 2.0, value=settings.local_structure_strength, step=0.05, precision=2,+ label="Local Structure Strength", info="Local detail and texture structure.", buttons=["reset"]+ )+ skin_structure_strength = gr.Slider(+ -1.0, 2.0, value=settings.skin_structure_strength, step=0.05, precision=2,+ label="Skin Structure Strength", info="Skin-specific structure; -1.00 is the native default.",+ buttons=["reset"]+ )+ return [+ nr_preset, nr_style, nr_intensity, local_tone_strength, local_structure_strength,+ skin_structure_strength, upscaling_factor+ ]+++def build_app() -> gr.Blocks:+ """Build the UI and create a default config only when the application is used."""+ settings = load_settings(CONFIG_PATH)+ save_settings(CONFIG_PATH, settings)+ upload_types = ["image", ".svg", ".heic", ".heif", *sorted(RAW_EXTENSIONS)]++ with gr.Blocks(title="DLSS 5 Visual Enhancer") as demo:+ gr.Markdown("# DLSS 5 Visual Enhancer")+ with gr.Tabs(selected="image"):+ with gr.Tab("Image", id="image"):+ with gr.Row():+ with gr.Column(scale=3):+ image_sources = gr.File(+ label="Input image(s)",+ file_count="multiple",+ file_types=upload_types,+ type="filepath",+ allow_reordering=True,+ elem_id="image-upload-list",+ )+ image_input_gallery = gr.Gallery(+ label="Input preview",+ columns=3,+ height=320,+ object_fit="contain",+ interactive=False,+ buttons=["fullscreen"],+ elem_id="image-input-preview",+ )+ with gr.Accordion(+ "DLSS 5 Neural Rendering Settings", open=True+ ):+ image_neural = build_neural_controls(settings)+ with gr.Row():+ image_format = gr.Dropdown(+ list(IMAGE_FORMATS),+ value=settings.image_format,+ label="Output format",+ info=(+ "PNG and TIFF are lossless; JPEG composites transparency "+ "over white."+ ),+ )+ image_quality = gr.Slider(+ 1,+ 100,+ value=settings.image_quality,+ step=1,+ precision=0,+ label="Lossy quality",+ info=(+ "Used by JPEG, WebP, and AVIF; ignored by PNG/TIFF."+ ),+ )+ gr.Markdown(+ "Images are processed as 8-bit SDR sRGB. Animated and multipage "+ "files use their first frame/page."+ )+ with gr.Row():+ image_render = gr.Button("Render image(s)", variant="primary")+ image_stop = gr.Button("Stop", variant="stop")+ image_reset = gr.Button("Reset settings")+ image_status = gr.Textbox(label="Status", interactive=False)+ with gr.Column(scale=3):+ image_output_gallery = gr.Gallery(+ label="Enhanced previews",+ columns=2,+ height=520,+ object_fit="contain",+ interactive=False,+ buttons=["download", "download_all", "fullscreen"],+ )+ image_output_files = gr.File(+ label="Rendered image files",+ file_count="multiple",+ interactive=False,+ )+ image_zip = gr.DownloadButton(+ "Download successful images as ZIP"+ )+ image_results = gr.Dataframe(+ headers=["Input", "Result", "Output", "Details"],+ datatype=["str", "str", "str", "str"],+ interactive=False,+ label="Batch results",+ wrap=True,+ )++ with gr.Tab("Video", id="video"):+ with gr.Row():+ with gr.Column(scale=3):+ video_source = gr.Video(+ label="Input video", sources=["upload"], format=None+ )+ with gr.Accordion(+ "DLSS 5 Neural Rendering Settings", open=True+ ):+ video_neural = build_neural_controls(settings)+ video_quality = gr.Radio(+ QUALITY_CHOICES,+ value=settings.quality,+ label="Encoding quality",+ info=(+ "Auto uses output resolution, FPS, and codec. Good = Auto×2, "+ "Best = Auto×4, Max = CQ 0."+ ),+ )+ with gr.Row():+ video_codec = gr.Dropdown(+ CODEC_CHOICES,+ value=settings.codec,+ label="Video codec",+ info=(+ "ProRes Proxy uses 10-bit 4:2:2 and requires MOV or MKV."+ ),+ )+ video_container = gr.Dropdown(+ CONTAINER_CHOICES,+ value=settings.container,+ label="Container",+ )+ gr.Checkbox(+ value=False,+ interactive=False,+ label=(+ "Preserve HDR (disabled: verified feature-18 path is RGBA8; "+ "HDR safely outputs as SDR)"+ ),+ )+ with gr.Row():+ video_preview_frame = gr.Button("Preview 1 frame")+ video_preview = gr.Button("Preview 3 sec")+ video_render = gr.Button("Render", variant="primary")+ video_stop = gr.Button("Stop", variant="stop")+ video_reset = gr.Button("Reset settings")+ video_status = gr.Textbox(label="Status", interactive=False)+ with gr.Column(scale=3):+ output_video = gr.Video(label="Output video", interactive=False)++ image_inputs = [image_sources, *image_neural, image_format, image_quality]+ video_inputs = [+ video_source,+ *video_neural,+ video_codec,+ video_container,+ video_quality,+ ]+ image_settings_inputs = [*image_neural, image_format, image_quality]+ video_settings_inputs = [+ *video_neural,+ video_codec,+ video_container,+ video_quality,+ ]++ image_sources.change(+ preview_input_images,+ inputs=image_sources,+ outputs=image_input_gallery,+ queue=False,+ show_progress="hidden",+ )+ for component in image_settings_inputs:+ component.input(+ persist_image_settings,+ inputs=image_settings_inputs,+ outputs=video_neural,+ queue=False,+ )+ for component in video_settings_inputs:+ component.input(+ persist_video_settings,+ inputs=video_settings_inputs,+ outputs=image_neural,+ queue=False,)- quality = gr.Radio(["High", "Balanced", "Small"], value="High", label="Encoding quality")-- with gr.Accordion("Output format", open=False):- with gr.Row():- codec = gr.Dropdown(["H.264", "HEVC", "AV1"], value="H.264", label="Video codec")- container = gr.Dropdown(["MP4", "MKV"], value="MP4", label="Container")- gr.Checkbox(- value=False,- interactive=False,- label="Preserve HDR (disabled: verified feature-18 path is currently RGBA8; HDR input is safely output as SDR)",++ image_render.click(+ render_image_batch,+ inputs=image_inputs,+ outputs=[+ image_output_gallery,+ image_output_files,+ image_zip,+ image_results,+ image_status,+ ],+ concurrency_limit=1,)+ image_stop.click(cancel_active_job, outputs=image_status, queue=False)- with gr.Row():- render = gr.Button("Render whole video", variant="primary")- stop = gr.Button("Stop", variant="stop")- status = gr.Textbox(label="Status", interactive=False)- preview = gr.Video(label="MP4 preview", interactive=False)- with gr.Row():- output_file = gr.File(label="Rendered video")- report_file = gr.File(label="Render report")+ video_render.click(+ render_video,+ inputs=video_inputs,+ outputs=[output_video, video_status],+ concurrency_limit=1,+ )+ video_preview.click(+ preview_video,+ inputs=video_inputs,+ outputs=[output_video, video_status],+ concurrency_limit=1,+ )+ video_preview_frame.click(+ preview_one_frame,+ inputs=video_inputs,+ outputs=[output_video, video_status],+ concurrency_limit=1,+ )+ video_stop.click(cancel_active_job, outputs=video_status, queue=False)- inputs = [- source, profile, codec, container, quality,- ]- render.click(render_video, inputs=inputs, outputs=[preview, output_file, report_file, status], concurrency_limit=1)- stop.click(cancel_active_job, outputs=status, queue=False)+ reset_outputs = [+ *image_neural,+ *video_neural,+ image_format,+ image_quality,+ video_codec,+ video_container,+ video_quality,+ image_status,+ video_status,+ ]+ image_reset.click(reset_saved_settings, outputs=reset_outputs, queue=False)+ video_reset.click(reset_saved_settings, outputs=reset_outputs, queue=False)+ return demo-if __name__ == "__main__":+def main() -> None:OUTPUTS.mkdir(exist_ok=True)+ LOGS.mkdir(exist_ok=True)+ demo = build_app()demo.queue(default_concurrency_limit=1).launch(+ css=APP_CSS,+ theme=gr.themes.Ocean(),server_name="127.0.0.1",inbrowser=True,share=False,allowed_paths=[str(OUTPUTS.resolve())],show_error=True,)+++if __name__ == "__main__":+ main()diff --git a/bin/ffmpeg/BINARIES.md b/bin/ffmpeg/BINARIES.mdnew file mode 100644index 0000000..a1d91f0--- /dev/null+++ b/bin/ffmpeg/BINARIES.md@@ -0,0 +1,8 @@+# FFmpeg binaries++The executable binaries are intentionally not included in this GitHub copy.++- `bin/ffmpeg.exe` — FFmpeg command-line video/audio processor used by the application.+- `bin/ffprobe.exe` — FFmpeg inspection tool used to read media metadata and stream information.++Restore these files from an official Windows FFmpeg distribution before running the program.diff --git a/bin/ffmpeg/LICENSE b/bin/ffmpeg/LICENSEnew file mode 100644index 0000000..94a9ed0--- /dev/null+++ b/bin/ffmpeg/LICENSE@@ -0,0 +1,674 @@+ GNU GENERAL PUBLIC LICENSE+ Version 3, 29 June 2007++ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>+ Everyone is permitted to copy and distribute verbatim copies+ of this license document, but changing it is not allowed.++ Preamble++ The GNU General Public License is a free, copyleft license for+software and other kinds of works.++ The licenses for most software and other practical works are designed+to take away your freedom to share and change the works. By contrast,+the GNU General Public License is intended to guarantee your freedom to+share and change all versions of a program--to make sure it remains free+software for all its users. We, the Free Software Foundation, use the+GNU General Public License for most of our software; it applies also to+any other work released this way by its authors. You can apply it to+your programs, too.++ When we speak of free software, we are referring to freedom, not+price. Our General Public Licenses are designed to make sure that you+have the freedom to distribute copies of free software (and charge for+them if you wish), that you receive source code or can get it if you+want it, that you can change the software or use pieces of it in new+free programs, and that you know you can do these things.++ To protect your rights, we need to prevent others from denying you+these rights or asking you to surrender the rights. Therefore, you have+certain responsibilities if you distribute copies of the software, or if+you modify it: responsibilities to respect the freedom of others.++ For example, if you distribute copies of such a program, whether+gratis or for a fee, you must pass on to the recipients the same+freedoms that you received. You must make sure that they, too, receive+or can get the source code. And you must show them these terms so they+know their rights.++ Developers that use the GNU GPL protect your rights with two steps:+(1) assert copyright on the software, and (2) offer you this License+giving you legal permission to copy, distribute and/or modify it.++ For the developers' and authors' protection, the GPL clearly explains+that there is no warranty for this free software. For both users' and+authors' sake, the GPL requires that modified versions be marked as+changed, so that their problems will not be attributed erroneously to+authors of previous versions.++ Some devices are designed to deny users access to install or run+modified versions of the software inside them, although the manufacturer+can do so. This is fundamentally incompatible with the aim of+protecting users' freedom to change the software. The systematic+pattern of such abuse occurs in the area of products for individuals to+use, which is precisely where it is most unacceptable. Therefore, we+have designed this version of the GPL to prohibit the practice for those+products. If such problems arise substantially in other domains, we+stand ready to extend this provision to those domains in future versions+of the GPL, as needed to protect the freedom of users.++ Finally, every program is threatened constantly by software patents.+States should not allow patents to restrict development and use of+software on general-purpose computers, but in those that do, we wish to+avoid the special danger that patents applied to a free program could+make it effectively proprietary. To prevent this, the GPL assures that+patents cannot be used to render the program non-free.++ The precise terms and conditions for copying, distribution and+modification follow.++ TERMS AND CONDITIONS++ 0. Definitions.++ "This License" refers to version 3 of the GNU General Public License.++ "Copyright" also means copyright-like laws that apply to other kinds of+works, such as semiconductor masks.++ "The Program" refers to any copyrightable work licensed under this+License. Each licensee is addressed as "you". "Licensees" and+"recipients" may be individuals or organizations.++ To "modify" a work means to copy from or adapt all or part of the work+in a fashion requiring copyright permission, other than the making of an+exact copy. The resulting work is called a "modified version" of the+earlier work or a work "based on" the earlier work.++ A "covered work" means either the unmodified Program or a work based+on the Program.++ To "propagate" a work means to do anything with it that, without+permission, would make you directly or secondarily liable for+infringement under applicable copyright law, except executing it on a+computer or modifying a private copy. Propagation includes copying,+distribution (with or without modification), making available to the+public, and in some countries other activities as well.++ To "convey" a work means any kind of propagation that enables other+parties to make or receive copies. Mere interaction with a user through+a computer network, with no transfer of a copy, is not conveying.++ An interactive user interface displays "Appropriate Legal Notices"+to the extent that it includes a convenient and prominently visible+feature that (1) displays an appropriate copyright notice, and (2)+tells the user that there is no warranty for the work (except to the+extent that warranties are provided), that licensees may convey the+work under this License, and how to view a copy of this License. If+the interface presents a list of user commands or options, such as a+menu, a prominent item in the list meets this criterion.++ 1. Source Code.++ The "source code" for a work means the preferred form of the work+for making modifications to it. "Object code" means any non-source+form of a work.++ A "Standard Interface" means an interface that either is an official+standard defined by a recognized standards body, or, in the case of+interfaces specified for a particular programming language, one that+is widely used among developers working in that language.++ The "System Libraries" of an executable work include anything, other+than the work as a whole, that (a) is included in the normal form of+packaging a Major Component, but which is not part of that Major+Component, and (b) serves only to enable use of the work with that+Major Component, or to implement a Standard Interface for which an+implementation is available to the public in source code form. A+"Major Component", in this context, means a major essential component+(kernel, window system, and so on) of the specific operating system+(if any) on which the executable work runs, or a compiler used to+produce the work, or an object code interpreter used to run it.++ The "Corresponding Source" for a work in object code form means all+the source code needed to generate, install, and (for an executable+work) run the object code and to modify the work, including scripts to+control those activities. However, it does not include the work's+System Libraries, or general-purpose tools or generally available free+programs which are used unmodified in performing those activities but+which are not part of the work. For example, Corresponding Source+includes interface definition files associated with source files for+the work, and the source code for shared libraries and dynamically+linked subprograms that the work is specifically designed to require,+such as by intimate data communication or control flow between those+subprograms and other parts of the work.++ The Corresponding Source need not include anything that users+can regenerate automatically from other parts of the Corresponding+Source.++ The Corresponding Source for a work in source code form is that+same work.++ 2. Basic Permissions.++ All rights granted under this License are granted for the term of+copyright on the Program, and are irrevocable provided the stated+conditions are met. This License explicitly affirms your unlimited+permission to run the unmodified Program. The output from running a+covered work is covered by this License only if the output, given its+content, constitutes a covered work. This License acknowledges your+rights of fair use or other equivalent, as provided by copyright law.++ You may make, run and propagate covered works that you do not+convey, without conditions so long as your license otherwise remains+in force. You may convey covered works to others for the sole purpose+of having them make modifications exclusively for you, or provide you+with facilities for running those works, provided that you comply with+the terms of this License in conveying all material for which you do+not control copyright. Those thus making or running the covered works+for you must do so exclusively on your behalf, under your direction+and control, on terms that prohibit them from making any copies of+your copyrighted material outside their relationship with you.++ Conveying under any other circumstances is permitted solely under+the conditions stated below. Sublicensing is not allowed; section 10+makes it unnecessary.++ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.++ No covered work shall be deemed part of an effective technological+measure under any applicable law fulfilling obligations under article+11 of the WIPO copyright treaty adopted on 20 December 1996, or+similar laws prohibiting or restricting circumvention of such+measures.++ When you convey a covered work, you waive any legal power to forbid+circumvention of technological measures to the extent such circumvention+is effected by exercising rights under this License with respect to+the covered work, and you disclaim any intention to limit operation or+modification of the work as a means of enforcing, against the work's+users, your or third parties' legal rights to forbid circumvention of+technological measures.++ 4. Conveying Verbatim Copies.++ You may convey verbatim copies of the Program's source code as you+receive it, in any medium, provided that you conspicuously and+appropriately publish on each copy an appropriate copyright notice;+keep intact all notices stating that this License and any+non-permissive terms added in accord with section 7 apply to the code;+keep intact all notices of the absence of any warranty; and give all+recipients a copy of this License along with the Program.++ You may charge any price or no price for each copy that you convey,+and you may offer support or warranty protection for a fee.++ 5. Conveying Modified Source Versions.++ You may convey a work based on the Program, or the modifications to+produce it from the Program, in the form of source code under the+terms of section 4, provided that you also meet all of these conditions:++ a) The work must carry prominent notices stating that you modified+ it, and giving a relevant date.++ b) The work must carry prominent notices stating that it is+ released under this License and any conditions added under section+ 7. This requirement modifies the requirement in section 4 to+ "keep intact all notices".++ c) You must license the entire work, as a whole, under this+ License to anyone who comes into possession of a copy. This+ License will therefore apply, along with any applicable section 7+ additional terms, to the whole of the work, and all its parts,+ regardless of how they are packaged. This License gives no+ permission to license the work in any other way, but it does not+ invalidate such permission if you have separately received it.++ d) If the work has interactive user interfaces, each must display+ Appropriate Legal Notices; however, if the Program has interactive+ interfaces that do not display Appropriate Legal Notices, your+ work need not make them do so.++ A compilation of a covered work with other separate and independent+works, which are not by their nature extensions of the covered work,+and which are not combined with it such as to form a larger program,+in or on a volume of a storage or distribution medium, is called an+"aggregate" if the compilation and its resulting copyright are not+used to limit the access or legal rights of the compilation's users+beyond what the individual works permit. Inclusion of a covered work+in an aggregate does not cause this License to apply to the other+parts of the aggregate.++ 6. Conveying Non-Source Forms.++ You may convey a covered work in object code form under the terms+of sections 4 and 5, provided that you also convey the+machine-readable Corresponding Source under the terms of this License,+in one of these ways:++ a) Convey the object code in, or embodied in, a physical product+ (including a physical distribution medium), accompanied by the+ Corresponding Source fixed on a durable physical medium+ customarily used for software interchange.++ b) Convey the object code in, or embodied in, a physical product+ (including a physical distribution medium), accompanied by a+ written offer, valid for at least three years and valid for as+ long as you offer spare parts or customer support for that product+ model, to give anyone who possesses the object code either (1) a+ copy of the Corresponding Source for all the software in the+ product that is covered by this License, on a durable physical+ medium customarily used for software interchange, for a price no+ more than your reasonable cost of physically performing this+ conveying of source, or (2) access to copy the+ Corresponding Source from a network server at no charge.++ c) Convey individual copies of the object code with a copy of the+ written offer to provide the Corresponding Source. This+ alternative is allowed only occasionally and noncommercially, and+ only if you received the object code with such an offer, in accord+ with subsection 6b.++ d) Convey the object code by offering access from a designated+ place (gratis or for a charge), and offer equivalent access to the+ Corresponding Source in the same way through the same place at no+ further charge. You need not require recipients to copy the+ Corresponding Source along with the object code. If the place to+ copy the object code is a network server, the Corresponding Source+ may be on a different server (operated by you or a third party)+ that supports equivalent copying facilities, provided you maintain+ clear directions next to the object code saying where to find the+ Corresponding Source. Regardless of what server hosts the+ Corresponding Source, you remain obligated to ensure that it is+ available for as long as needed to satisfy these requirements.++ e) Convey the object code using peer-to-peer transmission, provided+ you inform other peers where the object code and Corresponding+ Source of the work are being offered to the general public at no+ charge under subsection 6d.++ A separable portion of the object code, whose source code is excluded+from the Corresponding Source as a System Library, need not be+included in conveying the object code work.++ A "User Product" is either (1) a "consumer product", which means any+tangible personal property which is normally used for personal, family,+or household purposes, or (2) anything designed or sold for incorporation+into a dwelling. In determining whether a product is a consumer product,+doubtful cases shall be resolved in favor of coverage. For a particular+product received by a particular user, "normally used" refers to a+typical or common use of that class of product, regardless of the status+of the particular user or of the way in which the particular user+actually uses, or expects or is expected to use, the product. A product+is a consumer product regardless of whether the product has substantial+commercial, industrial or non-consumer uses, unless such uses represent+the only significant mode of use of the product.++ "Installation Information" for a User Product means any methods,+procedures, authorization keys, or other information required to install+and execute modified versions of a covered work in that User Product from+a modified version of its Corresponding Source. The information must+suffice to ensure that the continued functioning of the modified object+code is in no case prevented or interfered with solely because+modification has been made.++ If you convey an object code work under this section in, or with, or+specifically for use in, a User Product, and the conveying occurs as+part of a transaction in which the right of possession and use of the+User Product is transferred to the recipient in perpetuity or for a+fixed term (regardless of how the transaction is characterized), the+Corresponding Source conveyed under this section must be accompanied+by the Installation Information. But this requirement does not apply+if neither you nor any third party retains the ability to install+modified object code on the User Product (for example, the work has+been installed in ROM).++ The requirement to provide Installation Information does not include a+requirement to continue to provide support service, warranty, or updates+for a work that has been modified or installed by the recipient, or for+the User Product in which it has been modified or installed. Access to a+network may be denied when the modification itself materially and+adversely affects the operation of the network or violates the rules and+protocols for communication across the network.++ Corresponding Source conveyed, and Installation Information provided,+in accord with this section must be in a format that is publicly+documented (and with an implementation available to the public in+source code form), and must require no special password or key for+unpacking, reading or copying.++ 7. Additional Terms.++ "Additional permissions" are terms that supplement the terms of this+License by making exceptions from one or more of its conditions.+Additional permissions that are applicable to the entire Program shall+be treated as though they were included in this License, to the extent+that they are valid under applicable law. If additional permissions+apply only to part of the Program, that part may be used separately+under those permissions, but the entire Program remains governed by+this License without regard to the additional permissions.++ When you convey a copy of a covered work, you may at your option+remove any additional permissions from that copy, or from any part of+it. (Additional permissions may be written to require their own+removal in certain cases when you modify the work.) You may place+additional permissions on material, added by you to a covered work,+for which you have or can give appropriate copyright permission.++ Notwithstanding any other provision of this License, for material you+add to a covered work, you may (if authorized by the copyright holders of+that material) supplement the terms of this License with terms:++ a) Disclaiming warranty or limiting liability differently from the+ terms of sections 15 and 16 of this License; or++ b) Requiring preservation of specified reasonable legal notices or+ author attributions in that material or in the Appropriate Legal+ Notices displayed by works containing it; or++ c) Prohibiting misrepresentation of the origin of that material, or+ requiring that modified versions of such material be marked in+ reasonable ways as different from the original version; or++ d) Limiting the use for publicity purposes of names of licensors or+ authors of the material; or++ e) Declining to grant rights under trademark law for use of some+ trade names, trademarks, or service marks; or++ f) Requiring indemnification of licensors and authors of that+ material by anyone who conveys the material (or modified versions of+ it) with contractual assumptions of liability to the recipient, for+ any liability that these contractual assumptions directly impose on+ those licensors and authors.++ All other non-permissive additional terms are considered "further+restrictions" within the meaning of section 10. If the Program as you+received it, or any part of it, contains a notice stating that it is+governed by this License along with a term that is a further+restriction, you may remove that term. If a license document contains+a further restriction but permits relicensing or conveying under this+License, you may add to a covered work material governed by the terms+of that license document, provided that the further restriction does+not survive such relicensing or conveying.++ If you add terms to a covered work in accord with this section, you+must place, in the relevant source files, a statement of the+additional terms that apply to those files, or a notice indicating+where to find the applicable terms.++ Additional terms, permissive or non-permissive, may be stated in the+form of a separately written license, or stated as exceptions;+the above requirements apply either way.++ 8. Termination.++ You may not propagate or modify a covered work except as expressly+provided under this License. Any attempt otherwise to propagate or+modify it is void, and will automatically terminate your rights under+this License (including any patent licenses granted under the third+paragraph of section 11).++ However, if you cease all violation of this License, then your+license from a particular copyright holder is reinstated (a)+provisionally, unless and until the copyright holder explicitly and+finally terminates your license, and (b) permanently, if the copyright+holder fails to notify you of the violation by some reasonable means+prior to 60 days after the cessation.++ Moreover, your license from a particular copyright holder is+reinstated permanently if the copyright holder notifies you of the+violation by some reasonable means, this is the first time you have+received notice of violation of this License (for any work) from that+copyright holder, and you cure the violation prior to 30 days after+your receipt of the notice.++ Termination of your rights under this section does not terminate the+licenses of parties who have received copies or rights from you under+this License. If your rights have been terminated and not permanently+reinstated, you do not qualify to receive new licenses for the same+material under section 10.++ 9. Acceptance Not Required for Having Copies.++ You are not required to accept this License in order to receive or+run a copy of the Program. Ancillary propagation of a covered work+occurring solely as a consequence of using peer-to-peer transmission+to receive a copy likewise does not require acceptance. However,+nothing other than this License grants you permission to propagate or+modify any covered work. These actions infringe copyright if you do+not accept this License. Therefore, by modifying or propagating a+covered work, you indicate your acceptance of this License to do so.++ 10. Automatic Licensing of Downstream Recipients.++ Each time you convey a covered work, the recipient automatically+receives a license from the original licensors, to run, modify and+propagate that work, subject to this License. You are not responsible+for enforcing compliance by third parties with this License.++ An "entity transaction" is a transaction transferring control of an+organization, or substantially all assets of one, or subdividing an+organization, or merging organizations. If propagation of a covered+work results from an entity transaction, each party to that+transaction who receives a copy of the work also receives whatever+licenses to the work the party's predecessor in interest had or could+give under the previous paragraph, plus a right to possession of the+Corresponding Source of the work from the predecessor in interest, if+the predecessor has it or can get it with reasonable efforts.++ You may not impose any further restrictions on the exercise of the+rights granted or affirmed under this License. For example, you may+not impose a license fee, royalty, or other charge for exercise of+rights granted under this License, and you may not initiate litigation+(including a cross-claim or counterclaim in a lawsuit) alleging that+any patent claim is infringed by making, using, selling, offering for+sale, or importing the Program or any portion of it.++ 11. Patents.++ A "contributor" is a copyright holder who authorizes use under this+License of the Program or a work on which the Program is based. The+work thus licensed is called the contributor's "contributor version".++ A contributor's "essential patent claims" are all patent claims+owned or controlled by the contributor, whether already acquired or+hereafter acquired, that would be infringed by some manner, permitted+by this License, of making, using, or selling its contributor version,+but do not include claims that would be infringed only as a+consequence of further modification of the contributor version. For+purposes of this definition, "control" includes the right to grant+patent sublicenses in a manner consistent with the requirements of+this License.++ Each contributor grants you a non-exclusive, worldwide, royalty-free+patent license under the contributor's essential patent claims, to+make, use, sell, offer for sale, import and otherwise run, modify and+propagate the contents of its contributor version.++ In the following three paragraphs, a "patent license" is any express+agreement or commitment, however denominated, not to enforce a patent+(such as an express permission to practice a patent or covenant not to+sue for patent infringement). To "grant" such a patent license to a+party means to make such an agreement or commitment not to enforce a+patent against the party.++ If you convey a covered work, knowingly relying on a patent license,+and the Corresponding Source of the work is not available for anyone+to copy, free of charge and under the terms of this License, through a+publicly available network server or other readily accessible means,+then you must either (1) cause the Corresponding Source to be so+available, or (2) arrange to deprive yourself of the benefit of the+patent license for this particular work, or (3) arrange, in a manner+consistent with the requirements of this License, to extend the patent+license to downstream recipients. "Knowingly relying" means you have+actual knowledge that, but for the patent license, your conveying the+covered work in a country, or your recipient's use of the covered work+in a country, would infringe one or more identifiable patents in that+country that you have reason to believe are valid.++ If, pursuant to or in connection with a single transaction or+arrangement, you convey, or propagate by procuring conveyance of, a+covered work, and grant a patent license to some of the parties+receiving the covered work authorizing them to use, propagate, modify+or convey a specific copy of the covered work, then the patent license+you grant is automatically extended to all recipients of the covered+work and works based on it.++ A patent license is "discriminatory" if it does not include within+the scope of its coverage, prohibits the exercise of, or is+conditioned on the non-exercise of one or more of the rights that are+specifically granted under this License. You may not convey a covered+work if you are a party to an arrangement with a third party that is+in the business of distributing software, under which you make payment+to the third party based on the extent of your activity of conveying+the work, and under which the third party grants, to any of the+parties who would receive the covered work from you, a discriminatory+patent license (a) in connection with copies of the covered work+conveyed by you (or copies made from those copies), or (b) primarily+for and in connection with specific products or compilations that+contain the covered work, unless you entered into that arrangement,+or that patent license was granted, prior to 28 March 2007.++ Nothing in this License shall be construed as excluding or limiting+any implied license or other defenses to infringement that may+otherwise be available to you under applicable patent law.++ 12. No Surrender of Others' Freedom.++ If conditions are imposed on you (whether by court order, agreement or+otherwise) that contradict the conditions of this License, they do not+excuse you from the conditions of this License. If you cannot convey a+covered work so as to satisfy simultaneously your obligations under this+License and any other pertinent obligations, then as a consequence you may+not convey it at all. For example, if you agree to terms that obligate you+to collect a royalty for further conveying from those to whom you convey+the Program, the only way you could satisfy both those terms and this+License would be to refrain entirely from conveying the Program.++ 13. Use with the GNU Affero General Public License.++ Notwithstanding any other provision of this License, you have+permission to link or combine any covered work with a work licensed+under version 3 of the GNU Affero General Public License into a single+combined work, and to convey the resulting work. The terms of this+License will continue to apply to the part which is the covered work,+but the special requirements of the GNU Affero General Public License,+section 13, concerning interaction through a network will apply to the+combination as such.++ 14. Revised Versions of this License.++ The Free Software Foundation may publish revised and/or new versions of+the GNU General Public License from time to time. Such new versions will+be similar in spirit to the present version, but may differ in detail to+address new problems or concerns.++ Each version is given a distinguishing version number. If the+Program specifies that a certain numbered version of the GNU General+Public License "or any later version" applies to it, you have the+option of following the terms and conditions either of that numbered+version or of any later version published by the Free Software+Foundation. If the Program does not specify a version number of the+GNU General Public License, you may choose any version ever published+by the Free Software Foundation.++ If the Program specifies that a proxy can decide which future+versions of the GNU General Public License can be used, that proxy's+public statement of acceptance of a version permanently authorizes you+to choose that version for the Program.++ Later license versions may give you additional or different+permissions. However, no additional obligations are imposed on any+author or copyright holder as a result of your choosing to follow a+later version.++ 15. Disclaimer of Warranty.++ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM+IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.++ 16. Limitation of Liability.++ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF+SUCH DAMAGES.++ 17. Interpretation of Sections 15 and 16.++ If the disclaimer of warranty and limitation of liability provided+above cannot be given local legal effect according to their terms,+reviewing courts shall apply local law that most closely approximates+an absolute waiver of all civil liability in connection with the+Program, unless a warranty or assumption of liability accompanies a+copy of the Program in return for a fee.++ END OF TERMS AND CONDITIONS++ How to Apply These Terms to Your New Programs++ If you develop a new program, and you want it to be of the greatest+possible use to the public, the best way to achieve this is to make it+free software which everyone can redistribute and change under these terms.++ To do so, attach the following notices to the program. It is safest+to attach them to the start of each source file to most effectively+state the exclusion of warranty; and each file should have at least+the "copyright" line and a pointer to where the full notice is found.++ <one line to give the program's name and a brief idea of what it does.>+ Copyright (C) <year> <name of author>++ This program is free software: you can redistribute it and/or modify+ it under the terms of the GNU General Public License as published by+ the Free Software Foundation, either version 3 of the License, or+ (at your option) any later version.++ This program is distributed in the hope that it will be useful,+ but WITHOUT ANY WARRANTY; without even the implied warranty of+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the+ GNU General Public License for more details.++ You should have received a copy of the GNU General Public License+ along with this program. If not, see <http://www.gnu.org/licenses/>.++Also add information on how to contact you by electronic and paper mail.++ If the program does terminal interaction, make it output a short+notice like this when it starts in an interactive mode:++ <program> Copyright (C) <year> <name of author>+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.+ This is free software, and you are welcome to redistribute it+ under certain conditions; type `show c' for details.++The hypothetical commands `show w' and `show c' should show the appropriate+parts of the General Public License. Of course, your program's commands+might be different; for a GUI interface, you would use an "about box".++ You should also get your employer (if you work as a programmer) or school,+if any, to sign a "copyright disclaimer" for the program, if necessary.+For more information on this, and how to apply and follow the GNU GPL, see+<http://www.gnu.org/licenses/>.++ The GNU General Public License does not permit incorporating your program+into proprietary programs. If your program is a subroutine library, you+may consider it more useful to permit linking proprietary applications with+the library. If this is what you want to do, use the GNU Lesser General+Public License instead of this License. But first, please read+<http://www.gnu.org/philosophy/why-not-lgpl.html>.diff --git a/bin/ffmpeg/README.txt b/bin/ffmpeg/README.txtnew file mode 100644index 0000000..4ec2adb--- /dev/null+++ b/bin/ffmpeg/README.txt@@ -0,0 +1,926 @@+FFmpeg 64-bit static Windows build from www.gyan.dev++Version: 9.0.1-full_build-www.gyan.dev++License: GPL v3++Source Code: https://github.com/FFmpeg/FFmpeg/commit/bf1b838f2a++External Assets+frei0r plugins: https://www.gyan.dev/ffmpeg/builds/ffmpeg-frei0r-plugins+lensfun database: https://www.gyan.dev/ffmpeg/builds/ffmpeg-lensfun-db+whisper models: https://huggingface.co/ggerganov/whisper.cpp/tree/main++release-full build configuration:++ARCH x86 (generic)+big-endian no+runtime cpu detection yes+standalone assembly yes+x86 assembler nasm+MMX enabled yes+MMXEXT enabled yes+SSE enabled yes+SSSE3 enabled yes+AESNI enabled yes+CLMUL enabled yes+AVX enabled yes+AVX2 enabled yes+AVX-512 enabled yes+AVX-512ICL enabled yes+XOP enabled yes+FMA3 enabled yes+FMA4 enabled yes+i686 features enabled yes+CMOV is fast yes+EBX available yes+EBP available yes+debug symbols yes+strip symbols yes+optimize for size no+optimizations yes+static yes+shared no+network support yes+threading support pthreads+safe bitstream reader yes+texi2html enabled no+perl enabled yes+pod2man enabled yes+makeinfo enabled yes+makeinfo supports HTML yes+experimental features yes+xmllint enabled yes++External libraries:+avisynth libgsm libsvtjpegxs+bzlib libharfbuzz libtheora+cairo libilbc libtwolame+chromaprint libjxl libuavs3d+frei0r liblc3 libvidstab+gmp liblensfun libvmaf+gnutls libmodplug libvo_amrwbenc+iconv libmp3lame libvorbis+ladspa libmysofa libvpx+lcms2 liboapv libvvenc+libaom libopencore_amrnb libwebp+libaribb24 libopencore_amrwb libx264+libaribcaption libopenjpeg libx265+libass libopenmpt libxavs2+libbluray libopus libxevd+libbs2b libplacebo libxeve+libcaca libqrencode libxml2+libcdio libquirc libxvid+libcodec2 librav1e libzimg+libdav1d librist libzmq+libdavs2 librubberband libzvbi+libdvdnav libshine lzma+libdvdread libsnappy mediafoundation+libflite libsoxr openal+libfontconfig libspeex sdl2+libfreetype libsrt whisper+libfribidi libssh zlib+libgme libsvtav1++External libraries providing hardware acceleration:+amf d3d12va nvdec+cuda dxva2 nvenc+cuda_llvm ffnvcodec opencl+cuvid libmfx vaapi+d3d11va libvpl vulkan++Libraries:+avcodec avformat swscale+avdevice avutil+avfilter swresample++Programs:+ffmpeg ffplay ffprobe++Enabled decoders:+aac flv pcm_u24be+aac_fixed fmvc pcm_u24le+aac_latm fourxm pcm_u32be+aasc fraps pcm_u32le+ac3 frwu pcm_u8+ac3_fixed ftr pcm_vidc+acelp_kelvin g2m pcx+adpcm_4xm g723_1 pdv+adpcm_adx g728 pfm+adpcm_afc g729 pgm+adpcm_agm gdv pgmyuv+adpcm_aica gem pgssub+adpcm_argo gif pgx+adpcm_circus gremlin_dpcm phm+adpcm_ct gsm photocd+adpcm_dtk gsm_ms pictor+adpcm_ea h261 pixlet+adpcm_ea_maxis_xa h263 pjs+adpcm_ea_r1 h263i png+adpcm_ea_r2 h263p ppm+adpcm_ea_r3 h264 prores+adpcm_ea_xas h264_amf prores_raw+adpcm_g722 h264_cuvid prosumer+adpcm_g726 h264_qsv psd+adpcm_g726le hap ptx+adpcm_ima_acorn hca qcelp+adpcm_ima_alp hcom qdm2+adpcm_ima_amv hdr qdmc+adpcm_ima_apc hevc qdraw+adpcm_ima_apm hevc_amf qoa+adpcm_ima_cunning hevc_cuvid qoi+adpcm_ima_dat4 hevc_qsv qpeg+adpcm_ima_dk3 hnm4_video qtrle+adpcm_ima_dk4 hq_hqa r10k+adpcm_ima_ea_eacs hqx r210+adpcm_ima_ea_sead huffyuv ra_144+adpcm_ima_escape hymt ra_288+adpcm_ima_hvqm2 iac ralf+adpcm_ima_hvqm4 idcin rasc+adpcm_ima_iss idf rawvideo+adpcm_ima_magix iff_ilbm realtext+adpcm_ima_moflex ilbc rka+adpcm_ima_mtf imc rl2+adpcm_ima_oki imm4 roq+adpcm_ima_pda imm5 roq_dpcm+adpcm_ima_qt indeo2 rpza+adpcm_ima_rad indeo3 rscc+adpcm_ima_smjpeg indeo4 rtv1+adpcm_ima_ssi indeo5 rv10+adpcm_ima_wav interplay_acm rv20+adpcm_ima_ws interplay_dpcm rv30+adpcm_ima_xbox interplay_video rv40+adpcm_ms ipu rv60+adpcm_mtaf jacosub s302m+adpcm_n64 jpeg2000 sami+adpcm_psx jpegls sanm+adpcm_psxc jv sbc+adpcm_sanyo kgv1 scpr+adpcm_sbpro_2 kmvc screenpresso+adpcm_sbpro_3 lagarith sdx2_dpcm+adpcm_sbpro_4 lead sga+adpcm_swf libaom_av1 sgi+adpcm_thp libaribb24 sgirle+adpcm_thp_le libaribcaption sheervideo+adpcm_vima libcodec2 shorten+adpcm_xa libdav1d simbiosis_imx+adpcm_xmd libdavs2 sipr+adpcm_yamaha libgsm siren+adpcm_zork libgsm_ms smackaud+agm libilbc smacker+ahx libjxl smc+aic libjxl_anim smvjpeg+alac liblc3 snow+alias_pix libopencore_amrnb sol_dpcm+als libopencore_amrwb sp5x+amrnb libopus speedhq+amrwb libspeex speex+amv libsvtjpegxs srgc+anm libuavs3d srt+ansi libvorbis ssa+anull libvpx_vp8 stl+apac libvpx_vp9 subrip+ape libxevd subviewer+apng libzvbi_teletext subviewer1+aptx loco sunrast+aptx_hd lscr svq1+apv m101 svq3+arbc mace3 tak+argo mace6 targa+ass magicyuv targa_y216+asv1 mdec tdsc+asv2 media100 text+atrac1 metasound theora+atrac3 microdvd thp+atrac3al mimic tiertexseqvideo+atrac3p misc4 tiff+atrac3pal mjpeg tmv+atrac9 mjpeg_cuvid truehd+aura mjpeg_qsv truemotion1+aura2 mjpegb truemotion2+av1 mlp truemotion2rt+av1_amf mmvideo truespeech+av1_cuvid mobiclip tscc+av1_qsv motionpixels tscc2+avrn movtext tta+avrp mp1 twinvq+avs mp1float txd+avui mp2 ulti+bethsoftvid mp2float utvideo+bfi mp3 v210+bink mp3adu v210x+binkaudio_dct mp3adufloat vb+binkaudio_rdft mp3float vble+bintext mp3on4 vbn+bitpacked mp3on4float vc1+bmp mpc7 vc1_cuvid+bmv_audio mpc8 vc1_qsv+bmv_video mpeg1_cuvid vc1image+bonk mpeg1video vcr1+brender_pix mpeg2_cuvid vmdaudio+c93 mpeg2_qsv vmdvideo+cavs mpeg2video vmix+cbd2_dpcm mpeg4 vmnc+ccaption mpeg4_cuvid vnull+cdgraphics mpegvideo vorbis+cdtoons mpl2 vp3+cdxl msa1 vp4+cfhd mscc vp5+cinepak msmpeg4v1 vp6+clearvideo msmpeg4v2 vp6a+cljr msmpeg4v3 vp6f+cllc msnsiren vp7+comfortnoise msp2 vp8+cook msrle vp8_cuvid+cpia mss1 vp8_qsv+cri mss2 vp9+cscd msvideo1 vp9_amf+cyuv mszh vp9_cuvid+dca mts2 vp9_qsv+dds mv30 vplayer+derf_dpcm mvc1 vqa+dfa mvc2 vqc+dfpwm mvdv vvc+dirac mvha vvc_qsv+dnxhd mwsc wady_dpcm+dolby_e mxpeg wavarc+dpx nellymoser wavpack+dsd_lsbf notchlc wbmp+dsd_lsbf_planar nuv wcmv+dsd_msbf on2avc webp+dsd_msbf_planar opus webp_anim+dsicinaudio osq webvtt+dsicinvideo paf_audio wmalossless+dss_sp paf_video wmapro+dst pam wmav1+dvaudio pbm wmav2+dvbsub pcm_alaw wmavoice+dvdsub pcm_bluray wmv1+dvvideo pcm_dvd wmv2+dxa pcm_f16le wmv3+dxtory pcm_f24le wmv3image+dxv pcm_f32be wnv1+eac3 pcm_f32le wrapped_avframe+eacmv pcm_f64be ws_snd1+eamad pcm_f64le xan_dpcm+eatgq pcm_lxf xan_wc3+eatgv pcm_mulaw xan_wc4+eatqi pcm_s16be xbin+eightbps pcm_s16be_planar xbm+eightsvx_exp pcm_s16le xface+eightsvx_fib pcm_s16le_planar xl+escape124 pcm_s24be xma1+escape130 pcm_s24daud xma2+evrc pcm_s24le xpm+exr pcm_s24le_planar xsub+fastaudio pcm_s32be xwd+ffv1 pcm_s32le y41p+ffvhuff pcm_s32le_planar ylc+ffwavesynth pcm_s64be yop+fic pcm_s64le yuv4+fits pcm_s8 zero12v+flac pcm_s8_planar zerocodec+flashsv pcm_sga zlib+flashsv2 pcm_u16be zmbv+flic pcm_u16le++Enabled encoders:+a64multi hevc_mf pcm_s32le+a64multi5 hevc_nvenc pcm_s32le_planar+aac hevc_qsv pcm_s64be+aac_mf hevc_vaapi pcm_s64le+ac3 hevc_vulkan pcm_s8+ac3_fixed huffyuv pcm_s8_planar+ac3_mf jpeg2000 pcm_u16be+adpcm_adx jpegls pcm_u16le+adpcm_argo libaom_av1 pcm_u24be+adpcm_g722 libcodec2 pcm_u24le+adpcm_g726 libgsm pcm_u32be+adpcm_g726le libgsm_ms pcm_u32le+adpcm_ima_alp libilbc pcm_u8+adpcm_ima_amv libjxl pcm_vidc+adpcm_ima_apm libjxl_anim pcx+adpcm_ima_qt liblc3 pdv+adpcm_ima_ssi libmp3lame pfm+adpcm_ima_wav liboapv pgm+adpcm_ima_ws libopencore_amrnb pgmyuv+adpcm_ms libopenjpeg phm+adpcm_swf libopus png+adpcm_yamaha librav1e ppm+alac libshine prores+alias_pix libspeex prores_aw+amv libsvtav1 prores_ks+anull libsvtjpegxs prores_ks_vulkan+apng libtheora qoi+aptx libtwolame qtrle+aptx_hd libvo_amrwbenc r10k+ass libvorbis r210+asv1 libvpx_vp8 ra_144+asv2 libvpx_vp9 rawvideo+av1_amf libvvenc roq+av1_d3d12va libwebp roq_dpcm+av1_mf libwebp_anim rpza+av1_nvenc libx264 rv10+av1_qsv libx264rgb rv20+av1_vaapi libx265 s302m+av1_vulkan libxavs2 sbc+avrp libxeve sgi+avui libxvid smc+bitpacked ljpeg snow+bmp magicyuv speedhq+cfhd mjpeg srt+cinepak mjpeg_qsv ssa+cljr mjpeg_vaapi subrip+comfortnoise mlp sunrast+dca movtext svq1+dfpwm mp2 targa+dnxhd mp2fixed text+dpx mp3_mf tiff+dvbsub mpeg1video truehd+dvdsub mpeg2_qsv tta+dvvideo mpeg2_vaapi ttml+dxv mpeg2video utvideo+eac3 mpeg4 v210+exr msmpeg4v2 vbn+ffv1 msmpeg4v3 vc2+ffv1_vulkan msrle vnull+ffvhuff msvideo1 vorbis+fits nellymoser vp8_vaapi+flac opus vp9_qsv+flashsv pam vp9_vaapi+flashsv2 pbm wavpack+flv pcm_alaw wbmp+g723_1 pcm_bluray webvtt+gif pcm_dvd wmav1+h261 pcm_f32be wmav2+h263 pcm_f32le wmv1+h263p pcm_f64be wmv2+h264_amf pcm_f64le wrapped_avframe+h264_d3d12va pcm_mulaw xbm+h264_mf pcm_s16be xface+h264_nvenc pcm_s16be_planar xsub+h264_qsv pcm_s16le xwd+h264_vaapi pcm_s16le_planar y41p+h264_vulkan pcm_s24be yuv4+hap pcm_s24daud zlib+hdr pcm_s24le zmbv+hevc_amf pcm_s24le_planar+hevc_d3d12va pcm_s32be++Enabled hwaccels:+apv_vulkan hevc_d3d12va vc1_d3d12va+av1_d3d11va hevc_dxva2 vc1_dxva2+av1_d3d11va2 hevc_nvdec vc1_nvdec+av1_d3d12va hevc_vaapi vc1_vaapi+av1_dxva2 hevc_vulkan vp8_nvdec+av1_nvdec mjpeg_nvdec vp8_vaapi+av1_vaapi mjpeg_vaapi vp9_d3d11va+av1_vulkan mpeg1_nvdec vp9_d3d11va2+dpx_vulkan mpeg2_d3d11va vp9_d3d12va+ffv1_vulkan mpeg2_d3d11va2 vp9_dxva2+h263_vaapi mpeg2_d3d12va vp9_nvdec+h264_d3d11va mpeg2_dxva2 vp9_vaapi+h264_d3d11va2 mpeg2_nvdec vp9_vulkan+h264_d3d12va mpeg2_vaapi vvc_vaapi+h264_dxva2 mpeg4_nvdec wmv3_d3d11va+h264_nvdec mpeg4_vaapi wmv3_d3d11va2+h264_vaapi prores_raw_vulkan wmv3_d3d12va+h264_vulkan prores_vulkan wmv3_dxva2+hevc_d3d11va vc1_d3d11va wmv3_nvdec+hevc_d3d11va2 vc1_d3d11va2 wmv3_vaapi++Enabled parsers:+aac dvdsub mpegaudio+aac_latm evc mpegvideo+ac3 ffv1 opus+adx flac png+ahx ftr pnm+amr g723_1 prores+apv g729 prores_raw+av1 gif qoi+avs2 gsm rv34+avs3 h261 sbc+bmp h263 sipr+cavsvideo h264 tak+cook hdr vc1+cri hevc vorbis+dca ipu vp3+dirac jpeg2000 vp8+dnxhd jpegxl vp9+dnxuc jpegxs vvc+dolby_e lcevc webp+dpx misc4 xbm+dvaudio mjpeg xma+dvbsub mlp xwd+dvd_nav mpeg4video++Enabled demuxers:+aa ico pcm_f64be+aac idcin pcm_f64le+aax idf pcm_mulaw+ac3 iff pcm_s16be+ac4 ifv pcm_s16le+ace ilbc pcm_s24be+acm image2 pcm_s24le+act image2_alias_pix pcm_s32be+adf image2_brender_pix pcm_s32le+adp image2pipe pcm_s8+ads image_bmp_pipe pcm_u16be+adx image_cri_pipe pcm_u16le+aea image_dds_pipe pcm_u24be+afc image_dpx_pipe pcm_u24le+aiff image_exr_pipe pcm_u32be+aix image_gem_pipe pcm_u32le+alp image_gif_pipe pcm_u8+amr image_hdr_pipe pcm_vidc+amrnb image_j2k_pipe pdv+amrwb image_jpeg_pipe pjs+anm image_jpegls_pipe pmp+apac image_jpegxl_pipe pp_bnk+apc image_jpegxs_pipe pva+ape image_pam_pipe pvf+apm image_pbm_pipe qcp+apng image_pcx_pipe qoa+aptx image_pfm_pipe r3d+aptx_hd image_pgm_pipe rawvideo+apv image_pgmyuv_pipe rcwt+aqtitle image_pgx_pipe realtext+argo_asf image_phm_pipe redspark+argo_brp image_photocd_pipe rka+argo_cvg image_pictor_pipe rl2+asf image_png_pipe rm+asf_o image_ppm_pipe roq+ass image_psd_pipe rpl+ast image_qdraw_pipe rsd+au image_qoi_pipe rso+av1 image_sgi_pipe rtp+avi image_sunrast_pipe rtsp+avisynth image_svg_pipe s337m+avr image_tiff_pipe sami+avs image_vbn_pipe sap+avs2 image_webp_pipe sbc+avs3 image_xbm_pipe sbg+bethsoftvid image_xpm_pipe scc+bfi image_xwd_pipe scd+bfstm imf sdns+bink ingenient sdp+binka ipmovie sdr2+bintext ipu sds+bit ircam sdx+bitpacked iss segafilm+bmv iv8 ser+boa ivf sga+bonk ivr shorten+brstm jacosub siff+c93 jpegxl_anim simbiosis_imx+caf jv sln+cavsvideo kux smacker+cdg kvag smjpeg+cdxl laf smush+cine lc3 sol+codec2 libgme sox+codec2raw libmodplug spdif+concat libopenmpt srt+dash live_flv stl+data lmlm4 str+daud loas subviewer+dcstr lrc subviewer1+derf luodat sup+dfa lvf svag+dfpwm lxf svs+dhav m4v swf+dirac matroska tak+dnxhd mca tedcaptions+dsf mcc thp+dsicin mgsts threedostr+dss microdvd tiertexseq+dts mjpeg tmv+dtshd mjpeg_2000 truehd+dv mlp tta+dvbsub mlv tty+dvbtxt mm txd+dvdvideo mmf ty+dxa mods usm+ea moflex v210+ea_cdata mov v210x+eac3 mp3 vag+epaf mpc vc1+evc mpc8 vc1t+ffmetadata mpegps vividas+filmstrip mpegts vivo+fits mpegtsraw vmd+flac mpegvideo vobsub+flic mpjpeg voc+flv mpl2 vpk+fourxm mpsub vplayer+frm msf vqf+fsb msnwc_tcp vvc+fwse msp w64+g722 mtaf wady+g723_1 mtv wav+g726 musx wavarc+g726le mv wc3+g728 mvi webm_dash_manifest+g729 mxf webp_anim+gdv mxg webvtt+genh nc wsaud+gif nistsphere wsd+gsm nsp wsvqa+gxf nsv wtv+h261 nut wv+h263 nuv wve+h264 obu xa+hca ogg xbin+hcom oma xmd+hevc osq xmv+hls paf xvag+hnm pcm_alaw xwma+hxvs pcm_f32be yop+iamf pcm_f32le yuv4mpegpipe++Enabled muxers:+a64 h263 pcm_s24be+ac3 h264 pcm_s24le+ac4 hash pcm_s32be+adts hds pcm_s32le+adx hevc pcm_s8+aea hls pcm_u16be+aiff iamf pcm_u16le+alp ico pcm_u24be+amr ilbc pcm_u24le+amv image2 pcm_u32be+apm image2pipe pcm_u32le+apng ipod pcm_u8+aptx ircam pcm_vidc+aptx_hd ismv pdv+apv ivf psp+argo_asf jacosub rawvideo+argo_cvg kvag rcwt+asf latm rm+asf_stream lc3 roq+ass lrc rso+ast m4v rtp+au matroska rtp_mpegts+avi matroska_audio rtsp+avif mcc sap+avm2 md5 sbc+avs2 microdvd scc+avs3 mjpeg segafilm+bit mkvtimestamp_v2 segment+caf mlp smjpeg+cavsvideo mmf smoothstreaming+chromaprint mov sox+codec2 mp2 spdif+codec2raw mp3 spx+crc mp4 srt+dash mpeg1system stream_segment+data mpeg1vcd streamhash+daud mpeg1video sup+dfpwm mpeg2dvd swf+dirac mpeg2svcd tee+dnxhd mpeg2video tg2+dts mpeg2vob tgp+dv mpegts truehd+eac3 mpjpeg tta+evc mxf ttml+f4v mxf_d10 uncodedframecrc+ffmetadata mxf_opatom vc1+fifo null vc1t+filmstrip nut voc+fits obu vvc+flac oga w64+flv ogg wav+framecrc ogv webm+framehash oma webm_chunk+framemd5 opus webm_dash_manifest+g722 pcm_alaw webp+g723_1 pcm_f32be webvtt+g726 pcm_f32le whip+g726le pcm_f64be wsaud+gif pcm_f64le wtv+gsm pcm_mulaw wv+gxf pcm_s16be yuv4mpegpipe+h261 pcm_s16le++Enabled protocols:+async http rtmp+bluray httpproxy rtmpe+cache https rtmps+concat icecast rtmpt+concatf ipfs_gateway rtmpte+crypto ipns_gateway rtmpts+data librist rtp+dtls libsrt srtp+fd libssh subfile+ffrtmpcrypt libzmq tcp+ffrtmphttp md5 tee+file mmsh tls+ftp mmst udp+gopher pipe udplite+gophers prompeg++Enabled filters:+a3dscope deconvolve perms+aap dedot perspective+abench deesser phase+abitscope deflate photosensitivity+acompressor deflicker pixdesctest+acontrast deinterlace_d3d12 pixelize+acopy deinterlace_qsv pixscope+acrossfade deinterlace_vaapi pp7+acrossover dejudder premultiply+acrusher delogo premultiply_dynamic+acue denoise_vaapi prewitt+addroi deshake prewitt_opencl+adeclick deshake_opencl procamp_vaapi+adeclip despill program_opencl+adecorrelate detelecine pseudocolor+adelay dialoguenhance psnr+adenorm dilation pullup+aderivative dilation_opencl qp+adrawgraph displace qrencode+adrc doubleweave qrencodesrc+adynamicequalizer drawbox quirc+adynamicsmooth drawbox_vaapi random+aecho drawgraph readeia608+aemphasis drawgrid readvitc+aeval drawtext realtime+aevalsrc drawvg remap+aexciter drmeter remap_opencl+afade dynaudnorm removegrain+afdelaysrc earwax removelogo+afftdn ebur128 repeatfields+afftfilt edgedetect replaygain+afir elbg reverse+afireqsrc entropy rgbashift+afirsrc epx rgbtestsrc+aformat eq roberts+afreqshift equalizer roberts_opencl+afwtdn erosion rotate+agate erosion_opencl rubberband+agraphmonitor estdif sab+ahistogram exposure scale+aiir extractplanes scale2ref+aintegral extrastereo scale_cuda+ainterleave fade scale_d3d11+alatency feedback scale_d3d12+alimiter fftdnoiz scale_qsv+allpass fftfilt scale_vaapi+allrgb field scale_vulkan+allyuv fieldhint scdet+aloop fieldmatch scdet_vulkan+alphaextract fieldorder scharr+alphamerge fillborders scroll+amerge find_rect segment+ametadata firequalizer select+amf_capture flanger selectivecolor+amix flip_vulkan sendcmd+amovie flite separatefields+amplify floodfill setdar+amultiply format setfield+anequalizer fps setparams+anlmdn framepack setpts+anlmf framerate setrange+anlms framestep setsar+anoisesrc frc_amf settb+anull freezedetect sharpness_vaapi+anullsink freezeframes shear+anullsrc frei0r showcqt+apad frei0r_src showcwt+aperms fspp showfreqs+aphasemeter fsync showinfo+aphaser gblur showpalette+aphaseshift gblur_vulkan showspatial+apsnr geq showspectrum+apsyclip gfxcapture showspectrumpic+apulsator gradfun showvolume+arealtime gradients showwaves+aresample graphmonitor showwavespic+areverse grayworld shuffleframes+arls greyedge shufflepixels+arnndn guided shuffleplanes+asdr haas sidechaincompress+asegment haldclut sidechaingate+aselect haldclutsrc sidedata+asendcmd hdcd sierpinski+asetnsamples headphone signalstats+asetpts hflip signature+asetrate hflip_vulkan silencedetect+asettb highpass silenceremove+ashowinfo highshelf sinc+asidedata hilbert sine+asisdr histeq siti+asoftclip histogram smartblur+aspectralstats hqdn3d smptebars+asplit hqx smptehdbars+ass hstack sobel+astats hstack_qsv sobel_opencl+astreamselect hstack_vaapi sofalizer+asubboost hsvhold spectrumsynth+asubcut hsvkey speechnorm+asupercut hue split+asuperpass huesaturation spp+asuperstop hwdownload sr_amf+atadenoise hwmap ssim+atempo hwupload ssim360+atilt hwupload_cuda stereo3d+atrim hysteresis stereotools+avectorscope iccdetect stereowiden+avgblur iccgen streamselect+avgblur_opencl identity subtitles+avgblur_vulkan idet super2xsai+avsynctest il superequalizer+axcorrelate inflate surround+azmq interlace swaprect+backgroundkey interlace_vulkan swapuv+bandpass interleave tblend+bandreject join telecine+bass kerndeint testsrc+bbox kirsch testsrc2+bench ladspa thistogram+bilateral lagfun threshold+bilateral_cuda latency thumbnail+biquad lenscorrection thumbnail_cuda+bitplanenoise lensfun tile+blackdetect libplacebo tiltandshift+blackdetect_vulkan libvmaf tiltshelf+blackframe life tinterlace+blend limitdiff tlut2+blend_vulkan limiter tmedian+blockdetect loop tmidequalizer+blurdetect loudnorm tmix+bm3d lowpass tonemap+boxblur lowshelf tonemap_opencl+boxblur_opencl lumakey tonemap_vaapi+bs2b lut tpad+bwdif lut1d transpose+bwdif_cuda lut2 transpose_cuda+bwdif_vulkan lut3d transpose_opencl+cas lutrgb transpose_vaapi+ccrepack lutyuv transpose_vulkan+cellauto mandelbrot treble+channelmap maskedclamp tremolo+channelsplit maskedmax trim+chorus maskedmerge unpremultiply+chromaber_vulkan maskedmin unsharp+chromahold maskedthreshold unsharp_opencl+chromakey maskfun untile+chromakey_cuda mcdeint uspp+chromanr mcompand v360+chromashift median v360_vulkan+ciescope mergeplanes vaguedenoiser+codecview mestimate varblur+color mestimate_d3d12 vectorscope+color_vulkan metadata vflip+colorbalance midequalizer vflip_vulkan+colorchannelmixer minterpolate vfrdet+colorchart mix vibrance+colorcontrast monochrome vibrato+colorcorrect morpho vidstabdetect+colordetect movie vidstabtransform+colorhold mpdecimate vif+colorize mptestsrc vignette+colorkey msad virtualbass+colorkey_opencl multiply vmafmotion+colorlevels negate volume+colormap nlmeans volumedetect+colormatrix nlmeans_opencl vpp_amf+colorspace nlmeans_vulkan vpp_qsv+colorspace_cuda nnedi vstack+colorspectrum noformat vstack_qsv+colortemperature noise vstack_vaapi+compand normalize w3fdif+compensationdelay null waveform+concat nullsink weave+convolution nullsrc whisper+convolution_opencl openclsrc xbr+convolve oscilloscope xcorrelate+copy overlay xfade+corr overlay_cuda xfade_opencl+cover_rect overlay_opencl xfade_vulkan+crop overlay_qsv xmedian+cropdetect overlay_vaapi xpsnr+crossfeed overlay_vulkan xstack+crystalizer owdenoise xstack_qsv+cue pad xstack_vaapi+curves pad_cuda yadif+datascope pad_opencl yadif_cuda+dblur pad_vaapi yaepblur+dcshift pal100bars yuvtestsrc+dctdnoiz pal75bars zmq+ddagrab palettegen zoneplate+deband paletteuse zoompan+deblock pan zscale+decimate perlin++Enabled bsfs:+aac_adtstoasc filter_units opus_metadata+ahx_to_mp2 h264_metadata pcm_rechunk+apv_metadata h264_mp4toannexb pgs_frame_merge+av1_frame_merge h264_redundant_pps prores_metadata+av1_frame_split hapqa_extract remove_extradata+av1_metadata hevc_metadata setts+chomp hevc_mp4toannexb showinfo+dca_core imx_dump_header smpte436m_to_eia608+dovi_rpu lcevc_metadata text2movsub+dovi_split media100_to_mjpegb trace_headers+dts2pts mjpeg2jpeg truehd_core+dump_extradata mjpega_dump_header vp9_metadata+dv_error_marker mov2textsub vp9_raw_reorder+eac3_core mpeg2_metadata vp9_superframe+eia608_to_smpte436m mpeg4_unpack_bframes vp9_superframe_split+evc_frame_merge noise vvc_metadata+extract_extradata null vvc_mp4toannexb++Enabled indevs:+dshow lavfi openal+gdigrab libcdio vfwcap++Enabled outdevs:+caca++release-full external libraries' versions:++AMF v1.5.2-2-gc35f613+aom v3.14.1-147-gec0dedc1a2+aribb24 v1.0.3-5-g5e9be27+aribcaption 1.1.2+AviSynthPlus v3.7.5-362-gf4628d0a+bs2b 3.1.0+bzip2 1.0.8-3+cairo 1.18.5+chromaprint 1.6.1+codec2 1.2.0-108-g310777b1+dav1d 1.5.4+davs2 1.7-1-gb41cf11+dvdnav 7.0.0-16-g2ffc50b+dvdread 7.1.1-92-g50009a0+ffnvcodec n13.1.15.0-1-geddcea9+flite v2.2-55-g6c9f20d+fontconfig 2.18.3+freetype VER-2-14-3+frei0r v3.2.3+fribidi v1.0.16-5-g069a7e3+gmp 6.3.0-2+gnutls 3.8.13-1+gsm 1.0.24+harfbuzz 14.3.0-10-g9f2f0317+ladspa-sdk 1.17+lame 3.100+lc3 1.1.3+lcms2 2.16+lensfun v0.3.95-1996-g6804b5f5+libass 0.17.5-3-g89cc0f4+libcdio-paranoia 10.2+libgme 0.6.6+libiconv 1.19-1+libilbc v3.0.4-346-g6adb26d4a4+libjxl v0.12-snapshot-3-ge8ff0976+libopencore-amrnb 0.1.6+libopencore-amrwb 0.1.6+libplacebo v7.360.0-109-g4d82c68+libsoxr 0.1.3+libssh 0.12.0+libtheora v1.2.0+libwebp v1.6.0-199-g94d3c4a+libxml2 v2.15.0-122-gddcb79dc+openAL 1.25.2+openapv v0.3.0.0-9-ga5312e4+openjpeg2 2.5.4+openmpt libopenmpt-0.6.28-40-gefc11a27+opus v1.6.1-50-g3da9f7a6+qrencode 4.1.1+quirc 1.2+rav1e p20250624-3-g564ae3b+rist 0.2.20+rubberband v4.0.0+SDL release-2.32.0-228-ga2e7c76bd+shaderc v2026.3-9-g7060a66+shine 3.1.1+snappy 1.2.2+speex Speex-1.2.1-51-g0589522+srt v1.5.6-2-gfcae571+SVT-AV1 v4.2.0-72-gae2658e53+SVT-JPEG-XS v0.9.0-78-g8056642+twolame 0.4.0+uavs3d v1.1-50-g0e20d2c+VAAPI 2.25.0.+vidstab v1.1.2-105-gc7a720a+vmaf v3.2.0-9-g4991d2b5+vo-amrwbenc 0.1.3+vorbis v1.3.7-37-g1b75110b+VPL 2.17+vpx v1.16.0-184-g0cfc6da39+vulkan-loader v1.4.359+vvenc v1.14.0-160-ga03b882+whisper.cpp 1.9.1+x264 v0.165.3223+x265 4.3-6-g9ddc216+xavs2 1.4+xevd 0.5.0+xeve 0.5.1+xvid v1.3.7+zeromq 4.3.5+zimg release-3.0.6-252-gf6cc75a+zvbi v0.2.44-8-g4e222f9+diff --git a/bin/python-3.13.15-embed-amd64/BINARIES.md b/bin/python-3.13.15-embed-amd64/BINARIES.mdnew file mode 100644index 0000000..9bf5abf--- /dev/null+++ b/bin/python-3.13.15-embed-amd64/BINARIES.md@@ -0,0 +1,12 @@+# Embedded Python environment++The complete `python-3.13.15-embed-amd64` runtime is intentionally not included in this GitHub copy. This Markdown file replaces the entire bundled environment.++The omitted content is the portable 64-bit Python 3.13.15 distribution, including:++- the Python interpreter, standard library, extension modules, and runtime libraries;+- installed packages used by the application;+- package command launchers under `Scripts`;+- native media, image, numerical, and machine-learning dependencies.++Download or rebuild the embedded Python environment with the application's required packages before running the program.diff --git a/bin/runtime/BINARIES.md b/bin/runtime/BINARIES.mdnew file mode 100644index 0000000..cd2e627--- /dev/null+++ b/bin/runtime/BINARIES.md@@ -0,0 +1,12 @@+# DLSS and ReShade runtime files++The proprietary or prebuilt Windows runtime files are intentionally not included in this GitHub copy.++- `dxgi.dll` — ReShade/DXGI proxy that loads the visual-enhancement runtime.+- `nvngx.dll` — NVIDIA NGX runtime component.+- `nvngx_dlss.dll` — NVIDIA DLSS Super Resolution runtime component.+- `nvngx_dlssnr.dll` — NVIDIA DLSS Ray Reconstruction runtime component.+- `renodx-dlss5.addon64` — RenoDX/ReShade add-on that provides the DLSS 5 visual-enhancement integration.+- `ReShade.ini` — ReShade configuration used to load and configure the visual-enhancement runtime.++Restore the matching runtime files before running the program. Use only files you are licensed to redistribute.diff --git a/dlss5_converter/__init__.py b/dlss5_converter/__init__.pydeleted file mode 100644index 267ce60..0000000--- a/dlss5_converter/__init__.py+++ /dev/null@@ -1,5 +0,0 @@-"""Portable experimental DLSS 5 video converter."""--from .core import ConversionOptions, ConversionResult, convert_video, probe_video--__all__ = ["ConversionOptions", "ConversionResult", "convert_video", "probe_video"]diff --git a/dlss5_converter/core.py b/dlss5_converter/core.pydeleted file mode 100644index de7f4c6..0000000--- a/dlss5_converter/core.py+++ /dev/null@@ -1,481 +0,0 @@-from __future__ import annotations--import json-import hashlib-import os-import re-import shutil-import struct-import subprocess-import threading-import time-from dataclasses import asdict, dataclass-from fractions import Fraction-from pathlib import Path-from typing import Callable--import av-import cv2-import numpy as np--from .guides import TemporalGuideGenerator---ROOT = Path(__file__).resolve().parents[1]-RUNTIME = ROOT / "bin" / "runtime"-FFMPEG = ROOT / "bin" / "ffmpeg" / "bin" / "ffmpeg.exe"-FFPROBE = ROOT / "bin" / "ffmpeg" / "bin" / "ffprobe.exe"-WORKER = RUNTIME / "nvngx.dll" # executable image name required by the signed snippet caller check-OUTPUTS = ROOT / "outputs"-JOBS = ROOT / "jobs"--VIDEO_MAGIC = 0x32563544-FRAME_MAGIC = 0x314D5246-OUT_MAGIC = 0x3154554F---@dataclass(slots=True)-class ConversionOptions:- profile: str = "Strong / Cinematic"- codec: str = "H.264"- container: str = "MP4"- quality: str = "High"- preserve_hdr: bool = False- warmup_frames: int = 120---PROFILES = {- "Faithful": dict(profile=0, preset=0, style=0, auto_mask=0, ui_correction=0,- intensity=0.70, local_tone=0.75, local_structure=0.75, skin_structure=-1.0),- "Natural": dict(profile=1, preset=0, style=1, auto_mask=0, ui_correction=0,- intensity=1.00, local_tone=1.00, local_structure=1.00, skin_structure=-1.0),- "Strong / Cinematic": dict(profile=2, preset=2, style=2, auto_mask=1, ui_correction=0,- intensity=1.65, local_tone=1.40, local_structure=1.50, skin_structure=1.0),-}---@dataclass(slots=True)-class ConversionResult:- output_path: str- report_path: str- frames: int- nr_count_evidence: int- elapsed_seconds: float- gpu: str---class Cancelled(RuntimeError):- pass---class JobController:- def __init__(self) -> None:- self.cancel = threading.Event()- self.lock = threading.Lock()- self.processes: list[subprocess.Popen] = []-- def register(self, process: subprocess.Popen) -> None:- with self.lock:- self.processes.append(process)-- def unregister(self, process: subprocess.Popen) -> None:- with self.lock:- if process in self.processes:- self.processes.remove(process)-- def stop(self) -> None:- self.cancel.set()- with self.lock:- processes = list(self.processes)- for process in processes:- if process.poll() is None:- try:- process.terminate()- except OSError:- pass---_ACTIVE_LOCK = threading.Lock()-_ACTIVE: JobController | None = None---def cancel_active_job() -> str:- global _ACTIVE- if _ACTIVE is None:- return "No render is running."- _ACTIVE.stop()- return "Stop requested; partial video will be removed and diagnostics retained."---def _run_json(command: list[str]) -> dict:- result = subprocess.run(command, capture_output=True, text=True, encoding="utf-8", errors="replace")- if result.returncode:- raise RuntimeError(result.stderr.strip() or "Media probe failed")- return json.loads(result.stdout)---def probe_video(path: str | os.PathLike[str]) -> dict:- data = _run_json(- [- str(FFPROBE),- "-v",- "error",- "-count_frames",- "-select_streams",- "v:0",- "-show_entries",- "stream=index,codec_name,width,height,avg_frame_rate,r_frame_rate,time_base,duration,nb_frames,nb_read_frames,color_primaries,color_transfer,color_space:stream_tags=rotate:stream_side_data=rotation",- "-show_entries",- "format=duration,format_name",- "-of",- "json",- str(path),- ]- )- streams = data.get("streams") or []- if not streams:- raise ValueError("The selected file contains no decodable video stream.")- stream = streams[0]- rotation = int((stream.get("tags") or {}).get("rotate", 0) or 0)- for side in stream.get("side_data_list") or []:- if "rotation" in side:- rotation = int(side["rotation"] or 0)- rotation %= 360- width, height = int(stream["width"]), int(stream["height"])- if rotation in (90, 270):- width, height = height, width- frames = int(stream.get("nb_read_frames") or stream.get("nb_frames") or 0)- if frames <= 0:- raise ValueError("Could not determine an exact frame count for this video.")- rate_text = stream.get("avg_frame_rate") or stream.get("r_frame_rate") or "30/1"- rate = Fraction(rate_text) if rate_text != "0/0" else Fraction(30, 1)- transfer = stream.get("color_transfer") or "unknown"- return {- "width": width,- "height": height,- "coded_width": int(stream["width"]),- "coded_height": int(stream["height"]),- "rotation": rotation,- "frames": frames,- "fps": float(rate),- "rate": rate,- "time_base": Fraction(stream.get("time_base") or "1/1000"),- "duration": float((data.get("format") or {}).get("duration") or stream.get("duration") or 0),- "codec": stream.get("codec_name") or "unknown",- "format": (data.get("format") or {}).get("format_name") or "unknown",- "color_transfer": transfer,- "hdr": transfer in {"smpte2084", "arib-std-b67"},- }---def detect_gpu() -> dict:- command = [- "nvidia-smi",- "--query-gpu=name,driver_version,memory.total,compute_cap",- "--format=csv,noheader,nounits",- ]- try:- result = subprocess.run(command, capture_output=True, text=True, timeout=10)- except (OSError, subprocess.TimeoutExpired) as exc:- raise RuntimeError("NVIDIA driver tools are unavailable; an RTX GPU and current driver are required.") from exc- candidates = []- for line in result.stdout.splitlines():- parts = [part.strip() for part in line.split(",")]- if len(parts) >= 4 and "RTX" in parts[0].upper():- candidates.append(parts)- if not candidates:- raise RuntimeError("No supported NVIDIA RTX GPU was detected.")- name, driver, memory, capability = candidates[0]- match = re.search(r"RTX\s+(\d{2})", name.upper())- generation = int(match.group(1)) if match else 0- if generation < 30:- raise RuntimeError(f"{name} is outside the supported RTX 30/40/50 scope.")- return {- "name": name,- "driver": driver,- "memory_mb": int(memory),- "compute_capability": capability,- "generation": generation,- "beta": generation == 30,- }---def resolve_size(metadata: dict, options: ConversionOptions) -> tuple[int, int]:- return int(metadata["width"]), int(metadata["height"])---def _resize_fit(rgba: np.ndarray, width: int, height: int) -> np.ndarray:- source_h, source_w = rgba.shape[:2]- scale = min(width / source_w, height / source_h)- fit_w = max(1, min(width, int(round(source_w * scale))))- fit_h = max(1, min(height, int(round(source_h * scale))))- resized = cv2.resize(rgba, (fit_w, fit_h), interpolation=cv2.INTER_LANCZOS4)- canvas = np.zeros((height, width, 4), dtype=np.uint8)- canvas[..., 3] = 255- x = (width - fit_w) // 2- y = (height - fit_h) // 2- canvas[y : y + fit_h, x : x + fit_w] = resized- return canvas---def _rotate(frame: np.ndarray, rotation: int) -> np.ndarray:- if rotation == 90:- return np.ascontiguousarray(np.rot90(frame, 3))- if rotation == 180:- return np.ascontiguousarray(np.rot90(frame, 2))- if rotation == 270:- return np.ascontiguousarray(np.rot90(frame, 1))- return frame---def _read_exact(stream, size: int) -> bytes:- chunks = bytearray()- while len(chunks) < size:- block = stream.read(size - len(chunks))- if not block:- raise EOFError(f"Native worker stopped after {len(chunks)} of {size} output bytes")- chunks.extend(block)- return bytes(chunks)---def _drain_text(stream, lines: list[str]) -> None:- for raw in iter(stream.readline, b""):- lines.append(raw.decode("utf-8", "replace").rstrip())---def _encoder_probe(codec: str) -> bool:- command = [- str(FFMPEG), "-v", "error", "-f", "lavfi", "-i", "color=size=256x256:rate=1",- "-frames:v", "1", "-c:v", codec, "-f", "null", "-",- ]- return subprocess.run(command, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL).returncode == 0---def _codec_command(options: ConversionOptions) -> tuple[list[str], str]:- cq = {"High": "17", "Balanced": "20", "Small": "24"}[options.quality]- if options.codec == "H.264":- if _encoder_probe("h264_nvenc"):- return ["-c:v", "h264_nvenc", "-preset", "p6", "-tune", "hq", "-rc", "vbr", "-cq", cq, "-b:v", "0", "-pix_fmt", "yuv420p"], "h264_nvenc"- return ["-c:v", "libx264", "-preset", "slow", "-crf", cq, "-pix_fmt", "yuv420p"], "libx264"- if options.codec == "HEVC":- if _encoder_probe("hevc_nvenc"):- return ["-c:v", "hevc_nvenc", "-preset", "p6", "-tune", "hq", "-rc", "vbr", "-cq", cq, "-b:v", "0", "-pix_fmt", "yuv420p"], "hevc_nvenc"- return ["-c:v", "libx265", "-preset", "slow", "-crf", cq, "-pix_fmt", "yuv420p"], "libx265"- if not _encoder_probe("av1_nvenc"):- raise RuntimeError("AV1 NVENC is not supported by this GPU/driver. Choose H.264 or HEVC.")- return ["-c:v", "av1_nvenc", "-preset", "p6", "-rc", "vbr", "-cq", cq, "-b:v", "0", "-pix_fmt", "yuv420p"], "av1_nvenc"---def _start_encoder(temp_video: Path, options: ConversionOptions, controller: JobController):- codec_args, selected = _codec_command(options)- command = [- str(FFMPEG), "-hide_banner", "-loglevel", "warning", "-y", "-f", "nut", "-i", "pipe:0",- "-map", "0:v:0", "-an", *codec_args, "-fps_mode", "passthrough", str(temp_video),- ]- process = subprocess.Popen(command, stdin=subprocess.PIPE, stdout=subprocess.DEVNULL, stderr=subprocess.PIPE)- controller.register(process)- logs: list[str] = []- thread = threading.Thread(target=_drain_text, args=(process.stderr, logs), daemon=True)- thread.start()- return process, thread, logs, selected---def _final_mux(temp_video: Path, source: Path, output: Path, options: ConversionOptions) -> None:- if options.container == "MKV":- maps = ["-map", "0:v:0", "-map", "1:a?", "-map", "1:s?"]- streams = ["-c:v", "copy", "-c:a", "copy", "-c:s", "copy"]- else:- maps = ["-map", "0:v:0", "-map", "1:a?"]- streams = ["-c:v", "copy", "-c:a", "aac", "-b:a", "192k", "-movflags", "+faststart"]- command = [- str(FFMPEG), "-hide_banner", "-loglevel", "warning", "-y", "-i", str(temp_video), "-i", str(source),- *maps, "-map_metadata", "1", "-map_chapters", "1", *streams, "-shortest", str(output),- ]- result = subprocess.run(command, capture_output=True, text=True, encoding="utf-8", errors="replace")- if result.returncode:- raise RuntimeError("Final audio/metadata mux failed:\n" + result.stderr[-4000:])---def convert_video(- input_path: str | os.PathLike[str],- options: ConversionOptions | None = None,- progress: Callable[[float, str], None] | None = None,-) -> ConversionResult:- global _ACTIVE- options = options or ConversionOptions()- source = Path(input_path).resolve()- if not source.is_file():- raise FileNotFoundError(source)- if options.preserve_hdr:- raise RuntimeError("HDR preservation is disabled in this build because the verified DLSSNR path is RGBA8. HDR input is converted to SDR instead of being mislabeled as HDR.")- required = [FFMPEG, FFPROBE, WORKER, RUNTIME / "nvngx_dlssnr.dll"]- missing = [str(path) for path in required if not path.exists()]- if missing:- raise RuntimeError("Portable runtime is incomplete:\n" + "\n".join(missing))-- controller = JobController()- if not _ACTIVE_LOCK.acquire(blocking=False):- raise RuntimeError("Another GPU render is already running.")- _ACTIVE = controller- started = time.perf_counter()- job_dir: Path | None = None- output: Path | None = None- try:- metadata = probe_video(source)- gpu = detect_gpu()- width, height = resolve_size(metadata, options)- OUTPUTS.mkdir(exist_ok=True)- JOBS.mkdir(exist_ok=True)- stamp = time.strftime("%Y%m%d-%H%M%S") + f"-{time.time_ns() % 1_000_000:06d}"- job_dir = JOBS / f"{source.stem}-{stamp}-{os.getpid()}"- job_dir.mkdir(parents=True, exist_ok=False)- extension = ".mkv" if options.container == "MKV" else ".mp4"- output = OUTPUTS / f"{source.stem}_DLSS5_{stamp}{extension}"- temp_video = job_dir / "processed-video.mkv"- native = PROFILES.get(options.profile)- if native is None:- raise RuntimeError(f"Unknown native DLSS 5 profile: {options.profile}")- if progress:- progress(0.01, f"Starting feature 18 on {gpu['name']}")-- creation_flags = getattr(subprocess, "CREATE_NO_WINDOW", 0)- worker = subprocess.Popen(- [str(WORKER), "--video"], cwd=RUNTIME, stdin=subprocess.PIPE, stdout=subprocess.PIPE,- stderr=subprocess.PIPE, creationflags=creation_flags,- )- controller.register(worker)- worker_logs: list[str] = []- worker_thread = threading.Thread(target=_drain_text, args=(worker.stderr, worker_logs), daemon=True)- worker_thread.start()- header = struct.pack(- "<10I4f", VIDEO_MAGIC, width, height, int(options.warmup_frames), int(metadata["frames"]),- native["profile"], native["preset"], native["style"], native["auto_mask"], native["ui_correction"],- native["intensity"], native["local_tone"], native["local_structure"], native["skin_structure"],- )- worker.stdin.write(header)- worker.stdin.flush()-- encoder, encoder_thread, encoder_logs, selected_encoder = _start_encoder(temp_video, options, controller)- nut = av.open(encoder.stdin, mode="w", format="nut")- input_container = av.open(str(source))- input_stream = input_container.streams.video[0]- input_stream.thread_type = "AUTO"- rate = input_stream.average_rate or metadata["rate"]- raw_stream = nut.add_stream("rawvideo", rate=rate)- raw_stream.width = width- raw_stream.height = height- raw_stream.pix_fmt = "rgba"- raw_stream.time_base = input_stream.time_base or metadata["time_base"]- guides = TemporalGuideGenerator(width, height)- delivered = 0- scene_resets = 0- for index, frame in enumerate(input_container.decode(input_stream)):- if controller.cancel.is_set():- raise Cancelled("Render stopped by user.")- rgba = frame.to_ndarray(format="rgba")- rgba = _rotate(rgba, metadata["rotation"])- if rgba.shape[1] != width or rgba.shape[0] != height:- rgba = _resize_fit(rgba, width, height)- rgba = np.ascontiguousarray(rgba, dtype=np.uint8)- guide = guides.process(rgba)- scene_resets += int(guide.reset and index != 0)- pts = int(frame.pts if frame.pts is not None else index)- frame_header = struct.pack("<4Iq", FRAME_MAGIC, index, int(guide.reset), 0, pts)- worker.stdin.write(frame_header)- worker.stdin.write(rgba.tobytes())- worker.stdin.write(guide.motion.tobytes())- worker.stdin.flush()-- result_header = _read_exact(worker.stdout, struct.calcsize("<5Iq"))- magic, out_index, ok, byte_count, ngx_result, out_pts = struct.unpack("<5Iq", result_header)- if magic != OUT_MAGIC or not ok or out_index != index or byte_count != width * height * 4:- raise RuntimeError(f"Invalid native worker response for frame {index}")- if ngx_result != 1:- raise RuntimeError(f"Direct feature-18 evaluation failed on frame {index}: 0x{ngx_result:08X}")- processed = np.frombuffer(_read_exact(worker.stdout, byte_count), dtype=np.uint8).reshape(height, width, 4)- out_frame = av.VideoFrame.from_ndarray(processed, format="rgba")- out_frame.pts = out_pts- out_frame.time_base = input_stream.time_base or metadata["time_base"]- for packet in raw_stream.encode(out_frame):- nut.mux(packet)- delivered += 1- if progress:- progress(0.04 + 0.84 * delivered / metadata["frames"], f"DLSS 5 frame {delivered}/{metadata['frames']}")-- if delivered != metadata["frames"]:- raise RuntimeError(f"Decoded {delivered} frames but probe reported {metadata['frames']}; refusing an incomplete render.")- for packet in raw_stream.encode():- nut.mux(packet)- nut.close()- if encoder.stdin and not encoder.stdin.closed:- encoder.stdin.close()- input_container.close()- worker.stdin.close()- worker_code = worker.wait(timeout=60)- worker_thread.join(timeout=2)- controller.unregister(worker)- encoder_code = encoder.wait(timeout=120)- encoder_thread.join(timeout=2)- controller.unregister(encoder)- if worker_code:- raise RuntimeError("Native DLSS worker failed:\n" + "\n".join(worker_logs[-40:]))- if encoder_code:- raise RuntimeError("Video encoder failed:\n" + "\n".join(encoder_logs[-40:]))-- nr_count = delivered- create_matches = re.findall(r"direct feature 18 ready:.*result=0x([0-9A-Fa-f]{8})", "\n".join(worker_logs))- if not create_matches:- raise RuntimeError("Direct feature-18 creation result was not reported; refusing unverifiable output.")- direct_create_result = f"0x{create_matches[-1].upper()}"- if progress:- progress(0.91, "Muxing original audio and metadata")- _final_mux(temp_video, source, output, options)- verified = probe_video(output)- if verified["frames"] != delivered:- raise RuntimeError(f"Output verification found {verified['frames']} frames instead of {delivered}.")-- elapsed = time.perf_counter() - started- report = {- "status": "success",- "input": str(source),- "output": str(output),- "options": asdict(options),- "input_metadata": {key: str(value) if isinstance(value, Fraction) else value for key, value in metadata.items()},- "output_metadata": {key: str(value) if isinstance(value, Fraction) else value for key, value in verified.items()},- "gpu": gpu,- "encoder": selected_encoder,- "frames_processed": delivered,- "scene_resets": scene_resets,- "pipeline": "direct-dlssnr-feature18",- "feature_id": 18,- "feature_18_confirmed": True,- "direct_create_result": direct_create_result,- "successful_direct_evaluations": nr_count,- "model_sha256": hashlib.sha256((RUNTIME / "nvngx_dlssnr.dll").read_bytes()).hexdigest(),- "worker_sha256": hashlib.sha256(WORKER.read_bytes()).hexdigest(),- "loaded_module_inventory": ["nvngx.dll (standalone worker image)", "nvngx_dlssnr.dll", "system D3D12/DXGI/NGX core"],- "carrier_modules_absent": {"nvngx_dlss.dll": True, "ReShade": True, "RenoDX": True},- "native_settings": native,- "elapsed_seconds": elapsed,- "average_fps": delivered / elapsed,- "worker_log": worker_logs,- "encoder_log": encoder_logs,- }- report_path = output.with_suffix(output.suffix + ".report.json")- report_path.write_text(json.dumps(report, indent=2), encoding="utf-8")- if progress:- progress(1.0, "Complete — feature 18 confirmed")- return ConversionResult(str(output), str(report_path), delivered, nr_count, elapsed, gpu["name"])- except Exception as exc:- was_cancelled = controller.cancel.is_set()- controller.stop()- if output and output.exists():- output.unlink()- if was_cancelled and not isinstance(exc, Cancelled):- raise Cancelled("Render stopped by user.") from exc- raise- finally:- _ACTIVE = None- _ACTIVE_LOCK.release()- if job_dir and job_dir.exists():- shutil.rmtree(job_dir, ignore_errors=True)diff --git a/dlss5_converter/guides.py b/dlss5_converter/guides.pydeleted file mode 100644index 785f78b..0000000--- a/dlss5_converter/guides.py+++ /dev/null@@ -1,84 +0,0 @@-from __future__ import annotations--from dataclasses import dataclass--import cv2-import numpy as np---@dataclass(slots=True)-class GuideFrame:- motion: np.ndarray- reset: bool- scene_score: float---class TemporalGuideGenerator:- """Estimate the guide buffers an encoded video does not contain."""-- def __init__(self, width: int, height: int, flow_width: int = 640) -> None:- self.width = width- self.height = height- scale = min(1.0, flow_width / width)- self.flow_width = max(64, int(round(width * scale / 2) * 2))- self.flow_height = max(64, int(round(height * scale / 2) * 2))- self.previous_gray: np.ndarray | None = None- self.dis = cv2.DISOpticalFlow_create(cv2.DISOPTICAL_FLOW_PRESET_MEDIUM)- self.dis.setUseSpatialPropagation(True)- self.dis.setFinestScale(1)-- def _small_gray(self, rgba: np.ndarray) -> np.ndarray:- gray = cv2.cvtColor(rgba, cv2.COLOR_RGBA2GRAY)- return cv2.resize(gray, (self.flow_width, self.flow_height), interpolation=cv2.INTER_AREA)-- def process(self, rgba: np.ndarray) -> GuideFrame:- current = self._small_gray(rgba)- pixels = self.width * self.height- if self.previous_gray is None:- motion = np.zeros((self.height, self.width, 2), dtype=np.float32)- reset = True- scene_score = 1.0- else:- scene_score = float(np.mean(cv2.absdiff(current, self.previous_gray))) / 255.0- reset = scene_score > 0.24- if reset:- motion = np.zeros((self.height, self.width, 2), dtype=np.float32)- else:- # NGX consumes current-to-previous motion in pixel units.- cur_to_prev = self.dis.calc(current, self.previous_gray, None)- prev_to_cur = self.dis.calc(self.previous_gray, current, None)- yy, xx = np.mgrid[0 : self.flow_height, 0 : self.flow_width].astype(np.float32)- sample_x = xx + cur_to_prev[..., 0]- sample_y = yy + cur_to_prev[..., 1]- reverse = cv2.remap(- prev_to_cur,- sample_x,- sample_y,- cv2.INTER_LINEAR,- borderMode=cv2.BORDER_CONSTANT,- )- consistency = cv2.magnitude(- cur_to_prev[..., 0] + reverse[..., 0],- cur_to_prev[..., 1] + reverse[..., 1],- )- warped_previous = cv2.remap(- self.previous_gray,- sample_x,- sample_y,- cv2.INTER_LINEAR,- borderMode=cv2.BORDER_REFLECT,- )- residual = cv2.absdiff(current, warped_previous).astype(np.float32) / 255.0- invalid = np.maximum(np.clip(consistency / 2.5, 0.0, 1.0), np.clip(residual * 4.0, 0.0, 1.0))- invalid = cv2.dilate(invalid, np.ones((3, 3), np.uint8), iterations=1)-- motion = cv2.resize(cur_to_prev, (self.width, self.height), interpolation=cv2.INTER_LINEAR)- motion[..., 0] *= self.width / self.flow_width- motion[..., 1] *= self.height / self.flow_height- self.previous_gray = current- assert motion.size == pixels * 2- return GuideFrame(- motion=np.ascontiguousarray(motion.astype(np.float16)),- reset=reset,- scene_score=scene_score,- )diff --git a/native/DLSS5-Feeder/LICENSE b/native/DLSS5-Feeder/LICENSEdeleted file mode 100644index 8f2a5b5..0000000--- a/native/DLSS5-Feeder/LICENSE+++ /dev/null@@ -1,23 +0,0 @@-MIT License--Copyright (c) 2026 Jean-Laurent ROUZIES--Portions derived from dlss5-dx11-bridge, Copyright (c) 2026 NIGos (MIT), see external/bridge-1.0.19/LICENSE.--Permission is hereby granted, free of charge, to any person obtaining a copy-of this software and associated documentation files (the "Software"), to deal-in the Software without restriction, including without limitation the rights-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell-copies of the Software, and to permit persons to whom the Software is-furnished to do so, subject to the following conditions:--The above copyright notice and this permission notice shall be included in all-copies or substantial portions of the Software.--THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE-SOFTWARE.diff --git a/native/DLSS5-Feeder/host/dlss5-feed-host64.cpp b/native/DLSS5-Feeder/host/dlss5-feed-host64.cppdeleted file mode 100644index 8def3af..0000000--- a/native/DLSS5-Feeder/host/dlss5-feed-host64.cpp+++ /dev/null@@ -1,1260 +0,0 @@-// dlss5-feed-host64 - the 64-bit half of DLSS5-Feeder for 32-bit games.-//-// A 32-bit game cannot load NGX or the DLSS 5 add-on (both x64-only). This little-// process can: it puts ReShade x64 (dxgi.dll) and renodx-dlss5.addon64 next to-// itself, opens a hidden 1x1 window with a minimal D3D12 swapchain -- so from the-// DLSS 5 add-on's point of view it IS a D3D12 game -- and runs the NGX DLAA-// evaluate on frames the game delivers through cross-process shared textures-// (created game-side on D3D11; see the phase-0 spike) and shared fences.-//-// dlss5-feed-host64.exe --test stand-alone: synthetic pattern, no game needed-// (phase-1 proof: "feature 18 created" in ReShade.log)-// dlss5-feed-host64.exe <pid> serve the game with that PID over the pipe-//-// Logs to dlss5-feed-host.log next to the exe; the DLSS 5 add-on's own state-// appears in the host's ReShade.log.--#define WIN32_LEAN_AND_MEAN-#define NOMINMAX-#include <windows.h>-#include <d3d12.h>-#include <dxgi1_4.h>-#include <cstdio>-#include <cstdarg>-#include <cstdint>-#include <cstring>-#include <algorithm>-#include <fcntl.h>-#include <io.h>-#include <vector>--#include <nvsdk_ngx.h>-#include <nvsdk_ngx_helpers.h>--#include "../src/feed_ipc.h"--// ----------------------------------------------------------------------------// Logging-// -----------------------------------------------------------------------------static char g_log_path[MAX_PATH];-static bool g_show_window = false; // visible host window = the user's door to the DLSS 5 panel-static bool g_renodx_lazy = false; // DLSS 5 add-on is v45+ (per-present rescan, lazy adoption)-static bool g_video_mode = false; // stdin/stdout are a binary frame protocol in this mode--static void Log(const char *fmt, ...);--// Detect the DLSS 5 add-on generation next to this exe: v45+ ('EnableHooks' marker in-// the binary) rescans every present and adopts missed features lazily, so the warm-up-// re-create is unnecessary -- and its EnableHooks key should be '2' (NGX-only) for this-// feeder, written into OUR ReShade.ini before ReShade loads and the add-on reads it.-static void DetectRenodxAddon()-{- char dir[MAX_PATH], path[MAX_PATH], ini[MAX_PATH];- GetModuleFileNameA(nullptr, dir, MAX_PATH);- if (char *s = strrchr(dir, '\\')) *(s + 1) = '\0';- sprintf_s(path, "%srenodx-dlss5.addon64", dir);- sprintf_s(ini, "%sReShade.ini", dir);-- HANDLE f = CreateFileA(path, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, nullptr, OPEN_EXISTING, 0, nullptr);- if (f == INVALID_HANDLE_VALUE) { Log("[host] renodx-dlss5.addon64 not found next to the host"); return; }- const DWORD size = GetFileSize(f, nullptr);- DWORD got = 0;- char *buf = (size > 0 && size < 8u * 1024 * 1024) ? static_cast<char *>(malloc(size)) : nullptr;- if (buf != nullptr && ReadFile(f, buf, size, &got, nullptr) && got == size)- for (DWORD i = 0; i + 11 < size; ++i)- if (memcmp(buf + i, "EnableHooks", 11) == 0) { g_renodx_lazy = true; break; }- free(buf);- CloseHandle(f);-- char ver[48] = "?";- DWORD dummy = 0;- const DWORD vsize = GetFileVersionInfoSizeA(path, &dummy);- if (vsize > 0)- {- void *vdata = malloc(vsize);- VS_FIXEDFILEINFO *ffi = nullptr;- UINT flen = 0;- if (vdata != nullptr && GetFileVersionInfoA(path, 0, vsize, vdata) &&- VerQueryValueA(vdata, "\\", reinterpret_cast<void **>(&ffi), &flen) && ffi != nullptr)- sprintf_s(ver, "%u.%u.%u.%u", HIWORD(ffi->dwFileVersionMS), LOWORD(ffi->dwFileVersionMS),- HIWORD(ffi->dwFileVersionLS), LOWORD(ffi->dwFileVersionLS));- free(vdata);- }- Log("[host] DLSS 5 add-on: v%s -- %s engine", ver,- g_renodx_lazy ? "v45+ (lazy adoption; warm-up skipped)" : "classic (warm-up stays on)");-- if (g_renodx_lazy)- {- char v[16] = {};- GetPrivateProfileStringA("RenoDX.DLSS5", "EnableHooks", "", v, sizeof(v), ini);- if (v[0] == '\0')- {- WritePrivateProfileStringA("RenoDX.DLSS5", "EnableHooks", "2", ini);- Log("[host] EnableHooks was unset; wrote EnableHooks=2 into the host's ReShade.ini");- }- else- Log("[host] EnableHooks=%s (user-set; leaving it alone)", v);- }-}--static void Log(const char *fmt, ...)-{- char line[2048];- va_list ap;- va_start(ap, fmt);- _vsnprintf_s(line, sizeof(line), _TRUNCATE, fmt, ap);- va_end(ap);- SYSTEMTIME st;- GetLocalTime(&st);- FILE *console = g_video_mode ? stderr : stdout;- fprintf(console, "%02u:%02u:%02u.%03u %s\n", st.wHour, st.wMinute, st.wSecond, st.wMilliseconds, line);- fflush(console);- FILE *f = nullptr;- if (!g_video_mode && fopen_s(&f, g_log_path, "a") == 0 && f != nullptr)- {- fprintf(f, "%02u:%02u:%02u.%03u %s\n", st.wHour, st.wMinute, st.wSecond, st.wMilliseconds, line);- fclose(f);- }-}--static const char *NgxResultName(NVSDK_NGX_Result r)-{- switch (static_cast<unsigned>(r))- {- case 0x1: return "Success";- case 0xBAD00005: return "InvalidParameter";- case 0xBAD00007: return "NotInitialized";- case 0xBAD00008: return "UnsupportedInputFormat";- case 0xBAD0000A: return "MissingInput";- case 0xBAD0000B: return "UnableToInitializeFeature";- case 0xBAD0000D: return "OutOfGPUMemory";- case 0xBAD0000E: return "UnsupportedFormat";- default: return "?";- }-}--// ----------------------------------------------------------------------------// State-// -----------------------------------------------------------------------------struct Host-{- HWND hwnd;- IDXGISwapChain1 *swap;- ID3D12Device *dev;- ID3D12CommandQueue *queue; // NGX work- ID3D12CommandQueue *pump_queue; // owns the dummy swapchain- ID3D12GraphicsCommandList *list;- static const int kFrames = 3;- ID3D12CommandAllocator *alloc[kFrames];- UINT64 alloc_fence[kFrames];- int frame_slot;- ID3D12Fence *fence; // internal (allocator ring)- HANDLE fence_event;- UINT64 fence_value;-- // cross-process- ID3D12Fence *fence_in; // game signals, host waits- ID3D12Fence *fence_out; // host signals, game waits-- bool ngx_inited;- NVSDK_NGX_Parameter *params;- NVSDK_NGX_Handle *feature;-- ID3D12Resource *tex[FEED_SLOTS];- UINT width, height;- DXGI_FORMAT color_fmt, output_fmt;-};--static Host h;--using PFN_NR_InitExt = NVSDK_NGX_Result (NVSDK_CONV *)(unsigned long long, const wchar_t *, ID3D12Device *, NVSDK_NGX_Version, const NVSDK_NGX_Parameter *);-using PFN_NR_Create = NVSDK_NGX_Result (NVSDK_CONV *)(ID3D12GraphicsCommandList *, NVSDK_NGX_Feature, const NVSDK_NGX_Parameter *, NVSDK_NGX_Handle **);-using PFN_NR_Evaluate = NVSDK_NGX_Result (NVSDK_CONV *)(ID3D12GraphicsCommandList *, const NVSDK_NGX_Handle *, const NVSDK_NGX_Parameter *, PFN_NVSDK_NGX_ProgressCallback);-using PFN_NR_Release = NVSDK_NGX_Result (NVSDK_CONV *)(NVSDK_NGX_Handle *);-static HMODULE g_nr_module;-static PFN_NR_InitExt g_nr_init_ext;-static PFN_NR_Create g_nr_create;-static PFN_NR_Evaluate g_nr_evaluate;-static PFN_NR_Release g_nr_release;-static uint32_t g_create_result;-static uint32_t g_eval_count;--static bool InitDirectNr(const wchar_t *data_path)-{- g_nr_module = LoadLibraryW(L"nvngx_dlssnr.dll");- if (!g_nr_module) { Log("[pure] LoadLibrary(nvngx_dlssnr.dll) failed %lu", GetLastError()); return false; }- g_nr_init_ext = reinterpret_cast<PFN_NR_InitExt>(GetProcAddress(g_nr_module, "NVSDK_NGX_D3D12_Init_Ext"));- g_nr_create = reinterpret_cast<PFN_NR_Create>(GetProcAddress(g_nr_module, "NVSDK_NGX_D3D12_CreateFeature"));- g_nr_evaluate = reinterpret_cast<PFN_NR_Evaluate>(GetProcAddress(g_nr_module, "NVSDK_NGX_D3D12_EvaluateFeature"));- g_nr_release = reinterpret_cast<PFN_NR_Release>(GetProcAddress(g_nr_module, "NVSDK_NGX_D3D12_ReleaseFeature"));- if (!g_nr_init_ext || !g_nr_create || !g_nr_evaluate || !g_nr_release) return false;- const auto r = g_nr_init_ext(0x1000000ULL, data_path, h.dev, NVSDK_NGX_Version_API, h.params);- Log("[pure] direct DLSSNR Init_Ext -> 0x%08X (%s)", r, NgxResultName(r));- return NVSDK_NGX_SUCCEED(r);-}--// ----------------------------------------------------------------------------// Command submission (allocator ring), same shape as the add-on-// -----------------------------------------------------------------------------static bool BeginCommands()-{- const int slot = h.frame_slot;- const UINT64 retire = h.alloc_fence[slot];- if (retire != 0 && h.fence->GetCompletedValue() < retire)- {- h.fence->SetEventOnCompletion(retire, h.fence_event);- if (WaitForSingleObject(h.fence_event, 2000) != WAIT_OBJECT_0)- { Log("[host] GPU did not retire allocator slot %d", slot); return false; }- }- if (FAILED(h.alloc[slot]->Reset())) return false;- return SUCCEEDED(h.list->Reset(h.alloc[slot], nullptr));-}--static UINT64 EndCommands()-{- h.list->Close();- ID3D12CommandList *lists[] = { h.list };- h.queue->ExecuteCommandLists(1, lists);- const UINT64 v = ++h.fence_value;- h.queue->Signal(h.fence, v);- h.alloc_fence[h.frame_slot] = v;- h.frame_slot = (h.frame_slot + 1) % Host::kFrames;- return v;-}--static bool WaitFenceValue(ID3D12Fence *f, UINT64 v, DWORD ms)-{- if (f->GetCompletedValue() >= v) return true;- f->SetEventOnCompletion(v, h.fence_event);- return WaitForSingleObject(h.fence_event, ms) == WAIT_OBJECT_0;-}--static void CloseListGuarded()-{- __try { h.list->Close(); } __except (EXCEPTION_EXECUTE_HANDLER) {}-}--static void AbortCommands() // never execute a list NGX crashed in-{- if (h.list == nullptr) return;- CloseListGuarded();- h.list->Release();- h.list = nullptr;- if (SUCCEEDED(h.dev->CreateCommandList(0, D3D12_COMMAND_LIST_TYPE_DIRECT, h.alloc[h.frame_slot], nullptr,- __uuidof(ID3D12GraphicsCommandList), reinterpret_cast<void **>(&h.list))))- h.list->Close();-}--static NVSDK_NGX_Result SafeCreateDLSS(NVSDK_NGX_DLSS_Create_Params *cp, DWORD *code)-{- *code = 0;- __try { return NGX_D3D12_CREATE_DLSS_EXT(h.list, 1, 1, &h.feature, h.params, cp); }- __except (EXCEPTION_EXECUTE_HANDLER) { *code = GetExceptionCode(); return static_cast<NVSDK_NGX_Result>(0x7FFFFFFF); }-}--static NVSDK_NGX_Result SafeEvaluateDLSS(NVSDK_NGX_D3D12_DLSS_Eval_Params *ep, DWORD *code)-{- *code = 0;- __try { return NGX_D3D12_EVALUATE_DLSS_EXT(h.list, h.feature, h.params, ep); }- __except (EXCEPTION_EXECUTE_HANDLER) { *code = GetExceptionCode(); return static_cast<NVSDK_NGX_Result>(0x7FFFFFFF); }-}--static void SafeReleaseFeature(NVSDK_NGX_Handle *f)-{- if (f == nullptr) return;- __try { NVSDK_NGX_D3D12_ReleaseFeature(f); }- __except (EXCEPTION_EXECUTE_HANDLER) { Log("[host] ReleaseFeature raised 0x%08X (ignored)", GetExceptionCode()); }-}--// ----------------------------------------------------------------------------// The disguise: hidden window + minimal D3D12 swapchain so ReShade x64 loads-// and the DLSS 5 add-on arms itself, exactly as in a real D3D12 game.-// -----------------------------------------------------------------------------static LRESULT CALLBACK WndProc(HWND w, UINT m, WPARAM wp, LPARAM lp)-{- if (m == WM_CLOSE) { ShowWindow(w, SW_HIDE); return 0; } // closing only hides; the feed lives on- return DefWindowProcW(w, m, wp, lp);-}--// --- banner: "32-bit DLSS 5 Feeder" rendered once with GDI, copied into every frame -----static ID3D12Resource *g_banner;-static IDXGISwapChain3 *g_swap3;-static ID3D12CommandAllocator *g_pump_alloc;-static ID3D12GraphicsCommandList *g_pump_list;-static ID3D12Fence *g_pump_fence;-static UINT64 g_pump_val;-static HANDLE g_pump_ev;--static bool BeginCommands();-static UINT64 EndCommands();-static bool WaitFenceValue(ID3D12Fence *f, UINT64 v, DWORD ms);--static void InitBanner()-{- const int W = 960, H = 540;-- // 1. Render the text with GDI into a 32-bit DIB.- BITMAPINFO bi = {};- bi.bmiHeader.biSize = sizeof(bi.bmiHeader);- bi.bmiHeader.biWidth = W;- bi.bmiHeader.biHeight = -H; // top-down- bi.bmiHeader.biPlanes = 1;- bi.bmiHeader.biBitCount = 32;- bi.bmiHeader.biCompression = BI_RGB;- void *bits = nullptr;- HDC dc = CreateCompatibleDC(nullptr);- HBITMAP bmp = CreateDIBSection(dc, &bi, DIB_RGB_COLORS, &bits, nullptr, 0);- if (dc == nullptr || bmp == nullptr || bits == nullptr) return;- HGDIOBJ old_bmp = SelectObject(dc, bmp);-- RECT full = { 0, 0, W, H };- HBRUSH bg = CreateSolidBrush(RGB(18, 18, 22));- FillRect(dc, &full, bg);- DeleteObject(bg);- SetBkMode(dc, TRANSPARENT);-- HFONT fnt_big = CreateFontW(64, 0, 0, 0, FW_BOLD, FALSE, FALSE, FALSE, DEFAULT_CHARSET, 0, 0,- CLEARTYPE_QUALITY, DEFAULT_PITCH, L"Segoe UI");- HFONT fnt_small = CreateFontW(26, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, DEFAULT_CHARSET, 0, 0,- CLEARTYPE_QUALITY, DEFAULT_PITCH, L"Segoe UI");- HGDIOBJ old_font = SelectObject(dc, fnt_big);- SetTextColor(dc, RGB(118, 185, 0));- RECT r1 = { 0, 150, W, 240 };- DrawTextW(dc, L"32-bit DLSS 5 Feeder", -1, &r1, DT_CENTER | DT_SINGLELINE | DT_VCENTER);- SelectObject(dc, fnt_small);- SetTextColor(dc, RGB(200, 200, 205));- RECT r2 = { 0, 260, W, 300 };- DrawTextW(dc, L"DLSS 5 neural rendering runs here for your 32-bit game.", -1, &r2,- DT_CENTER | DT_SINGLELINE | DT_VCENTER);- RECT r3 = { 0, 305, W, 345 };- DrawTextW(dc, L"Press Home in this window to tune it \x2022 closing only hides the window", -1, &r3,- DT_CENTER | DT_SINGLELINE | DT_VCENTER);- SelectObject(dc, old_font);- DeleteObject(fnt_big);- DeleteObject(fnt_small);- GdiFlush();-- // 2. Upload it (BGRA -> RGBA) and keep it as a copy source.- D3D12_HEAP_PROPERTIES up = {};- up.Type = D3D12_HEAP_TYPE_UPLOAD;- const UINT pitch = (W * 4 + 255) & ~255u;- D3D12_RESOURCE_DESC bd = {};- bd.Dimension = D3D12_RESOURCE_DIMENSION_BUFFER;- bd.Width = static_cast<UINT64>(pitch) * H;- bd.Height = 1;- bd.DepthOrArraySize = 1;- bd.MipLevels = 1;- bd.SampleDesc.Count = 1;- bd.Layout = D3D12_TEXTURE_LAYOUT_ROW_MAJOR;- ID3D12Resource *staging = nullptr;- D3D12_HEAP_PROPERTIES def = {};- def.Type = D3D12_HEAP_TYPE_DEFAULT;- D3D12_RESOURCE_DESC td = {};- td.Dimension = D3D12_RESOURCE_DIMENSION_TEXTURE2D;- td.Width = W;- td.Height = H;- td.DepthOrArraySize = 1;- td.MipLevels = 1;- td.Format = DXGI_FORMAT_R8G8B8A8_UNORM;- td.SampleDesc.Count = 1;- td.Layout = D3D12_TEXTURE_LAYOUT_UNKNOWN;- if (FAILED(h.dev->CreateCommittedResource(&up, D3D12_HEAP_FLAG_NONE, &bd, D3D12_RESOURCE_STATE_GENERIC_READ,- nullptr, __uuidof(ID3D12Resource), reinterpret_cast<void **>(&staging))) ||- FAILED(h.dev->CreateCommittedResource(&def, D3D12_HEAP_FLAG_NONE, &td, D3D12_RESOURCE_STATE_COPY_DEST,- nullptr, __uuidof(ID3D12Resource), reinterpret_cast<void **>(&g_banner))))- { SelectObject(dc, old_bmp); DeleteObject(bmp); DeleteDC(dc); return; }-- BYTE *dst = nullptr;- staging->Map(0, nullptr, reinterpret_cast<void **>(&dst));- const BYTE *srcp = static_cast<const BYTE *>(bits);- for (int y = 0; y < H; ++y)- for (int x = 0; x < W; ++x)- {- const BYTE *p = srcp + (static_cast<size_t>(y) * W + x) * 4; // GDI: BGRA- BYTE *q = dst + static_cast<size_t>(y) * pitch + static_cast<size_t>(x) * 4;- q[0] = p[2]; q[1] = p[1]; q[2] = p[0]; q[3] = 0xFF;- }- staging->Unmap(0, nullptr);- SelectObject(dc, old_bmp);- DeleteObject(bmp);- DeleteDC(dc);-- if (BeginCommands())- {- D3D12_TEXTURE_COPY_LOCATION src = {}, dcl = {};- src.pResource = staging;- src.Type = D3D12_TEXTURE_COPY_TYPE_PLACED_FOOTPRINT;- src.PlacedFootprint.Footprint.Format = DXGI_FORMAT_R8G8B8A8_UNORM;- src.PlacedFootprint.Footprint.Width = W;- src.PlacedFootprint.Footprint.Height = H;- src.PlacedFootprint.Footprint.Depth = 1;- src.PlacedFootprint.Footprint.RowPitch = pitch;- dcl.pResource = g_banner;- dcl.Type = D3D12_TEXTURE_COPY_TYPE_SUBRESOURCE_INDEX;- h.list->CopyTextureRegion(&dcl, 0, 0, 0, &src, nullptr);- D3D12_RESOURCE_BARRIER b = {};- b.Type = D3D12_RESOURCE_BARRIER_TYPE_TRANSITION;- b.Transition.pResource = g_banner;- b.Transition.StateBefore = D3D12_RESOURCE_STATE_COPY_DEST;- b.Transition.StateAfter = D3D12_RESOURCE_STATE_COPY_SOURCE;- b.Transition.Subresource = D3D12_RESOURCE_BARRIER_ALL_SUBRESOURCES;- h.list->ResourceBarrier(1, &b);- const UINT64 v = EndCommands();- WaitFenceValue(h.fence, v, 2000);- }- staging->Release();-- // 3. A tiny allocator/list/fence pair on the pump queue for the per-frame copy.- h.dev->CreateCommandAllocator(D3D12_COMMAND_LIST_TYPE_DIRECT, __uuidof(ID3D12CommandAllocator),- reinterpret_cast<void **>(&g_pump_alloc));- if (g_pump_alloc != nullptr)- h.dev->CreateCommandList(0, D3D12_COMMAND_LIST_TYPE_DIRECT, g_pump_alloc, nullptr,- __uuidof(ID3D12GraphicsCommandList), reinterpret_cast<void **>(&g_pump_list));- if (g_pump_list != nullptr) g_pump_list->Close();- h.dev->CreateFence(0, D3D12_FENCE_FLAG_NONE, __uuidof(ID3D12Fence), reinterpret_cast<void **>(&g_pump_fence));- g_pump_ev = CreateEventW(nullptr, FALSE, FALSE, nullptr);- h.swap->QueryInterface(__uuidof(IDXGISwapChain3), reinterpret_cast<void **>(&g_swap3));- Log("[host] banner ready");-}--typedef HRESULT (WINAPI *PFN_D3D12CreateDevice_)(IUnknown *, D3D_FEATURE_LEVEL, REFIID, void **);-typedef HRESULT (WINAPI *PFN_CreateDXGIFactory1_)(REFIID, void **);--static void PumpPresent()-{- MSG msg;- while (PeekMessageW(&msg, nullptr, 0, 0, PM_REMOVE)) { TranslateMessage(&msg); DispatchMessageW(&msg); }- if (h.swap == nullptr) return;-- // Paint the banner into the backbuffer (ReShade's overlay composites on top at Present).- if (g_banner != nullptr && g_pump_list != nullptr && g_swap3 != nullptr)- {- ID3D12Resource *bb = nullptr;- if (SUCCEEDED(g_swap3->GetBuffer(g_swap3->GetCurrentBackBufferIndex(), __uuidof(ID3D12Resource),- reinterpret_cast<void **>(&bb))) && bb != nullptr)- {- if (SUCCEEDED(g_pump_alloc->Reset()) && SUCCEEDED(g_pump_list->Reset(g_pump_alloc, nullptr)))- {- D3D12_RESOURCE_BARRIER b = {};- b.Type = D3D12_RESOURCE_BARRIER_TYPE_TRANSITION;- b.Transition.pResource = bb;- b.Transition.StateBefore = D3D12_RESOURCE_STATE_PRESENT;- b.Transition.StateAfter = D3D12_RESOURCE_STATE_COPY_DEST;- b.Transition.Subresource = D3D12_RESOURCE_BARRIER_ALL_SUBRESOURCES;- g_pump_list->ResourceBarrier(1, &b);- g_pump_list->CopyResource(bb, g_banner);- b.Transition.StateBefore = D3D12_RESOURCE_STATE_COPY_DEST;- b.Transition.StateAfter = D3D12_RESOURCE_STATE_PRESENT;- g_pump_list->ResourceBarrier(1, &b);- g_pump_list->Close();- ID3D12CommandList *lists[] = { g_pump_list };- h.pump_queue->ExecuteCommandLists(1, lists);- h.pump_queue->Signal(g_pump_fence, ++g_pump_val);- if (g_pump_fence->GetCompletedValue() < g_pump_val && g_pump_ev != nullptr)- {- g_pump_fence->SetEventOnCompletion(g_pump_val, g_pump_ev);- WaitForSingleObject(g_pump_ev, 100);- }- }- bb->Release();- }- }- h.swap->Present(0, 0);-}--static bool InitDisguise()-{- // Pure D3D12 setup. No window, swapchain, ReShade, RenoDX, or DLSS carrier.- HMODULE dxgi = LoadLibraryW(L"dxgi.dll");- HMODULE d3d12 = LoadLibraryW(L"d3d12.dll");- auto create_device = d3d12 ? reinterpret_cast<PFN_D3D12CreateDevice_>(GetProcAddress(d3d12, "D3D12CreateDevice")) : nullptr;- auto create_factory = dxgi ? reinterpret_cast<PFN_CreateDXGIFactory1_>(GetProcAddress(dxgi, "CreateDXGIFactory1")) : nullptr;- if (create_device == nullptr || create_factory == nullptr) { Log("[host] dxgi/d3d12 exports missing"); return false; }-- IDXGIFactory2 *factory = nullptr;- HRESULT hr = create_factory(__uuidof(IDXGIFactory2), reinterpret_cast<void **>(&factory));- if (FAILED(hr)) { Log("[host] CreateDXGIFactory1 failed 0x%08X", hr); return false; }-- // Hybrid laptops/desktops commonly expose the integrated adapter first. NGX initialization- // then fails even when a supported RTX card is present, so explicitly select NVIDIA.- IDXGIAdapter1 *nvidia = nullptr;- for (UINT i = 0; ; ++i)- {- IDXGIAdapter1 *candidate = nullptr;- if (factory->EnumAdapters1(i, &candidate) == DXGI_ERROR_NOT_FOUND) break;- DXGI_ADAPTER_DESC1 desc = {};- candidate->GetDesc1(&desc);- Log("[host] adapter %u: %ls vendor=0x%04X", i, desc.Description, desc.VendorId);- if (desc.VendorId == 0x10DE && !(desc.Flags & DXGI_ADAPTER_FLAG_SOFTWARE))- { nvidia = candidate; break; }- candidate->Release();- }- if (nvidia == nullptr) { factory->Release(); Log("[host] no NVIDIA adapter found"); return false; }-- hr = create_device(nvidia, D3D_FEATURE_LEVEL_11_0, __uuidof(ID3D12Device),- reinterpret_cast<void **>(&h.dev));- nvidia->Release();- if (FAILED(hr)) { Log("[host] D3D12CreateDevice failed 0x%08X", hr); return false; }-- factory->Release();- D3D12_COMMAND_QUEUE_DESC qd = {};- h.dev->CreateCommandQueue(&qd, __uuidof(ID3D12CommandQueue), reinterpret_cast<void **>(&h.queue));- if (h.queue == nullptr) { Log("[host] queue creation failed"); return false; }- Log("[pure] standalone D3D12 device ready; no swapchain or carrier modules");-- // Ring + internal fence for our own submissions.- for (int i = 0; i < Host::kFrames; ++i)- h.dev->CreateCommandAllocator(D3D12_COMMAND_LIST_TYPE_DIRECT, __uuidof(ID3D12CommandAllocator),- reinterpret_cast<void **>(&h.alloc[i]));- if (h.alloc[0] != nullptr)- h.dev->CreateCommandList(0, D3D12_COMMAND_LIST_TYPE_DIRECT, h.alloc[0], nullptr,- __uuidof(ID3D12GraphicsCommandList), reinterpret_cast<void **>(&h.list));- if (h.list != nullptr) h.list->Close();- h.dev->CreateFence(0, D3D12_FENCE_FLAG_NONE, __uuidof(ID3D12Fence), reinterpret_cast<void **>(&h.fence));- h.fence_event = CreateEventW(nullptr, FALSE, FALSE, nullptr);- if (h.list == nullptr || h.fence == nullptr) { Log("[host] list/fence creation failed"); return false; }-- return true;-}--static bool InitNgx()-{- wchar_t data_path[MAX_PATH] = {};- GetModuleFileNameW(nullptr, data_path, MAX_PATH);- if (wchar_t *s = wcsrchr(data_path, L'\\')) *(s + 1) = L'\0';-- NVSDK_NGX_Result r = NVSDK_NGX_D3D12_Init(0x1000000ULL, data_path, h.dev, nullptr, NVSDK_NGX_Version_API);- Log("[host] NVSDK_NGX_D3D12_Init -> 0x%08X (%s)", r, NgxResultName(r));- if (NVSDK_NGX_FAILED(r))- {- r = NVSDK_NGX_D3D12_Init_with_ProjectID("a0f57b54-1daf-4934-90ae-c4035c19df04", NVSDK_NGX_ENGINE_TYPE_CUSTOM,- "1.0", data_path, h.dev, nullptr, NVSDK_NGX_Version_API);- Log("[host] Init_with_ProjectID -> 0x%08X (%s)", r, NgxResultName(r));- }- if (NVSDK_NGX_FAILED(r)) return false;- h.ngx_inited = true;-- r = NVSDK_NGX_D3D12_AllocateParameters(&h.params);- if (NVSDK_NGX_FAILED(r) || h.params == nullptr) { Log("[host] AllocateParameters failed 0x%08X", r); return false; }- return InitDirectNr(data_path);-}--static bool CreateFeature(UINT w, UINT h_, int flags, NVSDK_NGX_Result *out_r)-{- (void)flags;- h.params->Reset();- h.params->Set("CreationNodeMask", 1u);- h.params->Set("VisibilityNodeMask", 1u);- h.params->Set("DLSSNR.Width", w); h.params->Set("DLSSNR.Height", h_);- h.params->Set("DLSSNR.InputWidth", w); h.params->Set("DLSSNR.InputHeight", h_);- h.params->Set("DLSSNR.OutputWidth", w); h.params->Set("DLSSNR.OutputHeight", h_);- h.params->Set("DLSSNR.Output.Width", w); h.params->Set("DLSSNR.Output.Height", h_);- h.params->Set("DLSSNR.Upscaling", 0); h.params->Set("DLSSNR.Scale", 1.0f);- h.params->Set("DLSSNR.ScalingRatio", 1.0f); h.params->Set("DLSSNR.Hint.Render.Preset", 0u);- h.params->Set("DLSS.Feature.Create.Flags", 0u);-- if (!BeginCommands()) return false;- DWORD ccode = 0;- NVSDK_NGX_Result rf = static_cast<NVSDK_NGX_Result>(0x7FFFFFFF);- __try { rf = g_nr_create(h.list, NVSDK_NGX_Feature_Reserved18, h.params, &h.feature); }- __except (EXCEPTION_EXECUTE_HANDLER) { ccode = GetExceptionCode(); }- g_create_result = static_cast<uint32_t>(rf);- if (out_r != nullptr) *out_r = rf;- if (ccode != 0)- {- AbortCommands();- // NGX may have partially written *OutHandle before the fault; never trust it.- h.feature = nullptr;- Log("[host] CreateFeature raised 0x%08X (caught; nothing submitted)", ccode);- return false;- }- const UINT64 v = EndCommands();- if (!WaitFenceValue(h.fence, v, 30000)) { Log("[pure] feature create did not complete"); return false; }- if (NVSDK_NGX_FAILED(rf) || h.feature == nullptr)- { Log("[pure] direct feature 18 create failed 0x%08X (%s)", rf, NgxResultName(rf)); h.feature = nullptr; return false; }- Log("[pure] direct feature 18 ready: %ux%u result=0x%08X", w, h_, rf);- return true;-}--// A crashed CreateFeature can leave NGX's own internal state broken (seen in BioShock-// Remastered: the add-on faulted once during a resolution/HDR change, and every following-// create failed too, with the SEH catching a different exception each time -- NGX was-// never going to recover on its own). Reset NGX itself as a last resort so the feed can-// come back without the user having to restart the game.-static bool ReinitNgx()-{- Log("[host] NGX looks corrupted after repeated failures; reinitializing");- if (h.params != nullptr) { NVSDK_NGX_D3D12_DestroyParameters(h.params); h.params = nullptr; }- if (h.ngx_inited) { NVSDK_NGX_D3D12_Shutdown1(h.dev); h.ngx_inited = false; }- h.feature = nullptr;- return InitNgx();-}--static bool Evaluate(ID3D12Resource *color, ID3D12Resource *output, ID3D12Resource *depth, ID3D12Resource *mv,- UINT w, UINT h_, int reset, float mvsx, float mvsy)-{- if (!BeginCommands()) return false;-- NVSDK_NGX_D3D12_DLSS_Eval_Params ep = {};- ep.Feature.pInColor = color;- ep.Feature.pInOutput = output;- ep.pInDepth = depth;- ep.pInMotionVectors = mv;- ep.InRenderSubrectDimensions.Width = w;- ep.InRenderSubrectDimensions.Height = h_;- ep.InReset = reset;- ep.InMVScaleX = mvsx;- ep.InMVScaleY = mvsy;- ep.InPreExposure = 1.0f;- ep.InExposureScale = 1.0f;-- DWORD ecode = 0;- NVSDK_NGX_Result re = SafeEvaluateDLSS(&ep, &ecode);- if (ecode != 0) { AbortCommands(); Log("[host] evaluate raised 0x%08X (caught; nothing submitted)", ecode); return false; }- EndCommands();- if (NVSDK_NGX_FAILED(re)) { Log("[host] evaluate failed 0x%08X (%s)", re, NgxResultName(re)); return false; }- return true;-}--// ----------------------------------------------------------------------------// --test: prove the whole stack with no game attached-// -----------------------------------------------------------------------------static ID3D12Resource *MakeTex(UINT w, UINT h_, DXGI_FORMAT fmt, bool uav)-{- D3D12_HEAP_PROPERTIES hp = {};- hp.Type = D3D12_HEAP_TYPE_DEFAULT;- D3D12_RESOURCE_DESC rd = {};- rd.Dimension = D3D12_RESOURCE_DIMENSION_TEXTURE2D;- rd.Width = w;- rd.Height = h_;- rd.DepthOrArraySize = 1;- rd.MipLevels = 1;- rd.Format = fmt;- rd.SampleDesc.Count = 1;- rd.Layout = D3D12_TEXTURE_LAYOUT_UNKNOWN;- rd.Flags = uav ? D3D12_RESOURCE_FLAG_ALLOW_UNORDERED_ACCESS : D3D12_RESOURCE_FLAG_NONE;- ID3D12Resource *t = nullptr;- h.dev->CreateCommittedResource(&hp, D3D12_HEAP_FLAG_NONE, &rd, D3D12_RESOURCE_STATE_COMMON, nullptr,- __uuidof(ID3D12Resource), reinterpret_cast<void **>(&t));- return t;-}--static int RunTest()-{- const UINT W = 640, H = 360;- Log("[host] --test: %ux%u synthetic DLAA", W, H);-- ID3D12Resource *color = MakeTex(W, H, DXGI_FORMAT_R8G8B8A8_UNORM, false);- ID3D12Resource *output = MakeTex(W, H, DXGI_FORMAT_R8G8B8A8_UNORM, true);- ID3D12Resource *depth = MakeTex(W, H, DXGI_FORMAT_R32_FLOAT, false);- ID3D12Resource *mv = MakeTex(W, H, DXGI_FORMAT_R16G16_FLOAT, false);- if (!color || !output || !depth || !mv) { Log("[host] test texture creation failed"); return 1; }-- // Give the DLSS 5 add-on its hook-arming time, with the swapchain pumping.- for (int i = 0; i < 120; ++i) { PumpPresent(); Sleep(8); }-- int flags = NVSDK_NGX_DLSS_Feature_Flags_MVLowRes | NVSDK_NGX_DLSS_Feature_Flags_AutoExposure |- NVSDK_NGX_DLSS_Feature_Flags_DepthInverted;- NVSDK_NGX_Result rf = NVSDK_NGX_Result_Fail;- if (!CreateFeature(W, H, flags, &rf)) return 1;-- int good = 0;- for (int i = 0; i < 300; ++i)- {- PumpPresent();- if (Evaluate(color, output, depth, mv, W, H, i == 0 ? 1 : 0, 1.0f, 1.0f)) ++good;- else break;- if (i == 180) // the warm-up re-create, same medicine as in-game- {- Log("[host] warm-up: re-creating the feature once");- NVSDK_NGX_Handle *old = h.feature;- h.feature = nullptr;- if (!CreateFeature(W, H, flags, &rf)) { h.feature = old; Log("[host] keeping the previous feature"); }- else SafeReleaseFeature(old);- }- }- Log("[host] --test finished: %d/300 evaluates succeeded", good);- Log("[host] check the host's ReShade.log for 'feature 18 created' / 'evaluation succeeded'");- return good >= 250 ? 0 : 1;-}--// ----------------------------------------------------------------------------// --video: portable video-frame protocol for the Gradio front end-// -----------------------------------------------------------------------------static constexpr uint32_t VIDEO_MAGIC = 0x32563544u; // "D5V2"-static constexpr uint32_t FRAME_MAGIC = 0x314D5246u; // "FRM1"-static constexpr uint32_t OUT_MAGIC = 0x3154554Fu; // "OUT1"--#pragma pack(push, 1)-struct VideoHeader-{- uint32_t magic, width, height, warmup, frame_count, profile, preset, style, auto_mask, ui_correction;- float intensity, local_tone, local_structure, skin_structure;-};-struct VideoFrameHeader-{- uint32_t magic, index, reset, reserved;- int64_t pts;-};-struct VideoResultHeader-{- uint32_t magic, index, ok, bytes, ngx_result;- int64_t pts;-};-#pragma pack(pop)--struct VideoTex-{- ID3D12Resource *tex = nullptr;- ID3D12Resource *upload = nullptr;- D3D12_PLACED_SUBRESOURCE_FOOTPRINT fp = {};- UINT rows = 0;- UINT64 row_size = 0;-};--struct VideoState-{- UINT w = 0, hgt = 0;- VideoTex color, depth, mv, mask;- ID3D12Resource *output = nullptr;- ID3D12Resource *readback = nullptr;- D3D12_PLACED_SUBRESOURCE_FOOTPRINT out_fp = {};- UINT out_rows = 0;- UINT64 out_row_size = 0;- bool inputs_ready = false;-};--static VideoHeader g_video_options = {};-static uint32_t g_last_eval_result = 0;--static bool ReadExact(FILE *f, void *p, size_t n)-{- BYTE *dst = static_cast<BYTE *>(p);- while (n != 0)- {- const size_t got = fread(dst, 1, n, f);- if (got == 0) return false;- dst += got; n -= got;- }- return true;-}--static bool WriteExact(FILE *f, const void *p, size_t n)-{- const BYTE *src = static_cast<const BYTE *>(p);- while (n != 0)- {- const size_t put = fwrite(src, 1, n, f);- if (put == 0) return false;- src += put; n -= put;- }- fflush(f);- return true;-}--static bool CreateVideoTex(VideoTex &v, UINT w, UINT hgt, DXGI_FORMAT fmt, UINT packed_pitch)-{- D3D12_HEAP_PROPERTIES def = {};- def.Type = D3D12_HEAP_TYPE_DEFAULT;- D3D12_RESOURCE_DESC td = {};- td.Dimension = D3D12_RESOURCE_DIMENSION_TEXTURE2D;- td.Width = w; td.Height = hgt; td.DepthOrArraySize = 1; td.MipLevels = 1;- td.Format = fmt; td.SampleDesc.Count = 1; td.Layout = D3D12_TEXTURE_LAYOUT_UNKNOWN;- if (FAILED(h.dev->CreateCommittedResource(&def, D3D12_HEAP_FLAG_NONE, &td, D3D12_RESOURCE_STATE_COPY_DEST,- nullptr, __uuidof(ID3D12Resource), reinterpret_cast<void **>(&v.tex)))) return false;-- UINT64 total = 0;- h.dev->GetCopyableFootprints(&td, 0, 1, 0, &v.fp, &v.rows, &v.row_size, &total);- if (v.rows != hgt || v.row_size < packed_pitch) return false;- D3D12_HEAP_PROPERTIES up = {};- up.Type = D3D12_HEAP_TYPE_UPLOAD;- D3D12_RESOURCE_DESC bd = {};- bd.Dimension = D3D12_RESOURCE_DIMENSION_BUFFER;- bd.Width = total; bd.Height = 1; bd.DepthOrArraySize = 1; bd.MipLevels = 1;- bd.SampleDesc.Count = 1; bd.Layout = D3D12_TEXTURE_LAYOUT_ROW_MAJOR;- return SUCCEEDED(h.dev->CreateCommittedResource(&up, D3D12_HEAP_FLAG_NONE, &bd,- D3D12_RESOURCE_STATE_GENERIC_READ, nullptr, __uuidof(ID3D12Resource),- reinterpret_cast<void **>(&v.upload)));-}--static bool CreateVideoResources(VideoState &v, UINT w, UINT hgt)-{- v.w = w; v.hgt = hgt;- if (!CreateVideoTex(v.color, w, hgt, DXGI_FORMAT_R8G8B8A8_UNORM, w * 4) ||- !CreateVideoTex(v.mv, w, hgt, DXGI_FORMAT_R16G16_FLOAT, w * 4))- return false;-- D3D12_HEAP_PROPERTIES def = {};- def.Type = D3D12_HEAP_TYPE_DEFAULT;- D3D12_RESOURCE_DESC td = {};- td.Dimension = D3D12_RESOURCE_DIMENSION_TEXTURE2D;- td.Width = w; td.Height = hgt; td.DepthOrArraySize = 1; td.MipLevels = 1;- td.Format = DXGI_FORMAT_R8G8B8A8_UNORM; td.SampleDesc.Count = 1;- td.Layout = D3D12_TEXTURE_LAYOUT_UNKNOWN;- td.Flags = D3D12_RESOURCE_FLAG_ALLOW_UNORDERED_ACCESS;- if (FAILED(h.dev->CreateCommittedResource(&def, D3D12_HEAP_FLAG_NONE, &td,- D3D12_RESOURCE_STATE_UNORDERED_ACCESS, nullptr, __uuidof(ID3D12Resource),- reinterpret_cast<void **>(&v.output)))) return false;-- UINT64 total = 0;- h.dev->GetCopyableFootprints(&td, 0, 1, 0, &v.out_fp, &v.out_rows, &v.out_row_size, &total);- D3D12_HEAP_PROPERTIES rb = {};- rb.Type = D3D12_HEAP_TYPE_READBACK;- D3D12_RESOURCE_DESC bd = {};- bd.Dimension = D3D12_RESOURCE_DIMENSION_BUFFER;- bd.Width = total; bd.Height = 1; bd.DepthOrArraySize = 1; bd.MipLevels = 1;- bd.SampleDesc.Count = 1; bd.Layout = D3D12_TEXTURE_LAYOUT_ROW_MAJOR;- return SUCCEEDED(h.dev->CreateCommittedResource(&rb, D3D12_HEAP_FLAG_NONE, &bd,- D3D12_RESOURCE_STATE_COPY_DEST, nullptr, __uuidof(ID3D12Resource),- reinterpret_cast<void **>(&v.readback)));-}--static bool FillUpload(VideoTex &v, const BYTE *src, UINT src_pitch, UINT hgt)-{- BYTE *dst = nullptr;- if (FAILED(v.upload->Map(0, nullptr, reinterpret_cast<void **>(&dst)))) return false;- for (UINT y = 0; y < hgt; ++y)- memcpy(dst + static_cast<size_t>(y) * v.fp.Footprint.RowPitch,- src + static_cast<size_t>(y) * src_pitch, src_pitch);- v.upload->Unmap(0, nullptr);- return true;-}--static void CopyUpload(ID3D12GraphicsCommandList *list, VideoTex &v)-{- D3D12_TEXTURE_COPY_LOCATION src = {}, dst = {};- src.pResource = v.upload;- src.Type = D3D12_TEXTURE_COPY_TYPE_PLACED_FOOTPRINT;- src.PlacedFootprint = v.fp;- dst.pResource = v.tex;- dst.Type = D3D12_TEXTURE_COPY_TYPE_SUBRESOURCE_INDEX;- list->CopyTextureRegion(&dst, 0, 0, 0, &src, nullptr);-}--static D3D12_RESOURCE_BARRIER Transition(ID3D12Resource *r, D3D12_RESOURCE_STATES before,- D3D12_RESOURCE_STATES after)-{- D3D12_RESOURCE_BARRIER b = {};- b.Type = D3D12_RESOURCE_BARRIER_TYPE_TRANSITION;- b.Transition.pResource = r;- b.Transition.StateBefore = before;- b.Transition.StateAfter = after;- b.Transition.Subresource = D3D12_RESOURCE_BARRIER_ALL_SUBRESOURCES;- return b;-}--static bool UploadVideoFrame(VideoState &v, const BYTE *color, const BYTE *mv)-{- if (!FillUpload(v.color, color, v.w * 4, v.hgt) ||- !FillUpload(v.mv, mv, v.w * 4, v.hgt) || !BeginCommands()) return false;- if (v.inputs_ready)- {- D3D12_RESOURCE_BARRIER pre[] = {- Transition(v.color.tex, D3D12_RESOURCE_STATE_NON_PIXEL_SHADER_RESOURCE, D3D12_RESOURCE_STATE_COPY_DEST),- Transition(v.mv.tex, D3D12_RESOURCE_STATE_NON_PIXEL_SHADER_RESOURCE, D3D12_RESOURCE_STATE_COPY_DEST),- };- h.list->ResourceBarrier(_countof(pre), pre);- }- CopyUpload(h.list, v.color); CopyUpload(h.list, v.mv);- D3D12_RESOURCE_BARRIER post[] = {- Transition(v.color.tex, D3D12_RESOURCE_STATE_COPY_DEST, D3D12_RESOURCE_STATE_NON_PIXEL_SHADER_RESOURCE),- Transition(v.mv.tex, D3D12_RESOURCE_STATE_COPY_DEST, D3D12_RESOURCE_STATE_NON_PIXEL_SHADER_RESOURCE),- };- h.list->ResourceBarrier(_countof(post), post);- const UINT64 fence = EndCommands();- v.inputs_ready = true;- return WaitFenceValue(h.fence, fence, 30000);-}--static bool EvaluateVideo(VideoState &v, int reset)-{- if (!BeginCommands()) return false;- h.params->Reset();- h.params->Set("DLSSNR.Color", v.color.tex); h.params->Set("DLSSNR.Output", v.output);- h.params->Set("DLSSNR.MVec", v.mv.tex);- h.params->Set("DLSSNR.ColorSubrectBaseX", 0u); h.params->Set("DLSSNR.ColorSubrectBaseY", 0u);- h.params->Set("DLSSNR.ColorSubrectWidth", v.w); h.params->Set("DLSSNR.ColorSubrectHeight", v.hgt);- h.params->Set("DLSSNR.MVecSubrectBaseX", 0u); h.params->Set("DLSSNR.MVecSubrectBaseY", 0u);- h.params->Set("DLSSNR.MVecSubrectWidth", v.w); h.params->Set("DLSSNR.MVecSubrectHeight", v.hgt);- h.params->Set("DLSSNR.OutputSubrectBaseX", 0u); h.params->Set("DLSSNR.OutputSubrectBaseY", 0u);- h.params->Set("DLSSNR.OutputSubrectWidth", v.w); h.params->Set("DLSSNR.OutputSubrectHeight", v.hgt);- h.params->Set("DLSSNR.MVecScaleX", 1.0f); h.params->Set("DLSSNR.MVecScaleY", 1.0f);- h.params->Set("DLSSNR.Enabled", 1u); h.params->Set("DLSSNR.Reset", reset);- h.params->Set("DLSSNR.Intensity", g_video_options.intensity);- h.params->Set("DLSSNR.LocalToneStrength", g_video_options.local_tone);- h.params->Set("DLSSNR.LocalStructureStrength", g_video_options.local_structure);- h.params->Set("DLSSNR.SkinStructureStrength", g_video_options.skin_structure);- h.params->Set("DLSSNR.UseAutoMask", g_video_options.auto_mask);- h.params->Set("DLSSNR.Style", g_video_options.style);- h.params->Set("DLSSNR.UICorrection", g_video_options.ui_correction);- h.params->Set("DLSS.Pre.Exposure", 1.0f); h.params->Set("DLSS.Exposure.Scale", 1.0f);- DWORD code = 0;- NVSDK_NGX_Result result = static_cast<NVSDK_NGX_Result>(0x7FFFFFFF);- __try { result = g_nr_evaluate(h.list, h.feature, h.params, nullptr); }- __except (EXCEPTION_EXECUTE_HANDLER) { code = GetExceptionCode(); }- g_last_eval_result = static_cast<uint32_t>(result);- if (code != 0) { AbortCommands(); Log("[pure] direct evaluate exception 0x%08X", code); return false; }- const UINT64 fence = EndCommands();- if (NVSDK_NGX_FAILED(result)) { Log("[pure] direct evaluate failed 0x%08X (%s)", result, NgxResultName(result)); return false; }- ++g_eval_count;- return WaitFenceValue(h.fence, fence, 60000);-}--static bool DownloadVideoFrame(VideoState &v, std::vector<BYTE> &packed)-{- if (!BeginCommands()) return false;- D3D12_RESOURCE_BARRIER a = Transition(v.output, D3D12_RESOURCE_STATE_UNORDERED_ACCESS,- D3D12_RESOURCE_STATE_COPY_SOURCE);- h.list->ResourceBarrier(1, &a);- D3D12_TEXTURE_COPY_LOCATION src = {}, dst = {};- src.pResource = v.output; src.Type = D3D12_TEXTURE_COPY_TYPE_SUBRESOURCE_INDEX;- dst.pResource = v.readback; dst.Type = D3D12_TEXTURE_COPY_TYPE_PLACED_FOOTPRINT;- dst.PlacedFootprint = v.out_fp;- h.list->CopyTextureRegion(&dst, 0, 0, 0, &src, nullptr);- D3D12_RESOURCE_BARRIER b = Transition(v.output, D3D12_RESOURCE_STATE_COPY_SOURCE,- D3D12_RESOURCE_STATE_UNORDERED_ACCESS);- h.list->ResourceBarrier(1, &b);- const UINT64 fence = EndCommands();- if (!WaitFenceValue(h.fence, fence, 60000)) return false;-- BYTE *mapped = nullptr;- D3D12_RANGE read_range = { 0, static_cast<SIZE_T>(v.out_fp.Footprint.RowPitch) * v.hgt };- if (FAILED(v.readback->Map(0, &read_range, reinterpret_cast<void **>(&mapped)))) return false;- packed.resize(static_cast<size_t>(v.w) * v.hgt * 4);- for (UINT y = 0; y < v.hgt; ++y)- memcpy(packed.data() + static_cast<size_t>(y) * v.w * 4,- mapped + static_cast<size_t>(y) * v.out_fp.Footprint.RowPitch,- static_cast<size_t>(v.w) * 4);- D3D12_RANGE written = { 0, 0 };- v.readback->Unmap(0, &written);- return true;-}--static bool ReShadeHasFeature18()-{- char path[MAX_PATH] = {};- GetModuleFileNameA(nullptr, path, MAX_PATH);- if (char *s = strrchr(path, '\\')) strcpy_s(s + 1, MAX_PATH - (s + 1 - path), "ReShade.log");- HANDLE file = CreateFileA(path, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE,- nullptr, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, nullptr);- if (file == INVALID_HANDLE_VALUE) return false;- const DWORD n = GetFileSize(file, nullptr);- std::vector<char> data(n > 0 ? static_cast<size_t>(n) + 1 : 1, 0);- DWORD got = 0;- if (n > 0) ReadFile(file, data.data(), n, &got, nullptr);- CloseHandle(file);- return strstr(data.data(), "feature 18 created") != nullptr &&- strstr(data.data(), "inline feature 18 evaluation succeeded") != nullptr;-}--static bool ReadVideoPayload(VideoState &v, VideoFrameHeader &fh, std::vector<BYTE> &color,- std::vector<BYTE> &mv)-{- if (!ReadExact(stdin, &fh, sizeof(fh)) || fh.magic != FRAME_MAGIC) return false;- const size_t pixels = static_cast<size_t>(v.w) * v.hgt;- color.resize(pixels * 4); mv.resize(pixels * 4);- return ReadExact(stdin, color.data(), color.size()) && ReadExact(stdin, mv.data(), mv.size());-}--static int RunVideo()-{- _setmode(_fileno(stdin), _O_BINARY);- _setmode(_fileno(stdout), _O_BINARY);- VideoHeader vh = {};- if (!ReadExact(stdin, &vh, sizeof(vh)) || vh.magic != VIDEO_MAGIC || vh.width < 64 || vh.height < 64 ||- vh.width > 7680 || vh.height > 4320 || vh.frame_count == 0)- { Log("[video] invalid stream header"); return 2; }- g_video_options = vh;- Log("[video] stream %ux%u, %u frames, warmup=%u", vh.width, vh.height, vh.frame_count, vh.warmup);-- VideoState v;- if (!CreateVideoResources(v, vh.width, vh.height)) { Log("[video] resource creation failed"); return 3; }- int flags = NVSDK_NGX_DLSS_Feature_Flags_MVLowRes | NVSDK_NGX_DLSS_Feature_Flags_AutoExposure |- NVSDK_NGX_DLSS_Feature_Flags_DepthInverted;- NVSDK_NGX_Result create_result = NVSDK_NGX_Result_Fail;- if (!CreateFeature(vh.width, vh.height, flags, &create_result)) return 4;-- VideoFrameHeader fh = {};- std::vector<BYTE> color, mv, output;- for (uint32_t frame = 0; frame < vh.frame_count; ++frame)- {- if (!ReadVideoPayload(v, fh, color, mv)) { Log("[video] truncated frame %u", frame); return 5; }- if (!UploadVideoFrame(v, color.data(), mv.data())) return 6;- if (frame == 0)- {- const uint32_t warmup = (std::min)(240u, (std::max)(1u, vh.warmup));- for (uint32_t i = 0; i < warmup; ++i)- {- if (!EvaluateVideo(v, i == 0 ? 1 : 0)) return 7;- }- Log("[pure] direct feature 18 confirmed after %u discarded warmup frames", warmup);- }- if (!EvaluateVideo(v, (frame == 0 || fh.reset != 0) ? 1 : 0) || !DownloadVideoFrame(v, output))- return 9;- VideoResultHeader out = { OUT_MAGIC, fh.index, 1u, static_cast<uint32_t>(output.size()), g_last_eval_result, fh.pts };- if (!WriteExact(stdout, &out, sizeof(out)) || !WriteExact(stdout, output.data(), output.size())) return 10;- if (frame < 3 || ((frame + 1) % 30) == 0) Log("[video] delivered frame %u/%u", frame + 1, vh.frame_count);- }- Log("[pure] complete: %u frames delivered, %u direct evaluations", vh.frame_count, g_eval_count);- return 0;-}--// ----------------------------------------------------------------------------// Serve mode: the real pipe server for a 32-bit game-// -----------------------------------------------------------------------------static bool ReadFull(HANDLE pipe, void *buf, DWORD len)-{- DWORD got = 0;- return ReadFile(pipe, buf, len, &got, nullptr) && got == len;-}--static int Serve(DWORD game_pid)-{- char name[128];- sprintf_s(name, FEED_PIPE_FMT, static_cast<unsigned long>(game_pid));- HANDLE pipe = CreateNamedPipeA(name, PIPE_ACCESS_DUPLEX, PIPE_TYPE_BYTE | PIPE_READMODE_BYTE | PIPE_WAIT,- 1, 1024, 1024, 0, nullptr);- if (pipe == INVALID_HANDLE_VALUE) { Log("[host] CreateNamedPipe failed %lu", GetLastError()); return 1; }- Log("[host] serving on %s", name);- if (!ConnectNamedPipe(pipe, nullptr) && GetLastError() != ERROR_PIPE_CONNECTED)- { Log("[host] ConnectNamedPipe failed %lu", GetLastError()); return 1; }-- FeedHello hello = {};- if (!ReadFull(pipe, &hello, sizeof(hello)) || hello.magic != FEED_IPC_MAGIC)- { Log("[host] bad hello"); return 1; }- FeedHelloAck ack = { FEED_IPC_MAGIC, FEED_IPC_VERSION };- DWORD put = 0;- WriteFile(pipe, &ack, sizeof(ack), &put, nullptr);- Log("[host] game pid %u connected (protocol v%u)", hello.pid, hello.version);-- HANDLE hgame = OpenProcess(PROCESS_DUP_HANDLE, FALSE, hello.pid);- if (hgame == nullptr) { Log("[host] OpenProcess failed %lu", GetLastError()); return 1; }-- // Shared fences live for the whole session.- HANDLE hin = nullptr, hout = nullptr;- h.dev->CreateFence(0, D3D12_FENCE_FLAG_SHARED, __uuidof(ID3D12Fence), reinterpret_cast<void **>(&h.fence_in));- h.dev->CreateFence(0, D3D12_FENCE_FLAG_SHARED, __uuidof(ID3D12Fence), reinterpret_cast<void **>(&h.fence_out));- if (h.fence_in == nullptr || h.fence_out == nullptr ||- FAILED(h.dev->CreateSharedHandle(h.fence_in, nullptr, GENERIC_ALL, nullptr, &hin)) ||- FAILED(h.dev->CreateSharedHandle(h.fence_out, nullptr, GENERIC_ALL, nullptr, &hout)))- { Log("[host] shared fence creation failed"); return 1; }-- HANDLE game_in = nullptr, game_out = nullptr;- DuplicateHandle(GetCurrentProcess(), hin, hgame, &game_in, 0, FALSE, DUPLICATE_SAME_ACCESS);- DuplicateHandle(GetCurrentProcess(), hout, hgame, &game_out, 0, FALSE, DUPLICATE_SAME_ACCESS);-- int flags_active = 0;- bool transport_only = false;- float mvsx = 1.0f, mvsy = 1.0f;- // The DLSS 5 add-on arms its NGX hooks ~150 ms after NGX init; the first create must- // not race that (a 15 ms miss latched STANDBY in Blacklist), so hold it briefly.- UINT64 hold_until = GetTickCount64() + 800;- UINT64 evaluated = 0;- bool warm_done = g_renodx_lazy; // v45+ adopts missed creates on its own- int build_fails = 0;-- for (;;)- {- // Peek the next message type by size: Build (big) vs FrameMsg (small).- // The pipe is byte-mode from a single writer, so read the smaller header- // first and decide -- FeedFrameMsg and FeedBuild share no prefix, so the- // client precedes every message with a 1-byte tag instead.- //- // A plain blocking ReadFile here starves the message pump (and Present)- // whenever the game stops feeding frames -- paused, loading, a menu -- and- // Windows shows the host window as "Not Responding". Poll instead, so the- // window (and its ReShade overlay) stays alive and clickable at all times.- BYTE tag = 0;- bool tag_read = false;- for (;;)- {- DWORD avail = 0;- if (!PeekNamedPipe(pipe, nullptr, 0, nullptr, &avail, nullptr)) break; // pipe broken- if (avail > 0) { tag_read = ReadFull(pipe, &tag, 1); break; }- PumpPresent();- Sleep(8);- }- if (!tag_read) { Log("[host] pipe closed by the game"); break; }-- if (tag == 'B')- {- FeedBuild b = {};- if (!ReadFull(pipe, &b, sizeof(b))) break;- Log("[host] build: %ux%u color=%u output=%u hdr=%d inverted=%d", b.width, b.height,- b.color_fmt, b.output_fmt, b.hdr, b.depth_inverted);-- // Tear down the old set.- SafeReleaseFeature(h.feature);- h.feature = nullptr;- for (int i = 0; i < FEED_SLOTS; ++i)- if (h.tex[i] != nullptr) { h.tex[i]->Release(); h.tex[i] = nullptr; }-- // Open the game's textures (duplicate the handles out of the game).- bool ok = true;- for (int i = 0; i < FEED_SLOTS && ok; ++i)- {- HANDLE local = nullptr;- if (!DuplicateHandle(hgame, reinterpret_cast<HANDLE>(static_cast<uintptr_t>(b.tex[i])),- GetCurrentProcess(), &local, 0, FALSE, DUPLICATE_SAME_ACCESS))- { Log("[host] DuplicateHandle(tex %d) failed %lu", i, GetLastError()); ok = false; break; }- HRESULT hr = h.dev->OpenSharedHandle(local, __uuidof(ID3D12Resource),- reinterpret_cast<void **>(&h.tex[i]));- CloseHandle(local);- if (FAILED(hr)) { Log("[host] OpenSharedHandle(tex %d) failed 0x%08X", i, hr); ok = false; }- }-- NVSDK_NGX_Result rf = NVSDK_NGX_Result_Fail;- if (ok)- {- h.width = b.width; h.height = b.height;- h.color_fmt = static_cast<DXGI_FORMAT>(b.color_fmt);- h.output_fmt = static_cast<DXGI_FORMAT>(b.output_fmt);- mvsx = b.mv_scale_x; mvsy = b.mv_scale_y;- transport_only = b.transport != 0;- flags_active = NVSDK_NGX_DLSS_Feature_Flags_MVLowRes | NVSDK_NGX_DLSS_Feature_Flags_AutoExposure;- if (b.depth_inverted) flags_active |= NVSDK_NGX_DLSS_Feature_Flags_DepthInverted;- if (b.hdr) flags_active |= NVSDK_NGX_DLSS_Feature_Flags_IsHDR;- if (b.flags_override >= 0) flags_active = b.flags_override;-- if (transport_only)- {- rf = static_cast<NVSDK_NGX_Result>(1); // no NGX in the loop at all- Log("[host] transport-only mode: Color will be copied to Output, no evaluate");- }- else- {- const UINT64 now = GetTickCount64();- if (now < hold_until) Sleep(static_cast<DWORD>(hold_until - now)); // hook-arming grace- ok = CreateFeature(b.width, b.height, flags_active, &rf);- hold_until = GetTickCount64() + 1000; // next create not before +1 s-- if (ok) build_fails = 0;- else if (++build_fails >= 2 && ReinitNgx())- {- Log("[host] retrying the create after an NGX reinit");- ok = CreateFeature(b.width, b.height, flags_active, &rf);- if (ok) build_fails = 0;- }- }- }-- evaluated = 0;- warm_done = transport_only || g_renodx_lazy; // no warm-up without NGX / with v45+-- FeedBuildAck back = {};- back.ok = ok ? 1 : 0;- back.ngx_result = static_cast<uint32_t>(rf);- back.fence_in = reinterpret_cast<uint64_t>(game_in);- back.fence_out = reinterpret_cast<uint64_t>(game_out);- WriteFile(pipe, &back, sizeof(back), &put, nullptr);- }- else if (tag == 'F')- {- FeedFrameMsg fm = {};- if (!ReadFull(pipe, &fm, sizeof(fm))) break;- if (h.feature == nullptr && !transport_only) { h.fence_out->Signal(fm.n); continue; }-- if (!WaitFenceValue(h.fence_in, fm.n, 2000))- { Log("[host] frame %llu: in-fence never arrived", (unsigned long long)fm.n); h.fence_out->Signal(fm.n); continue; }- h.queue->Wait(h.fence_in, fm.n); // belt and braces on the GPU timeline-- bool done = false;- if (transport_only)- {- if (BeginCommands())- {- // Deliberately copy only the LEFT half: a split screen in the game is- // unambiguous visual proof that the host's output reaches the screen.- D3D12_TEXTURE_COPY_LOCATION src = {}, dst = {};- src.pResource = h.tex[FEED_COLOR];- src.Type = D3D12_TEXTURE_COPY_TYPE_SUBRESOURCE_INDEX;- dst.pResource = h.tex[FEED_OUTPUT];- dst.Type = D3D12_TEXTURE_COPY_TYPE_SUBRESOURCE_INDEX;- D3D12_BOX box = { 0, 0, 0, h.width / 2, h.height, 1 };- h.list->CopyTextureRegion(&dst, 0, 0, 0, &src, &box);- EndCommands();- done = true;- }- }- else- done = Evaluate(h.tex[FEED_COLOR], h.tex[FEED_OUTPUT], h.tex[FEED_DEPTH], h.tex[FEED_MV],- h.width, h.height, fm.reset ? 1 : 0, mvsx, mvsy);-- if (done)- {- h.queue->Signal(h.fence_out, fm.n);- // One warm-up re-create per build: the DLSS 5 add-on misses the very first- // create (STANDBY latch) when its hooks armed a moment too late.- if (!warm_done && ++evaluated >= 180)- {- warm_done = true;- Log("[host] warm-up: re-creating the feature once");- WaitFenceValue(h.fence, h.fence_value, 2000);- NVSDK_NGX_Handle *old = h.feature;- h.feature = nullptr;- NVSDK_NGX_Result rr = NVSDK_NGX_Result_Fail;- if (CreateFeature(h.width, h.height, flags_active, &rr)) SafeReleaseFeature(old);- else { h.feature = old; Log("[host] keeping the previous feature"); }- }- }- else- h.fence_out->Signal(fm.n); // CPU-signal so the game never hangs on us-- if (fm.n <= 3 || (fm.n % 1800) == 0)- Log("[host] frame %llu evaluated", (unsigned long long)fm.n);- PumpPresent();- }- else- {- Log("[host] unknown tag 0x%02X", tag);- break;- }- }- return 0;-}--// -----------------------------------------------------------------------------int main(int argc, char **argv)-{- for (int i = 1; i < argc; ++i)- if (strcmp(argv[i], "--video") == 0) g_video_mode = true;-- GetModuleFileNameA(nullptr, g_log_path, MAX_PATH);- if (char *s = strrchr(g_log_path, '\\'))- strcpy_s(s + 1, MAX_PATH - (s + 1 - g_log_path), "dlss5-feed-host.log");- if (!g_video_mode) { FILE *f = nullptr; if (fopen_s(&f, g_log_path, "w") == 0 && f) fclose(f); }-- Log("dlss5-feed-host64 (built %s %s)", __DATE__, __TIME__);-- bool test = false, hide = false, video = false;- DWORD pid = 0;- for (int i = 1; i < argc; ++i)- {- if (strcmp(argv[i], "--test") == 0) test = true;- else if (strcmp(argv[i], "--video") == 0) video = true;- else if (strcmp(argv[i], "--hide") == 0) hide = true;- else pid = static_cast<DWORD>(strtoul(argv[i], nullptr, 10));- }- if (!test && !video && pid == 0)- {- Log("usage: dlss5-worker --test | --video | <game pid> [--hide]");- return 1;- }- g_show_window = !test && !video && !hide; // video/probe hosts remain hidden-- if (!InitDisguise()) return 1;- if (!InitNgx()) { Log("[host] NGX unavailable"); return 1; }-- if (test) return RunTest();- if (video) return RunVideo();- return Serve(pid);-}diff --git a/native/DLSS5-Feeder/src/feed_ipc.h b/native/DLSS5-Feeder/src/feed_ipc.hdeleted file mode 100644index 1039186..0000000--- a/native/DLSS5-Feeder/src/feed_ipc.h+++ /dev/null@@ -1,65 +0,0 @@-// dlss5-feed IPC: the 32-bit in-game add-on <-> 64-bit host protocol.-//-// Everything heavy stays on the GPU: the game side CREATES the four shared-// textures on D3D11 (the direction the driver accepts, see the phase-0 spike)-// and sends its local NT-handle values; the host duplicates them out of the-// game process and opens them on D3D12. The host creates the two shared-// fences on D3D12 and duplicates them INTO the game process. The pipe carries-// only these fixed-size structs.-//-// Sync per frame n: game copies inputs, Signal(in_fence, n), sends FeedFrameMsg,-// records Wait(out_fence, n) + blit; host waits in_fence >= n, evaluates,-// Signal(out_fence, n). A pipe break on either side means "stop feeding".--#pragma once-#include <cstdint>--#define FEED_IPC_MAGIC 0x35534C44u // 'DLS5'-#define FEED_IPC_VERSION 1u-#define FEED_PIPE_FMT "\\\\.\\pipe\\dlss5-feed.%lu" // %lu = game PID--enum FeedSlot { FEED_COLOR = 0, FEED_OUTPUT, FEED_DEPTH, FEED_MV, FEED_SLOTS };--#pragma pack(push, 1)--struct FeedHello // game -> host, once-{- uint32_t magic;- uint32_t version;- uint32_t pid;-};--struct FeedHelloAck // host -> game, once-{- uint32_t magic;- uint32_t version;-};--struct FeedBuild // game -> host, on every resolution/format change-{- uint32_t width, height;- uint32_t color_fmt; // DXGI_FORMAT of the shared Color/Output pair- uint32_t output_fmt;- int32_t hdr; // resolved flags, not cfg values- int32_t depth_inverted;- int32_t flags_override; // -1 = none- int32_t transport; // 1 = no NGX: host copies Color -> Output (cross-process transport test)- float mv_scale_x, mv_scale_y;- uint64_t tex[FEED_SLOTS]; // NT-handle VALUES in the game process (host duplicates them out)-};--struct FeedBuildAck // host -> game-{- int32_t ok; // 1 = feature ready- uint32_t ngx_result; // NVSDK_NGX_Result of the create (0x1 = success)- uint64_t fence_in; // handle values valid in the GAME process (host duplicated them in)- uint64_t fence_out;-};--struct FeedFrameMsg // game -> host, per frame-{- uint64_t n; // fence value for this frame- uint32_t reset; // 1 = reset temporal history-};--#pragma pack(pop)diff --git a/native/NVIDIA-DLSS/LICENSE.txt b/native/NVIDIA-DLSS/LICENSE.txtdeleted file mode 100644index 4b5b447..0000000--- a/native/NVIDIA-DLSS/LICENSE.txt+++ /dev/null@@ -1,107 +0,0 @@-NVIDIA RTX SDKs LICENSE--This license is a legal agreement between you and NVIDIA Corporation ("NVIDIA") and governs the use of the NVIDIA RTX software development kits, including the DLSS SDK, NGX SDK, RTXGI SDK, RTXDI SDK, RTX Video SDK, RTX Dynamic Vibrance SDK and/or NRD SDK, if and when made available to you under this license (in each case, the �SDK�).-This license can be accepted only by an adult of legal age of majority in the country in which the SDK is used. If you are under the legal age of majority, you must ask your parent or legal guardian to consent to this license. If you are entering this license on behalf of a company or other legal entity, you represent that you have legal authority and �you� will mean the entity you represent.-By using the SDK, you affirm that you have reached the legal age of majority, you accept the terms of this license, and you take legal and financial responsibility for the actions of your permitted users.--You agree to use the SDK only for purposes that are permitted by (a) this license, and (b) any applicable law, regulation or generally accepted practices or guidelines in the relevant jurisdictions.--1. LICENSE. Subject to the terms of this license and the terms in the supplement attached, NVIDIA hereby grants you a non-exclusive, non-transferable license, without the right to sublicense (except as expressly provided in this license) to:-a. Install and use the SDK,-b. Modify and create derivative works of sample source code delivered in the SDK, and-c. Distribute any software and materials within the SDK, other than developer tools provided for your internal use, as incorporated in object code format into a software application subject to the distribution requirements indicated in this license.--2. DISTRIBUTION REQUIREMENTS. These are the distribution requirements for you to exercise the grants above:-a. An application must have material additional functionality, beyond the included portions of the SDK.-b. The following notice shall be included in modifications and derivative works of source code distributed: �This software contains source code provided by NVIDIA Corporation.�-c. You agree to distribute the SDK subject to the terms at least as protective as the terms of this license, including (without limitation) terms relating to the license grant, license restrictions and protection of NVIDIA�s intellectual property rights. Additionally, you agree that you will protect the privacy, security and legal rights of your application users.-d. You agree to notify NVIDIA in writing of any known or suspected distribution or use of the SDK not in compliance with the requirements of this license, and to enforce the terms of your agreements with respect to the distributed portions of the SDK.--3. AUTHORIZED USERS. You may allow employees and contractors of your entity or of your subsidiary(ies) to access and use the SDK from your secure network to perform work on your behalf. If you are an academic institution you may allow users enrolled or employed by the academic institution to access and use the SDK from your secure network. You are responsible for the compliance with the terms of this license by your authorized users.--4. LIMITATIONS. Your license to use the SDK is restricted as follows:-a. You may not reverse engineer, decompile or disassemble, or remove copyright or other proprietary notices from any portion of the SDK or copies of the SDK.-b. Except as expressly provided in this license, you may not copy, sell, rent, sublicense, transfer, distribute, modify, or create derivative works of any portion of the SDK. For clarity, you may not distribute or sublicense the SDK as a stand-alone product.-c. Unless you have an agreement with NVIDIA for this purpose, you may not indicate that an application created with the SDK is sponsored or endorsed by NVIDIA.-d. You may not bypass, disable, or circumvent any technical limitation, encryption, security, digital rights management or authentication mechanism in the SDK.-e. You may not use the SDK in any manner that would cause it to become subject to an open source software license. As examples, licenses that require as a condition of use, modification, and/or distribution that the SDK be: (i) disclosed or distributed in source code form; (ii) licensed for the purpose of making derivative works; or (iii) redistributable at no charge.-f. Unless you have an agreement with NVIDIA for this purpose, you may not use the SDK with any system or application where the use or failure of the system or application can reasonably be expected to threaten or result in personal injury, death, or catastrophic loss. Examples include use in avionics, navigation, military, medical, life support or other life critical applications. NVIDIA does not design, test or manufacture the SDK for these critical uses and NVIDIA shall not be liable to you or any third party, in whole or in part, for any claims or damages arising from such uses.-g. You agree to defend, indemnify and hold harmless NVIDIA and its affiliates, and their respective employees, contractors, agents, officers and directors, from and against any and all claims, damages, obligations, losses, liabilities, costs or debt, fines, restitutions and expenses (including but not limited to attorney�s fees and costs incident to establishing the right of indemnification) arising out of or related to your use of the SDK outside of the scope of this license, or not in compliance with its terms.--5. UPDATES. NVIDIA may, at its option, make available patches, workarounds or other updates to this SDK. Unless the updates are provided with their separate governing terms, they are deemed part of the SDK licensed to you as provided in this license. Further, NVIDIA may, at its option, automatically update the SDK or other software in the system, except for those updates that you may opt-out via the SDK API. You agree that the form and content of the SDK that NVIDIA provides may change without prior notice to you. While NVIDIA generally maintains compatibility between versions, NVIDIA may in some cases make changes that introduce incompatibilities in future versions of the SDK.--6. PRE-RELEASE VERSIONS. SDK versions identified as alpha, beta, preview, early access or otherwise as pre-release may not be fully functional, may contain errors or design flaws, and may have reduced or different security, privacy, availability, and reliability standards relative to commercial versions of NVIDIA software and materials. You may use a pre-release SDK version at your own risk, understanding that these versions are not intended for use in production or business-critical systems. NVIDIA may choose not to make available a commercial version of any pre-release SDK. NVIDIA may also choose to abandon development and terminate the availability of a pre-release SDK at any time without liability.--7. THIRD-PARTY COMPONENTS. The SDK may include third-party components with separate legal notices or terms as may be described in proprietary notices accompanying the SDK. If and to the extent there is a conflict between the terms in this license and the third-party license terms, the third-party terms control only to the extent necessary to resolve the conflict.--8. OWNERSHIP.--8.1 NVIDIA reserves all rights, title and interest in and to the SDK not expressly granted to you under this license. NVIDIA and its suppliers hold all rights, title and interest in and to the SDK, including their respective intellectual property rights. The SDK is copyrighted and protected by the laws of the United States and other countries, and international treaty provisions.--8.2 Subject to the rights of NVIDIA and its suppliers in the SDK, you hold all rights, title and interest in and to your applications and your derivative works of the sample source code delivered in the SDK including their respective intellectual property rights.--9. FEEDBACK. You may, but are not obligated to, provide Feedback to NVIDIA. �Feedback� means all suggestions, fixes, modifications, feature requests or other feedback regarding the SDK. Feedback, even if designated as confidential by you, shall not create any confidentiality obligation for NVIDIA. If you provide Feedback, you hereby grant NVIDIA, its affiliates and its designees a non-exclusive, perpetual, irrevocable, sublicensable, worldwide, royalty-free, fully paid-up and transferable license, under your intellectual property rights, to publicly perform, publicly display, reproduce, use, make, have made, sell, offer for sale, distribute (through multiple tiers of distribution), import, create derivative works of and otherwise commercialize and exploit the Feedback at NVIDIA�s discretion. You will not give Feedback (i) that you have reason to believe is subject to any restriction that impairs the exercise of the grant stated in this section, such as third-party intellectual property rights or (ii) subject to license terms which seek to require any product incorporating or developed using such Feedback, or other intellectual property of NVIDIA or its affiliates, to be licensed to or otherwise shared with any third party.--10. NO WARRANTIES. THE SDK IS PROVIDED AS-IS. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW NVIDIA AND ITS AFFILIATES EXPRESSLY DISCLAIM ALL WARRANTIES OF ANY KIND OR NATURE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY, NON-INFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE, USAGE OF TRADE AND COURSE OF DEALING. NVIDIA DOES NOT WARRANT THAT THE SDK WILL MEET YOUR REQUIREMENTS OR THAT THE OPERATION THEREOF WILL BE UNINTERRUPTED OR ERROR-FREE, OR THAT ALL ERRORS WILL BE CORRECTED.--11. LIMITATIONS OF LIABILITY. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW NVIDIA AND ITS AFFILIATES SHALL NOT BE LIABLE FOR ANY (I) SPECIAL, INCIDENTAL, PUNITIVE OR CONSEQUENTIAL DAMAGES, OR FOR DAMAGES FOR (A) ANY LOST PROFITS, PROJECT DELAYS, LOSS OF USE, LOSS OF DATA OR LOSS OF GOODWILL, OR (B) THE COSTS OF PROCURING SUBSTITUTE PRODUCTS, ARISING OUT OF OR IN CONNECTION WITH THIS LICENSE OR THE USE OR PERFORMANCE OF THE SDK, WHETHER SUCH LIABILITY ARISES FROM ANY CLAIM BASED UPON BREACH OF CONTRACT, BREACH OF WARRANTY, TORT (INCLUDING NEGLIGENCE), PRODUCT LIABILITY OR ANY OTHER CAUSE OF ACTION OR THEORY OF LIABILITY, EVEN IF NVIDIA HAS PREVIOUSLY BEEN ADVISED OF, OR COULD REASONABLY HAVE FORESEEN, THE POSSIBILITY OF SUCH DAMAGES. IN NO EVENT WILL NVIDIA�S AND ITS AFFILIATES TOTAL CUMULATIVE LIABILITY UNDER OR ARISING OUT OF THIS LICENSE EXCEED US$10.00. THE NATURE OF THE LIABILITY OR THE NUMBER OF CLAIMS OR SUITS SHALL NOT ENLARGE OR EXTEND THIS LIMIT.--12. TERMINATION. Your rights under this license will terminate automatically without notice from NVIDIA if you fail to comply with any term and condition of this license or if you commence or participate in any legal proceeding against NVIDIA with respect to the SDK. NVIDIA may terminate this license with advance written notice to you, if NVIDIA decides to no longer provide the SDK in a country or, in NVIDIA�s sole discretion, the continued use of it is no longer commercially viable. Upon any termination of this license, you agree to promptly discontinue use of the SDK and destroy all copies in your possession or control. Your prior distributions in accordance with this license are not affected by the termination of this license. All provisions of this license will survive termination, except for the license granted to you.--13. APPLICABLE LAW. This license will be governed in all respects by the laws of the United States and of the State of Delaware, without regard to the conflicts of laws principles. The United Nations Convention on Contracts for the International Sale of Goods is specifically disclaimed. You agree to all terms of this license in the English language. The state or federal courts residing in Santa Clara County, California shall have exclusive jurisdiction over any dispute or claim arising out of this license. Notwithstanding this, you agree that NVIDIA shall still be allowed to apply for injunctive remedies or urgent legal relief in any jurisdiction.--14. NO ASSIGNMENT. This license and your rights and obligations thereunder may not be assigned by you by any means or operation of law without NVIDIA�s permission. Any attempted assignment not approved by NVIDIA in writing shall be void and of no effect. NVIDIA may assign, delegate or transfer this license and its rights and obligations, and if to a non-affiliate you will be notified.--15. EXPORT. The SDK is subject to United States export laws and regulations. You agree to comply with all applicable U.S. and international export laws, including the Export Administration Regulations (EAR) administered by the U.S. Department of Commerce and economic sanctions administered by the U.S. Department of Treasury�s Office of Foreign Assets Control (OFAC). These laws include restrictions on destinations, end-users and end-use. By accepting this license, you confirm that you are not currently residing in a country or region currently embargoed by the U.S. and that you are not otherwise prohibited from receiving the SDK.--16. GOVERNMENT USE. The SDK, documentation and technology (�Protected Items�) are �Commercial products� as this term is defined at 48 C.F.R. 2.101, consisting of �commercial computer software� and �commercial computer software documentation� as such terms are used in, respectively, 48 C.F.R. 12.212 and 48 C.F.R. 227.7202 & 252.227-7014(a)(1). Before any Protected Items are supplied to the U.S. Government, you will (i) inform the U.S. Government in writing that the Protected Items are and must be treated as commercial computer software and commercial computer software documentation developed at private expense; (ii) inform the U.S. Government that the Protected Items are provided subject to the terms of the Agreement; and (iii) mark the Protected Items as commercial computer software and commercial computer software documentation developed at private expense. In no event will you permit the U.S. Government to acquire rights in Protected Items beyond those specified in 48 C.F.R. 52.227-19(b)(1)-(2) or 252.227-7013(c) except as expressly approved by NVIDIA in writing.--17. NOTICES. You agree that any notices that NVIDIA sends you electronically, such as via email, will satisfy any legal communication requirements. Please direct your legal notices or other correspondence to NVIDIA Corporation, 2788 San Tomas Expressway, Santa Clara, California 95051, United States of America, Attention: Legal Department.--18. ENTIRE AGREEMENT. This license is the final, complete and exclusive agreement between the parties relating to the subject matter of this license and supersedes all prior or contemporaneous understandings and agreements relating to this subject matter, whether oral or written. If any court of competent jurisdiction determines that any provision of this license is illegal, invalid or unenforceable, the remaining provisions will remain in full force and effect. Any amendment or waiver under this license shall be in writing and signed by representatives of both parties.--19. LICENSING. If the distribution terms in this license are not suitable for your organization, or for any questions regarding this license, please contact NVIDIA at [email protected].-(v. March 14, 2024)---NVIDIA RTX SUPPLEMENT TO SOFTWARE LICENSE AGREEMENT FOR NVIDIA SOFTWARE DEVELOPMENT KITS-The terms in this supplement govern your use of the NVIDIA RTX SDKs, including the DLSS SDK, NGX SDK, RTXGI SDK, RTXDI SDK, RTX Video SDK, RTX Dynamic Vibrance SDK and/or NRD SDK, if and when made available to you (in each case, the �SDK�) under the terms of your license agreement (�Agreement�) as modified by this supplement. Capitalized terms used but not defined below have the meaning assigned to them in the Agreement.-This supplement is an exhibit to the Agreement and is incorporated as an integral part of the Agreement. In the event of conflict between the terms in this supplement and the terms in the Agreement, the terms in this supplement govern.--1. Interoperability. Your applications that incorporate, or are based on, the SDK must be fully interoperable with compatible GPU hardware products designed by NVIDIA or its affiliates. Further, the DLSS SDK, NGX SDK and RTX Dynamic Vibrance SDK are licensed for you to develop applications only for their use in systems with NVIDIA GPUs.--2. Game License. You may, but are not obligated to, provide your game or related content (�Game Content�) to NVIDIA. If you provide Game Content, you hereby grant NVIDIA, its affiliates and its designees a non-exclusive, perpetual, irrevocable, worldwide, royalty-free, fully paid-up license, to use the Game Content to improve NVIDIA DLSS SDK and DLSS Model Training.--3. Limitations for the DLSS SDK, NGX SDK,RTX Video SDK and RTX Dynamic Vibrance SDK. Your applications that incorporate, or are based on, the DLSS SDK, NGX SDK, RTX Video SDK or RTX Dynamic Vibrance SDK may be deployed in a cloud service that runs on systems that consume NVIDIA vGPU software, and any other cloud service use of such SDKs or their functionality is outside of the scope of the Agreement. For the purpose of this section, cloud services include application service providers or service bureaus, operators of hosted/virtual system environments, or hosting, time sharing or providing any other type of service to others.--4. Notification for the DLSS SDK, NGX SDK and RTX Dynamic Vibrance SDK. You are required to notify NVIDIA prior to commercial release of an application (including a plug-in to a commercial application) that incorporates, or is based on, the DLSS SDK, NGX SDK or RTX Dynamic Vibrance SDK. Please send notifications to: https://developer.nvidia.com/sw-notification and provide the following information in the email: company name, publisher and developer name, NVIDIA SDK used, application name, platform (i.e. PC, Linux), scheduled ship date, and weblink to product/video.--5. Audio and Video Encoders and Decoders. You acknowledge and agree that it is your sole responsibility to obtain any additional third-party licenses required to make, have made, use, have used, sell, import, and offer for sale your products or services that include or incorporate any third-party software and content relating to audio and/or video encoders and decoders from, including but not limited to, Microsoft, Thomson, Fraunhofer IIS, Sisvel S.p.A., MPEG-LA, and Coding Technologies. NVIDIA does not grant to you under this Agreement any necessary patent or other rights with respect to any audio and/or video encoders and decoders.--6. SDK Terms.-6.1 Over the Air Updates. By installing or using the SDK you agree that NVIDIA can make over-the-air updates of the SDK in systems that have the SDK installed, including (without limitation) for quality, stability or performance improvements or to support new hardware.--6.2 SDK Integration. If you publicly release a DLSS integration in an end user game or application that presents material stability, performance, image quality, or other technical issues impacting the user experience, you will work to quickly address the integration issues. In the case issues are not addressed, NVIDIA reserves the right, as a last resort, to temporarily disable the DLSS integration until the issues can be fixed.--7. Marketing.-7.1 Marketing Activities. Your license to the SDK(s) under the Agreement is subject to your compliance with the following marketing terms:-(a) Identification by You in the DLSS SDK, NGX SDK, RTX Video SDK or Dynamic Vibrance SDK. During the term of the Agreement, NVIDIA agrees that you may identify NVIDIA on your websites, printed collateral, trade-show displays and other retail packaging materials, as the supplier of the DLSS SDK, NGX SDK, RTX Video SDK or Dynamic Vibrance SDK for the applications that were developed with use of such SDKs, provided that all such references to NVIDIA will be subject to NVIDIA's prior review and written approval, which will not be unreasonably withheld or delayed.-(b) NVIDIA Trademark Placement in Applications with the DLSS SDK, NGX SDK, or RTX Video SDK. For applications that incorporate the DLSS SDK or NGX SDK or portions thereof, you must attribute the use of the applicable SDK and include the NVIDIA Marks on splash screens, in the about box of the application (if present), and in credits for game applications.-(c) NVIDIA Trademark Placement in Applications with a licensed SDK, other than the DLSS SDK, RTX Video SDK or NGX SDK. For applications that incorporates and/or makes use of a licensed SDK, other than the DLSS SDK, RTX Video SDK or NGX SDK, you must attribute the use of the applicable SDK and include the NVIDIA Marks on the credit screen for applications that have such credit screen, or where a credit screen is not present prominently in end user documentation for the application.-(d) Identification by NVIDIA in the DLSS SDK, NGX SDK, RTX Video SDK or Dynamic Vibrance SDK. You agree that NVIDIA may identify you on NVIDIA's websites, printed collateral, trade-show displays, and other retail packaging materials as an individual or entity that produces products and services which incorporate the DLSS SDK, NGX SDK, RTX Video SDK or Dynamic Vibrance SDK as applicable. To the extent that you provide NVIDIA with input or usage requests with regard to the use of your logo or materials, NVIDIA will use commercially reasonable efforts to comply with such requests. For the avoidance of doubt, NVIDIA�s rights pursuant to this section shall survive any expiration or termination of the Agreement with respect to existing applications which incorporate the DLSS SDK, RTX Video SDK or NGX SDK.-(e) Applications Marketing Material in the DLSS SDK, NGX SDK, RTX Video SDK or Dynamic Vibrance SDK. You may provide NVIDIA with screenshots, imagery, and video footage of applications representative of your use of the NVIDIA DLSS SDK or NGX SDKs in your application (collectively, �Assets�). You hereby grant to NVIDIA the right to create and display self-promotional demo materials using the Assets, and after release of the application to the public to distribute, sub-license, and use the Assets to promote and market the NVIDIA RTX SDKs. To the extent you provide NVIDIA with input or usage requests with regard to the use of your logo or materials, NVIDIA will use commercially reasonable efforts to comply with such requests. For the avoidance of doubt, NVIDIA�s rights pursuant to this section shall survive any termination of the Agreement with respect to applications which incorporate the NVIDIA RTX SDK.--7.2 Trademark Ownership and Licenses. Trademarks are owned and licenses as follows:-(a) Ownership of Trademarks. Each party owns the trademarks, logos, and trade names (collectively "Marks") for their respective products or services, including without limitation in applications, and the NVIDIA RTX SDKs. Each party agrees to use the Marks of the other only as permitted in this exhibit.--(b) Trademark License to NVIDIA. You grant to NVIDIA a non-exclusive, non-sub licensable, non-transferable (except as set forth in the assignment provision of the Agreement), worldwide license to refer to you and your applications, and to use your Marks on NVIDIA's marketing materials and on NVIDIA's website (subject to any reasonable conditions of you) solely for NVIDIA�s marketing activities set forth in this exhibit Sections 7 (d)-(e) above. NVIDIA will follow your specifications for your Marks as to style, color, and typeface as reasonably provided to NVIDIA.--(c) Trademark License to You. NVIDIA grants to you a non-exclusive, non-sub licensable, non-transferable (except as set forth in the assignment provision of the Agreement), worldwide license, subject to the terms of this exhibit and the Agreement, to use NVIDIA RTX�, NVIDIA GeForce RTX� in combination with GeForce products, and/or NVIDIA Quadro RTX� in combination with Quadro products (collectively, the �NVIDIA Marks�) on your marketing materials and on your website (subject to any reasonable conditions of NVIDIA) solely for your marketing activities set forth in this exhibit Sections 7.1 (a)-(c) above. For the avoidance of doubt, you will not and will not permit others to use any NVIDIA Mark for any other goods or services, or in a way that tarnishes, degrades, disparages or reflects adversely any of the NVIDIA Marks or NVIDIA�s business or reputation, or that dilutes or otherwise harms the value, reputation or distinctiveness of or NVIDIA�s goodwill in any NVIDIA Mark. In addition to the termination rights set forth in the Agreement, NVIDIA may terminate this trademark license at any time upon written notice to you. You will follow NVIDIA's use guidelines and specifications for NVIDIA's Marks as to style, color and typeface as provided in NVIDIA Marks and submit a sample of each proposed use of NVIDIA's Marks at least two (2) weeks prior to the desired implementation of such use to obtain NVIDIA's prior written approval (which approval will not be unreasonably withheld or delayed). If NVIDIA does not respond within ten (10) business days of your submission of such sample, the sample will be deemed unapproved. All goodwill associated with use of NVIDIA Marks will inure to the sole benefit of NVIDIA. For the RTX Video SDK, contact NVIDIA at [email protected].--7.3 Use Guidelines. Use of the NVIDIA Marks is subject to the following guidelines:-(a) Business Practices. You covenant that you will: (a) conduct business with respect to NVIDIA�s products in a manner that reflects favorably at all times on the good name, goodwill and reputation of such products; (b) avoid deceptive, misleading or unethical practices that are detrimental to NVIDIA, its customers, or end users; (c) make no false or misleading representations with regard to NVIDIA or its products; and (d) not publish or employ or cooperate in the publication or employment of any misleading or deceptive advertising or promotional materials.--(b) No Combination Marks or Similar Marks. You agree not to (a) combine NVIDIA Marks with any other content without NVIDIA�s prior written approval, or (b) use any other trademark, trade name, or other designation of source which creates a likelihood of confusion with NVIDIA Marks.--(v. March 14, 2024)-diff --git a/native/NVIDIA-DLSS/include/nvsdk_ngx.h b/native/NVIDIA-DLSS/include/nvsdk_ngx.hdeleted file mode 100644index 44427d2..0000000--- a/native/NVIDIA-DLSS/include/nvsdk_ngx.h+++ /dev/null@@ -1,705 +0,0 @@-/*- * SPDX-FileCopyrightText: Copyright (c) 2018-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.- * SPDX-License-Identifier: LicenseRef-NvidiaProprietary- *- * NVIDIA CORPORATION, its affiliates and licensors retain all intellectual- * property and proprietary rights in and to this material, related- * documentation and any modifications thereto. Any use, reproduction,- * disclosure or distribution of this material and related documentation- * without an express license agreement from NVIDIA CORPORATION or- * its affiliates is strictly prohibited.- */--/*-* HOW TO USE:-*-* IMPORTANT: FOR DLSS/DLISP PLEASE SEE THE PROGRAMMING GUIDE-*-* IMPORTANT: Methods in this library are NOT thread safe. It is up to the-* client to ensure that thread safety is enforced as needed.-*-* 1) Call NVSDK_CONV NVSDK_NGX_D3D11/D3D12/CUDA_Init and pass your app Id-* and other parameters. This will initialize SDK or return an error code-* if SDK cannot run on target machine. Depending on error user might-* need to update drivers. Please note that application Id is provided-* by NVIDIA so if you do not have one please contact us.-*-* 2) Call NVSDK_NGX_D3D11/D3D12/CUDA_GetCapabilityParameters to obtain pointer to-* interface used to pass parameters to SDK. Interface instance is-* allocated and released by SDK so there is no need to do any memory-* management on client side.-*-* 3) Set key parameters for the feature you want to use. For example,-* width and height are required for all features and they can be-* set like this:-* Params->Set(NVSDK_NGX_Parameter_Width,MY_WIDTH);-* Params->Set(NVSDK_NGX_Parameter_Height,MY_HEIGHT);-*-* Please refer to samples since different features need different-* parameters and hints.-*-* 4) Call NVSDK_NGX_D3D11/D3D12/CUDA_GetScratchBufferSize to obtain size of-* the scratch buffer needed by specific feature. This D3D or CUDA buffer-* should be allocated by client and passed as:-* Params->Set(NVSDK_NGX_Parameter_Scratch,MY_SCRATCH_POINTER)-* Params->Set(NVSDK_NGX_Parameter_Scratch_SizeInBytes,MY_SCRATCH_SIZE_IN_BYTES)-* NOTE: Returned size can be 0 if feature does not use any scratch buffer.-* It is OK to use bigger buffer or reuse buffers across features as long-* as minimum size requirement is met.-*-* 5) Call NVSDK_NGX_D3D11/D3D12/CUDA_CreateFeature to create feature you need.-* On success SDK will return a handle which must be used in any successive-* calls to SDK which require feature handle. SDK will use all parameters-* and hints provided by client to generate feature. If feature with the same-* parameters already exists and error code will be returned.-*-* 6) Call NVSDK_NGX_D3D11/D3D12/CUDA_EvaluateFeature to invoke execution of-* specific feature. Before feature can be evaluated input parameters must-* be specified (like for example color/albedo buffer, motion vectors etc)-*-* 6) Call NVSDK_NGX_D3D11/D3D12/CUDA_ReleaseFeature when feature is no longer-* needed. After this call feature handle becomes invalid and cannot be used.-*-* 7) Call NVSDK_NGX_D3D11/D3D12/CUDA_Shutdown when SDK is no longer needed to-* release all resources.--* Contact: [email protected]-*/---#ifndef NVSDK_NGX_H-#define NVSDK_NGX_H--#include <stddef.h> // For size_t--#include "nvsdk_ngx_defs.h"-#include "nvsdk_ngx_params.h"-#ifndef __cplusplus-#include <stdbool.h>-#include <wchar.h>-#endif--#ifdef __cplusplus-extern "C"-{-#endif--typedef struct IDXGIAdapter IDXGIAdapter;-typedef struct ID3D11Device ID3D11Device;-typedef struct ID3D11Resource ID3D11Resource;-typedef struct ID3D11DeviceContext ID3D11DeviceContext;--typedef struct ID3D12Device ID3D12Device;-typedef struct ID3D12GraphicsCommandList ID3D12GraphicsCommandList;--typedef unsigned long long CUtexObject;--// NOTE: Functions under the same name and different function signatures exist-// between the NGX SDK, NGX Core (driver), and NGX Snippets. To discern the-// different signatures here we check if NGX_SNIPPET_BUILD is defined. When that-// is the case we know that the function signature in-use should be that of-// between NGX Core and the Snippet. Otherwise the signature should be between-// NGX SDK and NGX Core.-//-////////////////////////////////////////////////////////////////////////////////-// NVSDK_NGX_Init-// ------------------------------------------------------------------------------// Initializes a new SDK instance.-//-// DESCRIPTION:-// Initializes a new SDK instance. Most NGX SDK functions require the NGX-// SDK to be initialized for the corresponding graphics API and device to-// function properly.-//-// NVSDK_NGX_Init requires an application ID provided by NVIDIA. If an-// application ID is not available, use NVSDK_NGX_Init_with_ProjectID to-// supply your own identifier.-//-// Be sure to call NVSDK_NGX_Shutdown to shut down the SDK when it is no-// longer needed.-//-// PARAMETERS:-// InApplicationId:-// Unique ID provided by NVIDIA.-//-// InApplicationDataPath:-// Directory to store logs and other temporary files. Write access is-// required. Typically, this would be next to the application executable,-// or in a location like Documents or ProgramData.-//-// InDevice (D3D11/12 only):-// DirectX device to use.-//-// InFeatureInfo:-// Contains information common to all features, including a list of paths-// where feature DLLs can be located, other than the default path (application directory).-//-// InSDKVersion:-// Version of the SDK currently in use. Typically, this should be left as-// the default value, NVSDK_NGX_Version_API.-//-// RETURNS:-// NVSDK_NGX_Result indicating success or failure. Common values include:-// - NVSDK_NGX_Result_Success if the function executed successfully-// - NVSDK_NGX_Result_FAIL_FeatureNotSupported if the NGX SDK is not-// supported on the current system-// Check the NGX logs for additional information about any failures.-//-#if defined(NGX_SNIPPET_BUILD)-#ifdef __cplusplus-NVSDK_NGX_API NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_D3D11_Init(unsigned long long InApplicationId, const wchar_t *InApplicationDataPath, ID3D11Device *InDevice, NVSDK_NGX_Version InSDKVersion = NVSDK_NGX_Version_API);-NVSDK_NGX_API NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_D3D11_Init_Ext(unsigned long long InApplicationId, const wchar_t *InApplicationDataPath, ID3D11Device *InDevice, NVSDK_NGX_Version InSDKVersion = NVSDK_NGX_Version_API, const NVSDK_NGX_Parameter* InParameters = nullptr);-NVSDK_NGX_API NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_D3D12_Init(unsigned long long InApplicationId, const wchar_t *InApplicationDataPath, ID3D12Device *InDevice, NVSDK_NGX_Version InSDKVersion = NVSDK_NGX_Version_API);-NVSDK_NGX_API NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_D3D12_Init_Ext(unsigned long long InApplicationId, const wchar_t *InApplicationDataPath, ID3D12Device *InDevice, NVSDK_NGX_Version InSDKVersion = NVSDK_NGX_Version_API, const NVSDK_NGX_Parameter* InParameters = nullptr);-NVSDK_NGX_API NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_CUDA_Init(unsigned long long InApplicationId, const wchar_t *InApplicationDataPath, NVSDK_NGX_Version InSDKVersion = NVSDK_NGX_Version_API);-NVSDK_NGX_API NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_CUDA_Init_Ext(unsigned long long InApplicationId, const wchar_t *InApplicationDataPath, NVSDK_NGX_Version InSDKVersion = NVSDK_NGX_Version_API, const NVSDK_NGX_Parameter* InParameters = nullptr);-NVSDK_NGX_API NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_CUDA_Init_Ext1(unsigned long long InApplicationId, const wchar_t *InApplicationDataPath, NVSDK_NGX_CUDADevice *InDevice, NVSDK_NGX_Version InSDKVersion = NVSDK_NGX_Version_API, const NVSDK_NGX_Parameter* InParameters = nullptr);-#else-NVSDK_NGX_API NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_D3D11_Init(unsigned long long InApplicationId, const wchar_t *InApplicationDataPath, ID3D11Device *InDevice, NVSDK_NGX_Version InSDKVersion);-NVSDK_NGX_API NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_D3D11_Init_Ext(unsigned long long InApplicationId, const wchar_t *InApplicationDataPath, ID3D11Device *InDevice, NVSDK_NGX_Version InSDKVersion, const NVSDK_NGX_Parameter* InParameters);-NVSDK_NGX_API NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_D3D12_Init(unsigned long long InApplicationId, const wchar_t *InApplicationDataPath, ID3D12Device *InDevice, NVSDK_NGX_Version InSDKVersion);-NVSDK_NGX_API NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_D3D12_Init_Ext(unsigned long long InApplicationId, const wchar_t *InApplicationDataPath, ID3D12Device *InDevice, NVSDK_NGX_Version InSDKVersion, const NVSDK_NGX_Parameter* InParameters);-NVSDK_NGX_API NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_CUDA_Init(unsigned long long InApplicationId, const wchar_t *InApplicationDataPath, NVSDK_NGX_Version InSDKVersion);-NVSDK_NGX_API NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_CUDA_Init_Ext(unsigned long long InApplicationId, const wchar_t *InApplicationDataPath, NVSDK_NGX_Version InSDKVersion, const NVSDK_NGX_Parameter* InParameters);-NVSDK_NGX_API NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_CUDA_Init_Ext1(unsigned long long InApplicationId, const wchar_t *InApplicationDataPath, NVSDK_NGX_CUDADevice *InDevice, NVSDK_NGX_Version InSDKVersion, const NVSDK_NGX_Parameter* InParameters);-#endif-#else-#ifdef __cplusplus-NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_D3D11_Init(unsigned long long InApplicationId, const wchar_t *InApplicationDataPath, ID3D11Device *InDevice, const NVSDK_NGX_FeatureCommonInfo *InFeatureInfo = nullptr, NVSDK_NGX_Version InSDKVersion = NVSDK_NGX_Version_API);-NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_D3D12_Init(unsigned long long InApplicationId, const wchar_t *InApplicationDataPath, ID3D12Device *InDevice, const NVSDK_NGX_FeatureCommonInfo *InFeatureInfo = nullptr, NVSDK_NGX_Version InSDKVersion = NVSDK_NGX_Version_API);-NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_CUDA_Init(unsigned long long InApplicationId, const wchar_t *InApplicationDataPath, const NVSDK_NGX_FeatureCommonInfo *InFeatureInfo = nullptr, NVSDK_NGX_Version InSDKVersion = NVSDK_NGX_Version_API);-NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_CUDA_Init1(unsigned long long InApplicationId, const wchar_t *InApplicationDataPath, NVSDK_NGX_CUDADevice *InDevice, const NVSDK_NGX_FeatureCommonInfo *InFeatureInfo = nullptr, NVSDK_NGX_Version InSDKVersion = NVSDK_NGX_Version_API);-#else-NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_D3D11_Init(unsigned long long InApplicationId, const wchar_t *InApplicationDataPath, ID3D11Device *InDevice, const NVSDK_NGX_FeatureCommonInfo *InFeatureInfo, NVSDK_NGX_Version InSDKVersion);-NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_D3D12_Init(unsigned long long InApplicationId, const wchar_t *InApplicationDataPath, ID3D12Device *InDevice, const NVSDK_NGX_FeatureCommonInfo *InFeatureInfo, NVSDK_NGX_Version InSDKVersion);-NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_CUDA_Init(unsigned long long InApplicationId, const wchar_t *InApplicationDataPath, const NVSDK_NGX_FeatureCommonInfo *InFeatureInfo, NVSDK_NGX_Version InSDKVersion);-NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_CUDA_Init1(unsigned long long InApplicationId, const wchar_t *InApplicationDataPath, NVSDK_NGX_CUDADevice *InDevice, const NVSDK_NGX_FeatureCommonInfo *InFeatureInfo, NVSDK_NGX_Version InSDKVersion);-#endif-#endif // defined(NGX_SNIPPET_BUILD)--////////////////////////////////////////////////////////////////////////////////-// NVSDK_NGX_Init_with_ProjectID-// ------------------------------------------------------------------------------// Initializes a new SDK instance using a project ID.-//-// DESCRIPTION:-// Initializes a new SDK instance. Most NGX SDK functions require the NGX-// SDK to be initialized for the corresponding graphics API and device to-// function properly.-//-// Applications must provide a unique identifier to initialize the NGX SDK.-// If an identifier was provided by NVIDIA, use NVSDK_NGX_Init instead.-//-// For projects using third-party engines such as Unreal Engine or-// Omniverse, the integration for those engines should handle providing the-// correct Project ID to NGX. Ensure that the project ID is set in the-// engine's editor.-//-// For other engines, use NVSDK_NGX_EngineType CUSTOM. The driver will-// validate that the Project ID is GUID-like, for example,-// "a0f57b54-1daf-4934-90ae-c4035c19df04". Ensure your project ID matches-// this format.-//-// Be sure to call NVSDK_NGX_Shutdown to shut down the SDK when it is no-// longer needed.-//-// PARAMETERS:-// InProjectId:-// Unique ID provided by the rendering engine used. Must be a GUID-like-// string.-//-// InEngineType:-// Rendering engine used by the application/plugin. Use NVSDK_NGX_EngineType-// CUSTOM if the specific engine type is not explicitly supported.-//-// InEngineVersion:-// Version number of the rendering engine used by the application/plugin.-//-// InApplicationDataPath:-// Directory to store logs and other temporary files (write access required).-//-// InDevice (D3D11/12 only):-// DirectX device to use.-//-// InFeatureInfo:-// Contains information common to all features, including a list of paths-// where feature DLLs can be located in addition to the default path-// (the application directory).-//-// InSDKVersion:-// Version of the SDK currently in use. Typically, this should be left as-// the default value, NVSDK_NGX_Version_API.-//-// RETURNS:-// NVSDK_NGX_Result indicating success or failure. Common values include:-// - NVSDK_NGX_Result_Success if the function executed successfully-// - NVSDK_NGX_Result_InvalidParameter if the provided project ID is in-// an invalid format-// - NVSDK_NGX_Result_FAIL_FeatureNotSupported if the NGX SDK is not-// supported on the current system-// Check the NGX logs for additional information about any failures.-//-#if defined(NGX_SNIPPET_BUILD)-// No NGX Core <---> Snippet interfaces-#else-#ifdef __cplusplus-NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_D3D11_Init_with_ProjectID(const char *InProjectId, NVSDK_NGX_EngineType InEngineType, const char *InEngineVersion, const wchar_t *InApplicationDataPath, ID3D11Device *InDevice, const NVSDK_NGX_FeatureCommonInfo *InFeatureInfo = nullptr, NVSDK_NGX_Version InSDKVersion = NVSDK_NGX_Version_API);-NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_D3D12_Init_with_ProjectID(const char *InProjectId, NVSDK_NGX_EngineType InEngineType, const char *InEngineVersion, const wchar_t *InApplicationDataPath, ID3D12Device *InDevice, const NVSDK_NGX_FeatureCommonInfo *InFeatureInfo = nullptr, NVSDK_NGX_Version InSDKVersion = NVSDK_NGX_Version_API);-NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_CUDA_Init_with_ProjectID(const char *InProjectId, NVSDK_NGX_EngineType InEngineType, const char *InEngineVersion, const wchar_t *InApplicationDataPath, const NVSDK_NGX_FeatureCommonInfo *InFeatureInfo = nullptr, NVSDK_NGX_Version InSDKVersion = NVSDK_NGX_Version_API);-#else-NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_D3D11_Init_with_ProjectID(const char *InProjectId, NVSDK_NGX_EngineType InEngineType, const char *InEngineVersion, const wchar_t *InApplicationDataPath, ID3D11Device *InDevice, const NVSDK_NGX_FeatureCommonInfo *InFeatureInfo, NVSDK_NGX_Version InSDKVersion);-NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_D3D12_Init_with_ProjectID(const char *InProjectId, NVSDK_NGX_EngineType InEngineType, const char *InEngineVersion, const wchar_t *InApplicationDataPath, ID3D12Device *InDevice, const NVSDK_NGX_FeatureCommonInfo *InFeatureInfo, NVSDK_NGX_Version InSDKVersion);-NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_CUDA_Init_with_ProjectID(const char *InProjectId, NVSDK_NGX_EngineType InEngineType, const char *InEngineVersion, const wchar_t *InApplicationDataPath, const NVSDK_NGX_FeatureCommonInfo *InFeatureInfo, NVSDK_NGX_Version InSDKVersion);-#endif-#endif // defined(NGX_SNIPPET_BUILD)--////////////////////////////////////////////////////////////////////////////////-// NVSDK_NGX_Shutdown-// ------------------------------------------------------------------------------// Shuts down the current SDK instance and releases all resources.-//-// DESCRIPTION:-// Shuts down the current SDK instance and releases all resources. If a-// device is provided, NVSDK_NGX_Shutdown1 shuts down the instance-// corresponding to the specified device. If nullptr is provided, all-// instances are shut down.-//-// Deprecation Notice: The use of Shutdown() is deprecated. Please use-// Shutdown1(nullptr) instead.-//-// PARAMETERS:-// InDevice:-// Device to shut down. If nullptr, the SDK is shut down for all devices.-//-// RETURNS:-// NVSDK_NGX_Result indicating success or failure.-//-#ifdef NGX_ENABLE_DEPRECATED_SHUTDOWN-NVSDK_NGX_API NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_D3D11_Shutdown(void);-NVSDK_NGX_API NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_D3D12_Shutdown(void);-#endif-NVSDK_NGX_API NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_D3D11_Shutdown1(ID3D11Device *InDevice);-NVSDK_NGX_API NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_D3D12_Shutdown1(ID3D12Device *InDevice);-NVSDK_NGX_API NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_CUDA_Shutdown(void);-NVSDK_NGX_API NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_CUDA_Shutdown1(NVSDK_NGX_CUDADevice *InDevice);--#ifdef NGX_ENABLE_DEPRECATED_GET_PARAMETERS-////////////////////////////////////////////////////////////////////////////////-// NVSDK_NGX_GetParameters-// ------------------------------------------------------------------------------// Retrieves a parameter map used to set parameters needed by the SDK.-//-// DEPRECATED: Use NVSDK_NGX_AllocateParameters or-// NVSDK_NGX_GetCapabilityParameters instead.-//-// DESCRIPTION:-// Retrieves the common NVSDK_NGX_Parameter map for providing parameters to-// the SDK. The NVSDK_NGX_Parameter interface allows simple parameter setup-// using named fields. For example, set the width by calling-// Parameters->Set(NVSDK_NGX_Parameter_Width, 100) or provide a resource-// pointer by calling Parameters->Set(NVSDK_NGX_Parameter_Color, resource).-// For more details, see the sample code.-//-// Parameter maps returned by NVSDK_NGX_GetParameters are pre-populated-// with NGX capabilities and available features. Unlike-// NVSDK_NGX_AllocateParameters, parameter maps returned by-// NVSDK_NGX_GetParameters have their lifetimes managed by NGX and must not-// be destroyed by the application using NVSDK_NGX_DestroyParameters.-//-// This function may only be called after a successful call to-// NVSDK_NGX_Init.-//-// Note: Allocated memory will be freed by NGX, so do not use the-// free/delete operator.-//-// Deprecation Notice: NVSDK_NGX_GetParameters is deprecated. Applications-// should use NVSDK_NGX_AllocateParameters and-// NVSDK_NGX_GetCapabilityParameters when possible. However, if there is a-// possibility that the user may be using an older driver version (driver-// version 445 or older), NVSDK_NGX_GetParameters may still be used as a-// fallback if NVSDK_NGX_AllocateParameters or-// NVSDK_NGX_GetCapabilityParameters return-// NVSDK_NGX_Result_FAIL_OutOfDate.-//-// PARAMETERS:-// OutParameters:-// Output pointer that will be populated with an NVSDK_NGX_Parameter-// interface.-//-// RETURNS:-// NVSDK_NGX_Result indicating success or failure.-//-NVSDK_NGX_API NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_D3D11_GetParameters(NVSDK_NGX_Parameter **OutParameters);-NVSDK_NGX_API NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_D3D12_GetParameters(NVSDK_NGX_Parameter **OutParameters);-NVSDK_NGX_API NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_CUDA_GetParameters(NVSDK_NGX_Parameter **OutParameters);-#endif // NGX_ENABLE_DEPRECATED_GET_PARAMETERS--////////////////////////////////////////////////////////////////////////////////-// NVSDK_NGX_AllocateParameters-// ------------------------------------------------------------------------------// Allocates a parameter map used to set parameters needed by the SDK.-//-// DESCRIPTION:-// Allocates a new NVSDK_NGX_Parameter map for providing parameters to the-// SDK. The lifetime of this parameter map must be managed by the-// application. The NVSDK_NGX_Parameter interface allows simple parameter-// setup using named fields. For example, set the width by calling-// Parameters->Set(NVSDK_NGX_Parameter_Width, 100) or provide a resource-// pointer by calling Parameters->Set(NVSDK_NGX_Parameter_Color, resource).-// For more details, see the sample code.-//-// Use NVSDK_NGX_DestroyParameters to free a parameter map created by-// NVSDK_NGX_AllocateParameters. Parameter maps created by-// NVSDK_NGX_AllocateParameters must NOT be freed using the free/delete-// operator.-//-// Parameter maps created by NVSDK_NGX_AllocateParameters do not come-// pre-populated with NGX capabilities and available features. To create a-// new parameter map pre-populated with such information, use-// NVSDK_NGX_GetCapabilityParameters instead.-//-// This function may return NVSDK_NGX_Result_FAIL_OutOfDate if using an-// older driver that does not support this API call. In such a case,-// NVSDK_NGX_GetParameters may be used as a fallback.-//-// This function may only be called after a successful call to-// NVSDK_NGX_Init.-//-// PARAMETERS:-// OutParameters:-// Output pointer that will be populated with the newly-allocated-// NVSDK_NGX_Parameter interface.-//-// RETURNS:-// NVSDK_NGX_Result indicating success or failure. Common values include:-// - NVSDK_NGX_Result_Success if the function executed successfully-// - NVSDK_NGX_Result_FAIL_OutOfDate if this function is not supported by-// the current display driver-// Check the NGX logs for additional information about any failures.-//-NVSDK_NGX_API NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_D3D11_AllocateParameters(NVSDK_NGX_Parameter** OutParameters);-NVSDK_NGX_API NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_D3D12_AllocateParameters(NVSDK_NGX_Parameter** OutParameters);-NVSDK_NGX_API NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_CUDA_AllocateParameters(NVSDK_NGX_Parameter** OutParameters);--////////////////////////////////////////////////////////////////////////////////-// NVSDK_NGX_GetCapabilityParameters-// ------------------------------------------------------------------------------// Allocates a parameter map populated with NGX and feature capabilities.-//-// DESCRIPTION:-// Allocates a new NVSDK_NGX_Parameter map pre-populated with NGX-// capabilities and information about available features. The output-// parameter map can also be used in the same ways as a parameter map-// allocated with NVSDK_NGX_AllocateParameters. However, it is not-// recommended to use NVSDK_NGX_GetCapabilityParameters unless querying NGX-// capabilities due to the overhead associated with pre-populating the-// parameter map.-//-// Use NVSDK_NGX_DestroyParameters to free a parameter map created by-// NVSDK_NGX_GetCapabilityParameters. Parameter maps created by-// NVSDK_NGX_GetCapabilityParameters must NOT be freed using the-// free/delete operator.-//-// This function may return NVSDK_NGX_Result_FAIL_OutOfDate if using an-// older driver that does not support this API call. In such a case,-// NVSDK_NGX_GetParameters may be used as a fallback.-//-// This function may only be called after a successful call to-// NVSDK_NGX_Init.-//-// PARAMETERS:-// OutParameters:-// Output pointer that will be populated with the newly-allocated-// NVSDK_NGX_Parameter interface.-//-// RETURNS:-// NVSDK_NGX_Result indicating success or failure. Common values include:-// - NVSDK_NGX_Result_Success if the function executed successfully-// - NVSDK_NGX_Result_FAIL_OutOfDate if this function is not supported by-// the current display driver-// Check the NGX logs for additional information about any failures.-//-NVSDK_NGX_API NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_D3D11_GetCapabilityParameters(NVSDK_NGX_Parameter** OutParameters);-NVSDK_NGX_API NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_D3D12_GetCapabilityParameters(NVSDK_NGX_Parameter** OutParameters);-NVSDK_NGX_API NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_CUDA_GetCapabilityParameters(NVSDK_NGX_Parameter** OutParameters);--////////////////////////////////////////////////////////////////////////////////-// NVSDK_NGX_DestroyParameters-// ------------------------------------------------------------------------------// Destroys the specified parameter map.-//-// DESCRIPTION:-// Destroys the input parameter map. Once NVSDK_NGX_DestroyParameters is-// called on a parameter map, it must not be used again.-//-// NVSDK_NGX_DestroyParameters must not be called on any parameter map-// returned by NVSDK_NGX_GetParameters; NGX will manage the lifetime of-// those parameter maps.-//-// This function may only be called after a successful call to-// NVSDK_NGX_Init.-//-// PARAMETERS:-// InParameters:-// The parameter map to be destroyed.-//-// RETURNS:-// NVSDK_NGX_Result indicating success or failure.-//-NVSDK_NGX_API NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_D3D11_DestroyParameters(NVSDK_NGX_Parameter* InParameters);-NVSDK_NGX_API NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_D3D12_DestroyParameters(NVSDK_NGX_Parameter* InParameters);-NVSDK_NGX_API NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_CUDA_DestroyParameters(NVSDK_NGX_Parameter* InParameters);--////////////////////////////////////////////////////////////////////////////////-// NVSDK_NGX_GetScratchBufferSize-// ------------------------------------------------------------------------------// Retrieves the size of the scratch buffer needed for the specified feature.-//-// DESCRIPTION:-// The SDK requires a buffer of a certain size provided by the client to-// initialize some NGX features. Once the feature is no longer needed, the-// buffer can be released. It is safe to reuse the same scratch buffer for-// different features as long as the minimum size requirement is met for-// all features. Some features might not need a scratch buffer, so a return-// size of 0 is completely valid.-//-// Note: Most current NGX features do not use scratch buffers. Please check-// the documentation for the particular feature in use to determine whether-// a scratch buffer needs to be created.-//-// PARAMETERS:-// InFeatureId:-// Identifier of the feature to query.-//-// InParameters:-// Parameters used by the feature to determine scratch buffer size.-//-// OutSizeInBytes:-// Number of bytes needed for the scratch buffer for the specified feature.-//-// RETURNS:-// NVSDK_NGX_Result indicating success or failure.-//-NVSDK_NGX_API NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_D3D11_GetScratchBufferSize(NVSDK_NGX_Feature InFeatureId, const NVSDK_NGX_Parameter *InParameters, size_t *OutSizeInBytes);-NVSDK_NGX_API NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_D3D12_GetScratchBufferSize(NVSDK_NGX_Feature InFeatureId, const NVSDK_NGX_Parameter *InParameters, size_t *OutSizeInBytes);-NVSDK_NGX_API NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_CUDA_GetScratchBufferSize(NVSDK_NGX_Feature InFeatureId, const NVSDK_NGX_Parameter *InParameters, size_t *OutSizeInBytes);--////////////////////////////////////////////////////////////////////////////////-// NVSDK_NGX_CreateFeature-// ------------------------------------------------------------------------------// Creates and initializes an instance of the specified NGX feature.-//-// DESCRIPTION:-// Each feature needs to be created before it can be used. The parameters-// required to create the feature vary. Refer to the feature's-// documentation and/or sample code to find out which input parameters are-// needed to create a specific feature.-//-// NVSDK_NGX_CreateFeature creates an NVSDK_NGX_Handle to the feature, which-// is needed to reference the feature in later calls to-// NVSDK_NGX_EvaluateFeature. Multiple instances of the same feature may be-// created, and evaluating one instance of a feature should not change the-// state of other instances.-//-// When a feature instance is no longer needed, it should be freed using-// NVSDK_NGX_ReleaseFeature.-//-// PARAMETERS:-// InCmdList (D3D12 only):-// Command list to use to execute GPU commands. Must:-// - Be open and recording-// - Have a node mask that includes the device provided in-// NVSDK_NGX_D3D12_Init-// - Be executed on a non-copy command queue-//-// InDevCtx (D3D11 only):-// Device context to use to execute GPU commands. Must be an immediate-// context. Passing a deferred context is not supported and will cause the-// API to return an error.-//-// InFeatureID:-// Identifier of the feature to initialize.-//-// InParameters:-// Parameters used to create the feature.-//-// OutHandle:-// Handle which uniquely identifies the feature.-//-// RETURNS:-// NVSDK_NGX_Result indicating success or failure. Common values include:-// - NVSDK_NGX_Result_Success if the function executed successfully-// - NVSDK_NGX_Result_FAIL_UnableToInitializeFeature if the feature-// cannot be created, for example, because the feature is not supported-// on the current hardware, or because the DLL could not be found-// - NVSDK_NGX_Result_FAIL_InvalidParameter if any of the input-// parameters are invalid-// - NVSDK_NGX_Result_FAIL_FeatureAlreadyExists if a feature instance-// with the same parameters has already been created, and the feature-// doesn't allow multiple instances to be created with the same-// parameters.-// Check the NGX logs for additional information about any failures.-//-#if defined(NGX_SNIPPET_BUILD)-NVSDK_NGX_API NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_D3D11_CreateFeature(ID3D11DeviceContext *InDevCtx, NVSDK_NGX_Feature InFeatureID, const NVSDK_NGX_Parameter *InParameters, NVSDK_NGX_Handle **OutHandle);-NVSDK_NGX_API NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_D3D12_CreateFeature(ID3D12GraphicsCommandList *InCmdList, NVSDK_NGX_Feature InFeatureID, const NVSDK_NGX_Parameter *InParameters, NVSDK_NGX_Handle **OutHandle);-NVSDK_NGX_API NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_CUDA_CreateFeature(NVSDK_NGX_Feature InFeatureID, const NVSDK_NGX_Parameter *InParameters, NVSDK_NGX_Handle **OutHandle);-NVSDK_NGX_API NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_CUDA_CreateFeature1(NVSDK_NGX_CUDADevice *InDevice, NVSDK_NGX_Feature InFeatureID, const NVSDK_NGX_Parameter *InParameters, NVSDK_NGX_Handle **OutHandle);-#else-NVSDK_NGX_API NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_D3D11_CreateFeature(ID3D11DeviceContext *InDevCtx, NVSDK_NGX_Feature InFeatureID, NVSDK_NGX_Parameter *InParameters, NVSDK_NGX_Handle **OutHandle);-NVSDK_NGX_API NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_D3D12_CreateFeature(ID3D12GraphicsCommandList *InCmdList, NVSDK_NGX_Feature InFeatureID, NVSDK_NGX_Parameter *InParameters, NVSDK_NGX_Handle **OutHandle);-NVSDK_NGX_API NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_CUDA_CreateFeature(NVSDK_NGX_Feature InFeatureID, const NVSDK_NGX_Parameter *InParameters, NVSDK_NGX_Handle **OutHandle);-NVSDK_NGX_API NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_CUDA_CreateFeature1(NVSDK_NGX_CUDADevice *InDevice, NVSDK_NGX_Feature InFeatureID, const NVSDK_NGX_Parameter *InParameters, NVSDK_NGX_Handle **OutHandle);--#endif // defined(NGX_SNIPPET_BUILD)--////////////////////////////////////////////////////////////////////////////////-// NVSDK_NGX_ReleaseFeature-// ------------------------------------------------------------------------------// Releases the specified NGX feature.-//-// DESCRIPTION:-// Releases the feature associated with the given handle and frees its-// memory. Handles are not reference counted, so after this call, it is-// invalid to use the provided handle.-//-// PARAMETERS:-// InHandle:-// Handle to the feature to be released.-//-// RETURNS:-// NVSDK_NGX_Result indicating success or failure.-//-NVSDK_NGX_API NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_D3D11_ReleaseFeature(NVSDK_NGX_Handle *InHandle);-NVSDK_NGX_API NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_D3D12_ReleaseFeature(NVSDK_NGX_Handle *InHandle);-NVSDK_NGX_API NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_CUDA_ReleaseFeature(NVSDK_NGX_Handle *InHandle);--////////////////////////////////////////////////////////////////////////////////-// NVSDK_NGX_GetFeatureRequirements-// ------------------------------------------------------------------------------// Identifies system requirements to support a given NGX feature.-//-// DESCRIPTION:-// Utility function used to identify system requirements to support a given-// NGX feature on a system, given its display device subsystem adapter-// information that will be subsequently used for creating the graphics-// device. The output parameter OutSupported will be populated with-// requirements and is valid if and only if the function returns-// NVSDK_NGX_Result_Success. The result includes:-// - FeatureSupported: Bitfield of reasons why the feature is-// unsupported, as specified in NVSDK_NGX_Feature_Support_Result. 0 if-// the feature is supported-// - MinHWArchitecture: The hardware architecture version corresponding-// to an NV_GPU_ARCHITECTURE_ID value defined in the NvAPI GPU-// Framework-// - MinOSVersion: The minimum OS version required for the provided-// feature-//-// NVSDK_NGX_Init does NOT need to be called before calling this function.-// Applications may wish to use this function to determine whether a-// desired feature is supported before initializing the complete SDK.-//-// PARAMETERS:-// Adapter (D3D11/12 only):-// Physical adapter which will be used to create the graphics device.-//-// FeatureDiscoveryInfo:-// Struct containing information about the feature to query and how it is-// expected to be initialized, including the feature ID and information-// that would be provided to NVSDK_NGX_Init.-//-// OutSupported:-// Populated with the requirements for the specified feature.-//-// RETURNS:-// NVSDK_NGX_Result indicating success or failure.-//-NVSDK_NGX_API NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_D3D11_GetFeatureRequirements(IDXGIAdapter *Adapter,- const NVSDK_NGX_FeatureDiscoveryInfo *FeatureDiscoveryInfo,- NVSDK_NGX_FeatureRequirement *OutSupported);--NVSDK_NGX_API NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_D3D12_GetFeatureRequirements(IDXGIAdapter *Adapter,- const NVSDK_NGX_FeatureDiscoveryInfo *FeatureDiscoveryInfo,- NVSDK_NGX_FeatureRequirement *OutSupported);--NVSDK_NGX_API NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_CUDA_GetFeatureRequirements(int CudaDevice,- const NVSDK_NGX_FeatureDiscoveryInfo *FeatureDiscoveryInfo,- NVSDK_NGX_FeatureRequirement *OutSupported);--////////////////////////////////////////////////////////////////////////////////-// NVSDK_NGX_EvaluateFeature-// ------------------------------------------------------------------------------// Evaluates the specified NGX feature using the provided parameters.-//-// DESCRIPTION:-// Evaluates the given feature using the provided parameters. The-// parameters required to evaluate a feature vary. Refer to the feature's-// documentation and sample code to determine which input parameters are-// needed.-//-// To evaluate a feature, an NVSDK_NGX_Handle to an instance of that-// feature, created with NVSDK_NGX_CreateFeature, must be provided.-//-// For most features, it is beneficial to pass as many input buffers and-// parameters as possible (e.g., provide all render targets like color,-// albedo, normals, depth, etc.). This will ensure maximum future-// compatibility with new updates.-//-// PARAMETERS:-// InCmdList (D3D12 only):-// Command list to use to execute GPU commands. Must be:-// - Open and recording-// - With a node mask including the device provided in NVSDK_NGX_D3D12_Init-// - Executed on a non-copy command queue-//-// InDevCtx (D3D11 only):-// Device context to use to execute GPU commands. Must be an immediate-// context. Passing a deferred context is not supported and will cause the-// API to return an error.-//-// InFeatureHandle:-// Handle representing the feature to be evaluated.-//-// InParameters:-// List of parameters required to evaluate the feature.-//-// InCallback:-// Optional callback for features that might take longer to execute. If-// specified, the SDK will call it with progress values in the range 0.0f --// 1.0f. Not all features support progress callbacks. Refer to the-// documentation for the specific feature to determine whether or not-// progress callbacks are supported.-//-// RETURNS:-// NVSDK_NGX_Result indicating success or failure. Common values include:-// - NVSDK_NGX_Result_Success if the function executed successfully.-// - NVSDK_NGX_Result_FAIL_InvalidParameter if any of the input-// parameters are missing or invalid.-// - NVSDK_NGX_Result_FAIL_FeatureNotFound if a feature with the provided-// handle could not be found.-// Check the NGX logs for additional information about any failures.-//-#ifdef __cplusplus-NVSDK_NGX_API NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_D3D11_EvaluateFeature(ID3D11DeviceContext *InDevCtx, const NVSDK_NGX_Handle *InFeatureHandle, const NVSDK_NGX_Parameter *InParameters, PFN_NVSDK_NGX_ProgressCallback InCallback = NULL);-NVSDK_NGX_API NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_D3D12_EvaluateFeature(ID3D12GraphicsCommandList *InCmdList, const NVSDK_NGX_Handle *InFeatureHandle, const NVSDK_NGX_Parameter *InParameters, PFN_NVSDK_NGX_ProgressCallback InCallback = NULL);-NVSDK_NGX_API NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_CUDA_EvaluateFeature(const NVSDK_NGX_Handle *InFeatureHandle, const NVSDK_NGX_Parameter *InParameters, PFN_NVSDK_NGX_ProgressCallback InCallback = NULL);-#endif--NVSDK_NGX_API NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_D3D11_EvaluateFeature_C(ID3D11DeviceContext *InDevCtx, const NVSDK_NGX_Handle *InFeatureHandle, const NVSDK_NGX_Parameter *InParameters, PFN_NVSDK_NGX_ProgressCallback_C InCallback);-NVSDK_NGX_API NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_D3D12_EvaluateFeature_C(ID3D12GraphicsCommandList *InCmdList, const NVSDK_NGX_Handle *InFeatureHandle, const NVSDK_NGX_Parameter *InParameters, PFN_NVSDK_NGX_ProgressCallback_C InCallback);-NVSDK_NGX_API NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_CUDA_EvaluateFeature_C(const NVSDK_NGX_Handle *InFeatureHandle, const NVSDK_NGX_Parameter *InParameters, PFN_NVSDK_NGX_ProgressCallback_C InCallback);--#if defined(NGX_SNIPPET_BUILD)-// No NGX Core <---> Snippet interfaces-#else-NVSDK_NGX_API NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_UpdateFeature(const NVSDK_NGX_Application_Identifier *ApplicationId, const NVSDK_NGX_Feature FeatureID);-#endif // defined(NGX_SNIPPET_BUILD)--// NGX return-code conversion-to-string utility only as a helper for debugging/logging - not for official use.-const wchar_t* NVSDK_CONV GetNGXResultAsString(NVSDK_NGX_Result InNGXResult);--#ifdef __cplusplus-} // extern "C"-#endif--#endif // #define NVSDK_NGX_Hdiff --git a/native/NVIDIA-DLSS/include/nvsdk_ngx_defs.h b/native/NVIDIA-DLSS/include/nvsdk_ngx_defs.hdeleted file mode 100644index c1c1232..0000000--- a/native/NVIDIA-DLSS/include/nvsdk_ngx_defs.h+++ /dev/null@@ -1,859 +0,0 @@-/*- * SPDX-FileCopyrightText: Copyright (c) 2018-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.- * SPDX-License-Identifier: LicenseRef-NvidiaProprietary- *- * NVIDIA CORPORATION, its affiliates and licensors retain all intellectual- * property and proprietary rights in and to this material, related- * documentation and any modifications thereto. Any use, reproduction,- * disclosure or distribution of this material and related documentation- * without an express license agreement from NVIDIA CORPORATION or- * its affiliates is strictly prohibited.- */--#ifndef NVSDK_NGX_DEFS_H-#define NVSDK_NGX_DEFS_H-#pragma once--#ifndef __cplusplus-#include <stddef.h> // For size_t-#include <stdbool.h>-#include <wchar.h>-#endif--#ifdef __cplusplus-extern "C"-{-#endif--#ifdef __cplusplus-#if defined(NGX_CORE_BUILD) && defined(_WIN32)-#define NVSDK_NGX_API extern "C" __declspec(dllexport)-#else-#define NVSDK_NGX_API extern "C"-#endif-#else-#if defined(NGX_CORE_BUILD) && defined(_WIN32)-#define NVSDK_NGX_API __declspec(dllexport)-#else-#define NVSDK_NGX_API-#endif-#endif--#ifdef __GNUC__-#define NVSDK_CONV-#else-#define NVSDK_CONV __cdecl-#endif--#define NVSDK_NGX_ARRAY_LEN(a) (sizeof(a) / sizeof((a)[0]))--// Version Notes:-// Version 0x0000014:-// * Added a logging callback that the app may pass in on init-// * Added ability for the app to override the logging level-// Version 0x0000015:-// * Support multiple GPUs (bug 3270533)-#define NVSDK_NGX_VERSION_API_MACRO 0x0000015 // NGX_VERSION_DOT 1.5.0--#ifdef __cplusplus-#if __cplusplus >= 201402L-#define SR_DEPRECATED_SHARPENING [[deprecated("Sharpness is not supported")]]-#else-#define SR_DEPRECATED_SHARPENING-#endif-#else-#define SR_DEPRECATED_SHARPENING-#endif--typedef unsigned long long AppId;--typedef enum NVSDK_NGX_DLSS_Hint_Render_Preset-{- NVSDK_NGX_DLSS_Hint_Render_Preset_Default = 0, // default behavior, may or may not change after OTA- // NVSDK_NGX_DLSS_Hint_Render_Preset_A removed, use preset J or K- // NVSDK_NGX_DLSS_Hint_Render_Preset_B removed, use preset J or K- // NVSDK_NGX_DLSS_Hint_Render_Preset_C removed, use preset J or K- // NVSDK_NGX_DLSS_Hint_Render_Preset_D removed, use preset J or K- NVSDK_NGX_DLSS_Hint_Render_Preset_E = 5, // Deprecated- NVSDK_NGX_DLSS_Hint_Render_Preset_F = 6, // Deprecated- NVSDK_NGX_DLSS_Hint_Render_Preset_G = 7, // Do not use, reverts to default behavior- NVSDK_NGX_DLSS_Hint_Render_Preset_H_Reserved = 8, // Do not use, reverts to default behavior- NVSDK_NGX_DLSS_Hint_Render_Preset_I_Reserved = 9, // Do not use, reverts to default behavior- NVSDK_NGX_DLSS_Hint_Render_Preset_J = 10, // Similar to preset K. Preset J might exhibit slightly less ghosting at the cost of extra flickering. Preset K is generally recommended over preset J- NVSDK_NGX_DLSS_Hint_Render_Preset_K = 11, // Default preset for DLAA/Balanced/Quality modes that is transformer based. Best image quality preset at a higher performance cost- NVSDK_NGX_DLSS_Hint_Render_Preset_L = 12, // Default for Ultra Perf mode- NVSDK_NGX_DLSS_Hint_Render_Preset_M = 13, // Default for Perf mode- NVSDK_NGX_DLSS_Hint_Render_Preset_N = 14, // Do not use, reverts to default behavior- NVSDK_NGX_DLSS_Hint_Render_Preset_O = 15, // Do not use, reverts to default behavior-} NVSDK_NGX_DLSS_Hint_Render_Preset;--typedef struct NVSDK_NGX_Handle NVSDK_NGX_Handle;-typedef struct NVSDK_NGX_Parameter NVSDK_NGX_Parameter;-typedef struct NVSDK_NGX_FeatureCommonInfo_Internal NVSDK_NGX_FeatureCommonInfo_Internal;--typedef enum NVSDK_NGX_Version { NVSDK_NGX_Version_API = NVSDK_NGX_VERSION_API_MACRO } NVSDK_NGX_Version;--typedef enum NVSDK_NGX_Result-{- // The operation completed successfully.- NVSDK_NGX_Result_Success = 0x1,-- // Generic failure. Check the NGX logs for detailed information.- NVSDK_NGX_Result_Fail = 0xBAD00000,-- // The NGX SDK or a specific feature is not supported by the current system,- // hardware, and/or graphics API.- NVSDK_NGX_Result_FAIL_FeatureNotSupported = NVSDK_NGX_Result_Fail | 1,-- // An error occurred within the underlying platform, which includes the- // graphics API in use, the operating system, or other system libraries and- // dependencies that are not part of the NGX SDK, such as NvAPI. Consult the- // NGX logs and the graphics API's validation layers for detailed- // information.- NVSDK_NGX_Result_FAIL_PlatformError = NVSDK_NGX_Result_Fail | 2,-- // The NGX feature could not be created because a feature with identical- // parameters already exists, and the feature does not support multiple- // identical instances.- NVSDK_NGX_Result_FAIL_FeatureAlreadyExists = NVSDK_NGX_Result_Fail | 3,-- // A feature associated with the provided handle could not be found.- NVSDK_NGX_Result_FAIL_FeatureNotFound = NVSDK_NGX_Result_Fail | 4,-- // One or more provided parameters had an incorrect value or type, or a- // required parameter was not provided.- NVSDK_NGX_Result_FAIL_InvalidParameter = NVSDK_NGX_Result_Fail | 5,-- // The feature requires a scratch buffer, but none was provided or the- // provided buffer is too small. Use NVSDK_NGX_GetScratchBufferSize to- // determine the necessary size.- NVSDK_NGX_Result_FAIL_ScratchBufferTooSmall = NVSDK_NGX_Result_Fail | 6,-- // A function that requires the NGX SDK to be initialized was called before- // the SDK was properly initialized.- NVSDK_NGX_Result_FAIL_NotInitialized = NVSDK_NGX_Result_Fail | 7,-- // One or more input buffers supplied to the feature had an unsupported- // format.- NVSDK_NGX_Result_FAIL_UnsupportedInputFormat = NVSDK_NGX_Result_Fail | 8,-- // The feature requires read/write access to output buffers, but one or more- // provided buffers did not have the correct access flags (UAV in- // D3D11/D3D12).- NVSDK_NGX_Result_FAIL_RWFlagMissing = NVSDK_NGX_Result_Fail | 9,-- // A required input parameter was not provided.- NVSDK_NGX_Result_FAIL_MissingInput = NVSDK_NGX_Result_Fail | 10,-- // The requested feature could not be initialized, likely because the- // library for that feature could not be found.- NVSDK_NGX_Result_FAIL_UnableToInitializeFeature = NVSDK_NGX_Result_Fail | 11,-- // A function was used which requires a newer version of the NVIDIA Display- // Driver or feature library than is currently installed.- NVSDK_NGX_Result_FAIL_OutOfDate = NVSDK_NGX_Result_Fail | 12,-- // An operation could not be completed because the system lacked sufficient- // GPU memory.- NVSDK_NGX_Result_FAIL_OutOfGPUMemory = NVSDK_NGX_Result_Fail | 13,-- // One or more buffers provided to the feature had an unsupported format.- NVSDK_NGX_Result_FAIL_UnsupportedFormat = NVSDK_NGX_Result_Fail | 14,-- // The SDK does not have the necessary write permissions for the path- // specified in InApplicationDataPath.- NVSDK_NGX_Result_FAIL_UnableToWriteToAppDataPath = NVSDK_NGX_Result_Fail | 15,-- // A parameter supplied to the feature is either unsupported by the current- // version or has an unsupported value.- NVSDK_NGX_Result_FAIL_UnsupportedParameter = NVSDK_NGX_Result_Fail | 16,-- // NVIDIA has restricted the use of this feature in the current application.- // Contact NVIDIA for further information.- NVSDK_NGX_Result_FAIL_Denied = NVSDK_NGX_Result_Fail | 17,-- // The requested feature or functionality has not been implemented in the- // current version of the NGX SDK, display driver, or feature library.- NVSDK_NGX_Result_FAIL_NotImplemented = NVSDK_NGX_Result_Fail | 18,-} NVSDK_NGX_Result;--// Skip setting the debug overlay value if it is UNSET.-#define NVSDK_NGX_DLSS_DEBUG_OVERLAY_VALUE_UNSET -1--#define NVSDK_NGX_SUCCEED(value) (((value) & 0xFFF00000) != NVSDK_NGX_Result_Fail)-#define NVSDK_NGX_FAILED(value) (((value) & 0xFFF00000) == NVSDK_NGX_Result_Fail)--typedef enum NVSDK_NGX_Feature-{- NVSDK_NGX_Feature_Reserved0 = 0,-- NVSDK_NGX_Feature_SuperSampling = 1,-- NVSDK_NGX_Feature_InPainting = 2,-- NVSDK_NGX_Feature_ImageSuperResolution = 3,-- NVSDK_NGX_Feature_SlowMotion = 4,-- NVSDK_NGX_Feature_VideoSuperResolution = 5,-- NVSDK_NGX_Feature_Reserved1 = 6,-- NVSDK_NGX_Feature_Reserved2 = 7,-- NVSDK_NGX_Feature_Reserved3 = 8,-- NVSDK_NGX_Feature_ImageSignalProcessing = 9,-- NVSDK_NGX_Feature_DeepResolve = 10,-- NVSDK_NGX_Feature_FrameGeneration = 11,-- NVSDK_NGX_Feature_DeepDVC = 12,-- NVSDK_NGX_Feature_RayReconstruction = 13,-- NVSDK_NGX_Feature_Reserved14 = 14,-- NVSDK_NGX_Feature_Reserved15 = 15,-- NVSDK_NGX_Feature_Reserved16 = 16,-- NVSDK_NGX_Feature_Reserved17 = 17,-- NVSDK_NGX_Feature_Reserved18 = 18,-- // New features go here- NVSDK_NGX_Feature_Count,-- // These members are not strictly NGX features, but are- // components of the NGX system, and it may sometimes- // be useful to identify them using the same enum- NVSDK_NGX_Feature_Reserved_SDK = 32764,-- NVSDK_NGX_Feature_Reserved_Core = 32765,-- NVSDK_NGX_Feature_Reserved_Unknown = 32766-} NVSDK_NGX_Feature;--//TODO create grayscale format (R32F?)-typedef enum NVSDK_NGX_Buffer_Format-{- NVSDK_NGX_Buffer_Format_Unknown,- NVSDK_NGX_Buffer_Format_RGB8UI,- NVSDK_NGX_Buffer_Format_RGB16F,- NVSDK_NGX_Buffer_Format_RGB32F,- NVSDK_NGX_Buffer_Format_RGBA8UI,- NVSDK_NGX_Buffer_Format_RGBA16F,- NVSDK_NGX_Buffer_Format_RGBA32F,-} NVSDK_NGX_Buffer_Format;--typedef enum NVSDK_NGX_PerfQuality_Value-{- NVSDK_NGX_PerfQuality_Value_MaxPerf,- NVSDK_NGX_PerfQuality_Value_Balanced,- NVSDK_NGX_PerfQuality_Value_MaxQuality,- // Extended PerfQuality modes- NVSDK_NGX_PerfQuality_Value_UltraPerformance,- NVSDK_NGX_PerfQuality_Value_UltraQuality,- NVSDK_NGX_PerfQuality_Value_DLAA,-} NVSDK_NGX_PerfQuality_Value;--typedef enum NVSDK_NGX_RTX_Value-{- NVSDK_NGX_RTX_Value_Off,- NVSDK_NGX_RTX_Value_On,-} NVSDK_NGX_RTX_Value;--// For each unique instance, a pointer to NVSDK_NGX_CUDADevice is passed in to-// NVSDK_NGX_CUDA_Init1, NVSDK_NGX_CUDA_CreateFeature1 and NVSDK_NGX_CUDA_Shutdown1.-// This is needed in the case of running multiple threads in a single process.-// Depending on the app usage of CUDA, one or both of cudaContext and cudaStream can be set.-typedef struct NVSDK_NGX_CUDADevice-{- void* cudaContext; // CUcontext returned from cuCtxCreate- void* cudaStream; // CUstream returned from cuStreamCreate-} NVSDK_NGX_CUDADevice;--typedef enum NVSDK_NGX_DLSS_Mode-{- NVSDK_NGX_DLSS_Mode_Off, // use existing in-engine AA + upscale solution- NVSDK_NGX_DLSS_Mode_DLSS_DLISP,- NVSDK_NGX_DLSS_Mode_DLISP_Only, // use existing in-engine AA solution- NVSDK_NGX_DLSS_Mode_DLSS, // DLSS will apply AA and upsample at the same time-} NVSDK_NGX_DLSS_Mode;--typedef enum NVSDK_NGX_DLSS_Feature_Flags-{- NVSDK_NGX_DLSS_Feature_Flags_IsInvalid = 1 << 31,-- NVSDK_NGX_DLSS_Feature_Flags_None = 0,- NVSDK_NGX_DLSS_Feature_Flags_IsHDR = 1 << 0,- NVSDK_NGX_DLSS_Feature_Flags_MVLowRes = 1 << 1,- NVSDK_NGX_DLSS_Feature_Flags_MVJittered = 1 << 2,- NVSDK_NGX_DLSS_Feature_Flags_DepthInverted = 1 << 3,- NVSDK_NGX_DLSS_Feature_Flags_Reserved_0 = 1 << 4,- NVSDK_NGX_DLSS_Feature_Flags_DoSharpening SR_DEPRECATED_SHARPENING = 1 << 5, // Sharpness is not supported- NVSDK_NGX_DLSS_Feature_Flags_AutoExposure = 1 << 6,- NVSDK_NGX_DLSS_Feature_Flags_AlphaUpscaling = 1 << 7,- NVSDK_NGX_DLSS_Feature_Flags_Reserved_8 = 1 << 8,-} NVSDK_NGX_DLSS_Feature_Flags;--typedef enum NVSDK_NGX_ToneMapperType-{- NVSDK_NGX_TONEMAPPER_STRING = 0,- NVSDK_NGX_TONEMAPPER_REINHARD,- NVSDK_NGX_TONEMAPPER_ONEOVERLUMA,- NVSDK_NGX_TONEMAPPER_ACES,- NVSDK_NGX_TONEMAPPERTYPE_NUM-} NVSDK_NGX_ToneMapperType;--typedef enum NVSDK_NGX_GBufferType-{- NVSDK_NGX_GBUFFER_ALBEDO = 0,- NVSDK_NGX_GBUFFER_ROUGHNESS,- NVSDK_NGX_GBUFFER_METALLIC,- NVSDK_NGX_GBUFFER_SPECULAR,- NVSDK_NGX_GBUFFER_SUBSURFACE,- NVSDK_NGX_GBUFFER_NORMALS,- NVSDK_NGX_GBUFFER_SHADINGMODELID, /* unique identifier for drawn object or how the object is drawn */- NVSDK_NGX_GBUFFER_MATERIALID, /* unique identifier for material */- NVSDK_NGX_GBUFFER_SPECULAR_ALBEDO,- NVSDK_NGX_GBUFFER_INDIRECT_ALBEDO,- NVSDK_NGX_GBUFFER_SPECULAR_MVEC,- NVSDK_NGX_GBUFFER_DISOCCL_MASK, /* deprecated: use NVSDK_NGX_GBUFFER_RESPONSIVITY_MASK*/- NVSDK_NGX_GBUFFER_EMISSIVE,- NVSDK_NGX_GBUFFER_RESPONSIVITY_MASK,- NVSDK_NGX_GBUFFERTYPE_NUM = 17-} NVSDK_NGX_GBufferType;--typedef struct NVSDK_NGX_Coordinates-{- unsigned int X;- unsigned int Y;-} NVSDK_NGX_Coordinates;--typedef struct NVSDK_NGX_Dimensions-{- unsigned int Width;- unsigned int Height;-} NVSDK_NGX_Dimensions;--typedef struct NVSDK_NGX_PrecisionInfo-{- // 1 if and only if the associated resource buffer is considered low-precision- unsigned int IsLowPrecision;-- // Bias and Scale values, such that `hi = lo * Scale + Bias`- float Bias;- float Scale;-} NVSDK_NGX_PrecisionInfo;--typedef struct NVSDK_NGX_PathListInfo-{- // Pointer to a const string- wchar_t const* const* Path;- // Path-list length- unsigned int Length;-} NVSDK_NGX_PathListInfo;--typedef enum NVSDK_NGX_Logging_Level-{- NVSDK_NGX_LOGGING_LEVEL_OFF = 0,- NVSDK_NGX_LOGGING_LEVEL_ON,- NVSDK_NGX_LOGGING_LEVEL_VERBOSE,- NVSDK_NGX_LOGGING_LEVEL_NUM-} NVSDK_NGX_Logging_Level;--// A logging callback provided by the app to allow piping log lines back to the app.-// Please take careful note of the signature and calling convention.-// The callback must be able to be called from any thread.-// It must also be fully thread-safe and any number of threads may call into it concurrently.-// It must fully process message by the time it returns, and there is no guarantee that-// message will still be valid or allocated after it returns.-// message will be a null-terminated string and may contain multibyte characters.-#if defined(__GNUC__) || defined(__clang__)-typedef void NVSDK_CONV(*NVSDK_NGX_AppLogCallback)(const char* message, NVSDK_NGX_Logging_Level loggingLevel, NVSDK_NGX_Feature sourceComponent);-#else-typedef void(NVSDK_CONV* NVSDK_NGX_AppLogCallback)(const char* message, NVSDK_NGX_Logging_Level loggingLevel, NVSDK_NGX_Feature sourceComponent);-#endif--typedef struct NVSDK_NGX_LoggingInfo-{- // Fields below were introduced in SDK version 0x0000014-- // App-provided logging callback- NVSDK_NGX_AppLogCallback LoggingCallback;-- // The minimum logging level to use. If this is higher- // than the logging level otherwise configured, this will override- // that logging level. Otherwise, that logging level will be used.- NVSDK_NGX_Logging_Level MinimumLoggingLevel;-- // Whether or not to disable writing log lines to sinks other than the app log callback. This- // may be useful if the app provides a logging callback. LoggingCallback must be non-null and point- // to a valid logging callback if this is set to true.- bool DisableOtherLoggingSinks;--} NVSDK_NGX_LoggingInfo;--typedef struct NVSDK_NGX_FeatureCommonInfo-{- // List of all paths in descending order of search sequence to locate a feature dll in, other than the default path - application folder.- NVSDK_NGX_PathListInfo PathListInfo;- // Used internally by NGX- NVSDK_NGX_FeatureCommonInfo_Internal* InternalData; // Introduced in SDK version 0x0000013-- // Fields below were introduced in SDK version 0x0000014- NVSDK_NGX_LoggingInfo LoggingInfo;-} NVSDK_NGX_FeatureCommonInfo;--typedef enum NVSDK_NGX_Opt_Level-{- NVSDK_NGX_OPT_LEVEL_UNDEFINED = 0,- NVSDK_NGX_OPT_LEVEL_DEBUG = 20,- NVSDK_NGX_OPT_LEVEL_DEVELOP = 30,- NVSDK_NGX_OPT_LEVEL_RELEASE = 40-} NVSDK_NGX_Opt_Level;--typedef enum NVSDK_NGX_EngineType-{- NVSDK_NGX_ENGINE_TYPE_CUSTOM = 0,- NVSDK_NGX_ENGINE_TYPE_UNREAL,- NVSDK_NGX_ENGINE_TYPE_UNITY,- NVSDK_NGX_ENGINE_TYPE_OMNIVERSE,- NVSDK_NGX_ENGINE_COUNT-} NVSDK_NGX_EngineType;--typedef enum NVSDK_NGX_GraphicsAPI-{- NVSDK_NGX_GRAPHICS_API_CUDA = 0,- NVSDK_NGX_GRAPHICS_API_D3D11 = 1,- NVSDK_NGX_GRAPHICS_API_D3D12 = 2,- NVSDK_NGX_GRAPHICS_API_VULKAN = 3,- NVSDK_NGX_GRAPHICS_API_COUNT-} NVSDK_NGX_GraphicsAPI;--typedef enum NVSDK_NGX_Feature_Support_Result-{- NVSDK_NGX_FeatureSupportResult_Supported = 0,- NVSDK_NGX_FeatureSupportResult_CheckNotPresent = 1,- NVSDK_NGX_FeatureSupportResult_DriverVersionUnsupported = 2,- NVSDK_NGX_FeatureSupportResult_AdapterUnsupported = 4,- NVSDK_NGX_FeatureSupportResult_OSVersionBelowMinimumSupported = 8,- NVSDK_NGX_FeatureSupportResult_NotImplemented = 16-} NVSDK_NGX_Feature_Support_Result;--typedef enum NVSDK_NGX_Application_Identifier_Type-{- NVSDK_NGX_Application_Identifier_Type_Application_Id = 0,- NVSDK_NGX_Application_Identifier_Type_Project_Id = 1,-} NVSDK_NGX_Application_Identifier_Type;--/////////////////////////////////////////////////////////////////////////////////////////////////////////////-// NVSDK_NGX_ProjectIdDescription-// --------------------------------------// Contains information to identify an application built using a common rendering engine (list of supported rendering engines is defined in NVSDK_NGX_EngineType).-// Should only be used by plugins for the supported rendering engines, unless using NVSDK_NGX_ENGINE_TYPE_CUSTOM as the engine type.-//-// ProjectId-// Unique Id provided by the rendering engine used-//-// EngineType-// Rendering engine used by the application / plugin.-// Use NVSDK_NGX_ENGINE_TYPE_CUSTOM if the specific engine type is not supported explicitly-//-// EngineVersion-// Version number of the rendering engine used by the application / plugin.-//-// DESCRIPTION:-// Contains information to identify an application built using a common rendering engine (list of supported rendering engines is defined in NVSDK_NGX_EngineType).-// Should only be used by plugins for the supported rendering engines, unless using NVSDK_NGX_ENGINE_TYPE_CUSTOM as the engine type.-//-typedef struct NVSDK_NGX_ProjectIdDescription-{- const char* ProjectId;- NVSDK_NGX_EngineType EngineType;- const char* EngineVersion;-} NVSDK_NGX_ProjectIdDescription;--/////////////////////////////////////////////////////////////////////////////////////////////////////////////-// NVSDK_NGX_Application_Identifier-// --------------------------------------// Identifier for each application. Required for over the air updates (both optional and mandatory)-// as well as for app-specific customizations for features like DLSS-SR-//-// IdentifierType:-// Whether using a NVSDK_NGX_ProjectIdDescription or an Unique Application Identifier-//-// ProjectDesc:-// If using NVSDK_NGX_ProjectIdDescription, this contains the project ID and engine info required to identify this app-//-// ApplicationIdentifier:-// If not using NVSDK_NGX_ProjectIdDescription, this contains an ID provided by NVIDIA for this app-// If your NVIDIA contact did not provide you an ID for this purpose, use ProjectDesc with NVSDK_NGX_ENGINE_TYPE_CUSTOM as the engine type-//-typedef struct NVSDK_NGX_Application_Identifier-{- NVSDK_NGX_Application_Identifier_Type IdentifierType;- union v {- NVSDK_NGX_ProjectIdDescription ProjectDesc;- unsigned long long ApplicationId;- } v;-} NVSDK_NGX_Application_Identifier;--/////////////////////////////////////////////////////////////////////////////////////////////////////////////-// NVSDK_NGX_FeatureDiscoveryInfo-// --------------------------------------// Contains information common to all features, used by NGX in determining requested Feature availability-//-// InSDKVersion:-// API Struct version number-//-// FeatureID-// Valid NVSDK_NGX_Feature enum corresponding to DLSS v3 Feature which is being queried for availability-//-// ApplicationId-// Unique Id provided by NVIDIA corresponding to a particular Application or alternatively custom Id set by Engine-//-// InApplicationDataPath:-// Folder to store logs and other temporary files (write access required),-// Normally this would be a location in Documents or ProgramData.-//-// FeatureInfo:-// Contains information common to all features, presently only a list of all paths-// feature dlls can be located in, other than the default path - application directory.-//-typedef struct NVSDK_NGX_FeatureDiscoveryInfo-{- NVSDK_NGX_Version SDKVersion;- NVSDK_NGX_Feature FeatureID;- NVSDK_NGX_Application_Identifier Identifier;- const wchar_t* ApplicationDataPath;- const NVSDK_NGX_FeatureCommonInfo* FeatureInfo;-} NVSDK_NGX_FeatureDiscoveryInfo;--typedef struct NVSDK_NGX_FeatureRequirement-{- // Bitfield of bit shifted values specified in NVSDK_NGX_Feature_Support_Result. 0 if Feature is Supported.- NVSDK_NGX_Feature_Support_Result FeatureSupported;-- // Returned HW Architecture value corresponding to NV_GPU_ARCHITECTURE_ID values defined in NvAPI GPU Framework.- unsigned int MinHWArchitecture;-- // Value corresponding to minimum OS version required for NGX Feature Support- char MinOSVersion[255];-} NVSDK_NGX_FeatureRequirement;--// Callback function types-typedef NVSDK_NGX_Result(NVSDK_CONV *PFN_NVSDK_NGX_DLSS_GetStatsCallback)(NVSDK_NGX_Parameter *InParams);-typedef NVSDK_NGX_Result(NVSDK_CONV *PFN_NVSDK_NGX_DLSS_GetOptimalSettingsCallback)(NVSDK_NGX_Parameter *InParams);--typedef struct IUnknown IUnknown;-typedef struct D3D11_TEXTURE2D_DESC D3D11_TEXTURE2D_DESC;-typedef struct D3D11_BUFFER_DESC D3D11_BUFFER_DESC;-typedef struct ID3D11Buffer ID3D11Buffer;-typedef struct ID3D11Texture2D ID3D11Texture2D;-typedef struct ID3D12Resource ID3D12Resource;-typedef struct D3D12_RESOURCE_DESC D3D12_RESOURCE_DESC;-typedef struct CD3DX12_HEAP_PROPERTIES CD3DX12_HEAP_PROPERTIES;--typedef void (NVSDK_CONV *PFN_NVSDK_NGX_D3D12_ResourceAllocCallback)(D3D12_RESOURCE_DESC *InDesc, int InState, CD3DX12_HEAP_PROPERTIES *InHeap, ID3D12Resource **OutResource);-typedef void (NVSDK_CONV *PFN_NVSDK_NGX_D3D11_BufferAllocCallback)(D3D11_BUFFER_DESC *InDesc, ID3D11Buffer **OutResource);-typedef void (NVSDK_CONV *PFN_NVSDK_NGX_D3D11_Tex2DAllocCallback)(D3D11_TEXTURE2D_DESC *InDesc, ID3D11Texture2D **OutResource);-typedef void (NVSDK_CONV *PFN_NVSDK_NGX_ResourceReleaseCallback)(IUnknown *InResource);--#ifdef __cplusplus-typedef void (NVSDK_CONV *PFN_NVSDK_NGX_ProgressCallback)(float InCurrentProgress, bool &OutShouldCancel);-#endif-typedef void (NVSDK_CONV *PFN_NVSDK_NGX_ProgressCallback_C)(float InCurrentProgress, bool *OutShouldCancel);--// Read-only parameters provided by NGX-#define NVSDK_NGX_EParameter_Reserved00 "#\x00"-#define NVSDK_NGX_EParameter_SuperSampling_Available "#\x01"-#define NVSDK_NGX_EParameter_InPainting_Available "#\x02"-#define NVSDK_NGX_EParameter_ImageSuperResolution_Available "#\x03"-#define NVSDK_NGX_EParameter_SlowMotion_Available "#\x04"-#define NVSDK_NGX_EParameter_VideoSuperResolution_Available "#\x05"-#define NVSDK_NGX_EParameter_Reserved06 "#\x06"-#define NVSDK_NGX_EParameter_Reserved07 "#\x07"-#define NVSDK_NGX_EParameter_Reserved08 "#\x08"-#define NVSDK_NGX_EParameter_ImageSignalProcessing_Available "#\x09"-#define NVSDK_NGX_EParameter_ImageSuperResolution_ScaleFactor_2_1 "#\x0a"-#define NVSDK_NGX_EParameter_ImageSuperResolution_ScaleFactor_3_1 "#\x0b"-#define NVSDK_NGX_EParameter_ImageSuperResolution_ScaleFactor_3_2 "#\x0c"-#define NVSDK_NGX_EParameter_ImageSuperResolution_ScaleFactor_4_3 "#\x0d"-#define NVSDK_NGX_EParameter_NumFrames "#\x0e"-#define NVSDK_NGX_EParameter_Scale "#\x0f"-#define NVSDK_NGX_EParameter_Width "#\x10"-#define NVSDK_NGX_EParameter_Height "#\x11"-#define NVSDK_NGX_EParameter_OutWidth "#\x12"-#define NVSDK_NGX_EParameter_OutHeight "#\x13"-#define NVSDK_NGX_EParameter_Sharpness "#\x14"-#define NVSDK_NGX_EParameter_Scratch "#\x15"-#define NVSDK_NGX_EParameter_Scratch_SizeInBytes "#\x16"-#define NVSDK_NGX_EParameter_EvaluationNode "#\x17" // valid since API 0x13 (replaced a deprecated param)-#define NVSDK_NGX_EParameter_Input1 "#\x18"-#define NVSDK_NGX_EParameter_Input1_Format "#\x19"-#define NVSDK_NGX_EParameter_Input1_SizeInBytes "#\x1a"-#define NVSDK_NGX_EParameter_Input2 "#\x1b"-#define NVSDK_NGX_EParameter_Input2_Format "#\x1c"-#define NVSDK_NGX_EParameter_Input2_SizeInBytes "#\x1d"-#define NVSDK_NGX_EParameter_Color "#\x1e"-#define NVSDK_NGX_EParameter_Color_Format "#\x1f"-#define NVSDK_NGX_EParameter_Color_SizeInBytes "#\x20"-#define NVSDK_NGX_EParameter_Albedo "#\x21"-#define NVSDK_NGX_EParameter_Output "#\x22"-#define NVSDK_NGX_EParameter_Output_Format "#\x23"-#define NVSDK_NGX_EParameter_Output_SizeInBytes "#\x24"-#define NVSDK_NGX_EParameter_Reset "#\x25"-#define NVSDK_NGX_EParameter_BlendFactor "#\x26"-#define NVSDK_NGX_EParameter_MotionVectors "#\x27"-#define NVSDK_NGX_EParameter_Rect_X "#\x28"-#define NVSDK_NGX_EParameter_Rect_Y "#\x29"-#define NVSDK_NGX_EParameter_Rect_W "#\x2a"-#define NVSDK_NGX_EParameter_Rect_H "#\x2b"-#define NVSDK_NGX_EParameter_MV_Scale_X "#\x2c"-#define NVSDK_NGX_EParameter_MV_Scale_Y "#\x2d"-#define NVSDK_NGX_EParameter_Model "#\x2e"-#define NVSDK_NGX_EParameter_Format "#\x2f"-#define NVSDK_NGX_EParameter_SizeInBytes "#\x30"-#define NVSDK_NGX_EParameter_ResourceAllocCallback "#\x31"-#define NVSDK_NGX_EParameter_BufferAllocCallback "#\x32"-#define NVSDK_NGX_EParameter_Tex2DAllocCallback "#\x33"-#define NVSDK_NGX_EParameter_ResourceReleaseCallback "#\x34"-#define NVSDK_NGX_EParameter_CreationNodeMask "#\x35"-#define NVSDK_NGX_EParameter_VisibilityNodeMask "#\x36"-#define NVSDK_NGX_EParameter_PreviousOutput "#\x37"-#define NVSDK_NGX_EParameter_MV_Offset_X "#\x38"-#define NVSDK_NGX_EParameter_MV_Offset_Y "#\x39"-#define NVSDK_NGX_EParameter_Hint_UseFireflySwatter "#\x3a"-#define NVSDK_NGX_EParameter_Resource_Width "#\x3b"-#define NVSDK_NGX_EParameter_Resource_Height "#\x3c"-#define NVSDK_NGX_EParameter_Depth "#\x3d"-#define NVSDK_NGX_EParameter_DLSSOptimalSettingsCallback "#\x3e"-#define NVSDK_NGX_EParameter_PerfQualityValue "#\x3f"-#define NVSDK_NGX_EParameter_RTXValue "#\x40"-#define NVSDK_NGX_EParameter_DLSSMode "#\x41"-#define NVSDK_NGX_EParameter_DeepResolve_Available "#\x42"-#define NVSDK_NGX_EParameter_Deprecated_43 "#\x43"-#define NVSDK_NGX_EParameter_OptLevel "#\x44"-#define NVSDK_NGX_EParameter_IsDevSnippetBranch "#\x45"-#define NVSDK_NGX_EParameter_DeepDVC_Available "#\x46"-#define NVSDK_NGX_EParameter_Graphics_API "#\x47"-#define NVSDK_NGX_EParameter_Reserved_48 "#\x48"-#define NVSDK_NGX_EParameter_Reserved_49 "#\x49"--#define NVSDK_NGX_Parameter_OptLevel "Snippet.OptLevel"-#define NVSDK_NGX_Parameter_IsDevSnippetBranch "Snippet.IsDevBranch"-#define NVSDK_NGX_Parameter_SuperSampling_ScaleFactor "SuperSampling.ScaleFactor"-#define NVSDK_NGX_Parameter_ImageSignalProcessing_ScaleFactor "ImageSignalProcessing.ScaleFactor"-#define NVSDK_NGX_Parameter_SuperSampling_Available "SuperSampling.Available"-#define NVSDK_NGX_Parameter_InPainting_Available "InPainting.Available"-#define NVSDK_NGX_Parameter_ImageSuperResolution_Available "ImageSuperResolution.Available"-#define NVSDK_NGX_Parameter_SlowMotion_Available "SlowMotion.Available"-#define NVSDK_NGX_Parameter_VideoSuperResolution_Available "VideoSuperResolution.Available"-#define NVSDK_NGX_Parameter_ImageSignalProcessing_Available "ImageSignalProcessing.Available"-#define NVSDK_NGX_Parameter_DeepResolve_Available "DeepResolve.Available"-#define NVSDK_NGX_Parameter_SuperSampling_NeedsUpdatedDriver "SuperSampling.NeedsUpdatedDriver"-#define NVSDK_NGX_Parameter_InPainting_NeedsUpdatedDriver "InPainting.NeedsUpdatedDriver"-#define NVSDK_NGX_Parameter_ImageSuperResolution_NeedsUpdatedDriver "ImageSuperResolution.NeedsUpdatedDriver"-#define NVSDK_NGX_Parameter_SlowMotion_NeedsUpdatedDriver "SlowMotion.NeedsUpdatedDriver"-#define NVSDK_NGX_Parameter_VideoSuperResolution_NeedsUpdatedDriver "VideoSuperResolution.NeedsUpdatedDriver"-#define NVSDK_NGX_Parameter_ImageSignalProcessing_NeedsUpdatedDriver "ImageSignalProcessing.NeedsUpdatedDriver"-#define NVSDK_NGX_Parameter_DeepResolve_NeedsUpdatedDriver "DeepResolve.NeedsUpdatedDriver"-#define NVSDK_NGX_Parameter_FrameInterpolation_NeedsUpdatedDriver "FrameInterpolation.NeedsUpdatedDriver"-#define NVSDK_NGX_Parameter_SuperSampling_MinDriverVersionMajor "SuperSampling.MinDriverVersionMajor"-#define NVSDK_NGX_Parameter_InPainting_MinDriverVersionMajor "InPainting.MinDriverVersionMajor"-#define NVSDK_NGX_Parameter_ImageSuperResolution_MinDriverVersionMajor "ImageSuperResolution.MinDriverVersionMajor"-#define NVSDK_NGX_Parameter_SlowMotion_MinDriverVersionMajor "SlowMotion.MinDriverVersionMajor"-#define NVSDK_NGX_Parameter_VideoSuperResolution_MinDriverVersionMajor "VideoSuperResolution.MinDriverVersionMajor"-#define NVSDK_NGX_Parameter_ImageSignalProcessing_MinDriverVersionMajor "ImageSignalProcessing.MinDriverVersionMajor"-#define NVSDK_NGX_Parameter_DeepResolve_MinDriverVersionMajor "DeepResolve.MinDriverVersionMajor"-#define NVSDK_NGX_Parameter_FrameInterpolation_MinDriverVersionMajor "FrameInterpolation.MinDriverVersionMajor"-#define NVSDK_NGX_Parameter_SuperSampling_MinDriverVersionMinor "SuperSampling.MinDriverVersionMinor"-#define NVSDK_NGX_Parameter_InPainting_MinDriverVersionMinor "InPainting.MinDriverVersionMinor"-#define NVSDK_NGX_Parameter_ImageSuperResolution_MinDriverVersionMinor "ImageSuperResolution.MinDriverVersionMinor"-#define NVSDK_NGX_Parameter_SlowMotion_MinDriverVersionMinor "SlowMotion.MinDriverVersionMinor"-#define NVSDK_NGX_Parameter_VideoSuperResolution_MinDriverVersionMinor "VideoSuperResolution.MinDriverVersionMinor"-#define NVSDK_NGX_Parameter_ImageSignalProcessing_MinDriverVersionMinor "ImageSignalProcessing.MinDriverVersionMinor"-#define NVSDK_NGX_Parameter_DeepResolve_MinDriverVersionMinor "DeepResolve.MinDriverVersionMinor"-#define NVSDK_NGX_Parameter_SuperSampling_FeatureInitResult "SuperSampling.FeatureInitResult"-#define NVSDK_NGX_Parameter_InPainting_FeatureInitResult "InPainting.FeatureInitResult"-#define NVSDK_NGX_Parameter_ImageSuperResolution_FeatureInitResult "ImageSuperResolution.FeatureInitResult"-#define NVSDK_NGX_Parameter_SlowMotion_FeatureInitResult "SlowMotion.FeatureInitResult"-#define NVSDK_NGX_Parameter_VideoSuperResolution_FeatureInitResult "VideoSuperResolution.FeatureInitResult"-#define NVSDK_NGX_Parameter_ImageSignalProcessing_FeatureInitResult "ImageSignalProcessing.FeatureInitResult"-#define NVSDK_NGX_Parameter_DeepResolve_FeatureInitResult "DeepResolve.FeatureInitResult"-#define NVSDK_NGX_Parameter_FrameInterpolation_FeatureInitResult "FrameInterpolation.FeatureInitResult"-#define NVSDK_NGX_Parameter_ImageSuperResolution_ScaleFactor_2_1 "ImageSuperResolution.ScaleFactor.2.1"-#define NVSDK_NGX_Parameter_ImageSuperResolution_ScaleFactor_3_1 "ImageSuperResolution.ScaleFactor.3.1"-#define NVSDK_NGX_Parameter_ImageSuperResolution_ScaleFactor_3_2 "ImageSuperResolution.ScaleFactor.3.2"-#define NVSDK_NGX_Parameter_ImageSuperResolution_ScaleFactor_4_3 "ImageSuperResolution.ScaleFactor.4.3"-#define NVSDK_NGX_Parameter_NumFrames "NumFrames"-#define NVSDK_NGX_Parameter_Scale "Scale"-#define NVSDK_NGX_Parameter_Width "Width"-#define NVSDK_NGX_Parameter_Height "Height"-#define NVSDK_NGX_Parameter_OutWidth "OutWidth"-#define NVSDK_NGX_Parameter_OutHeight "OutHeight"-#define NVSDK_NGX_Parameter_Sharpness "Sharpness"-#define NVSDK_NGX_Parameter_Scratch "Scratch"-#define NVSDK_NGX_Parameter_Scratch_SizeInBytes "Scratch.SizeInBytes"-#define NVSDK_NGX_Parameter_Input1 "Input1"-#define NVSDK_NGX_Parameter_Input1_Format "Input1.Format"-#define NVSDK_NGX_Parameter_Input1_SizeInBytes "Input1.SizeInBytes"-#define NVSDK_NGX_Parameter_Input2 "Input2"-#define NVSDK_NGX_Parameter_Input2_Format "Input2.Format"-#define NVSDK_NGX_Parameter_Input2_SizeInBytes "Input2.SizeInBytes"-#define NVSDK_NGX_Parameter_Color "Color"-#define NVSDK_NGX_Parameter_Color_Format "Color.Format"-#define NVSDK_NGX_Parameter_Color_SizeInBytes "Color.SizeInBytes"-#define NVSDK_NGX_Parameter_FI_Color1 "Color1"-#define NVSDK_NGX_Parameter_FI_Color2 "Color2"-#define NVSDK_NGX_Parameter_Albedo "Albedo"-#define NVSDK_NGX_Parameter_Output "Output"-#define NVSDK_NGX_Parameter_Output_Format "Output.Format"-#define NVSDK_NGX_Parameter_Output_SizeInBytes "Output.SizeInBytes"-#define NVSDK_NGX_Parameter_FI_Output1 "Output1"-#define NVSDK_NGX_Parameter_FI_Output2 "Output2"-#define NVSDK_NGX_Parameter_FI_Output3 "Output3"-#define NVSDK_NGX_Parameter_Reset "Reset"-#define NVSDK_NGX_Parameter_BlendFactor "BlendFactor"-#define NVSDK_NGX_Parameter_MotionVectors "MotionVectors"-#define NVSDK_NGX_Parameter_FI_MotionVectors1 "MotionVectors1"-#define NVSDK_NGX_Parameter_FI_MotionVectors2 "MotionVectors2"-#define NVSDK_NGX_Parameter_Rect_X "Rect.X"-#define NVSDK_NGX_Parameter_Rect_Y "Rect.Y"-#define NVSDK_NGX_Parameter_Rect_W "Rect.W"-#define NVSDK_NGX_Parameter_Rect_H "Rect.H"-#define NVSDK_NGX_Parameter_OutRect_X "OutRect.X"-#define NVSDK_NGX_Parameter_OutRect_Y "OutRect.Y"-#define NVSDK_NGX_Parameter_OutRect_W "OutRect.W"-#define NVSDK_NGX_Parameter_OutRect_H "OutRect.H"-#define NVSDK_NGX_Parameter_MV_Scale_X "MV.Scale.X"-#define NVSDK_NGX_Parameter_MV_Scale_Y "MV.Scale.Y"-#define NVSDK_NGX_Parameter_Model "Model"-#define NVSDK_NGX_Parameter_Format "Format"-#define NVSDK_NGX_Parameter_SizeInBytes "SizeInBytes"-#define NVSDK_NGX_Parameter_ResourceAllocCallback "ResourceAllocCallback"-#define NVSDK_NGX_Parameter_BufferAllocCallback "BufferAllocCallback"-#define NVSDK_NGX_Parameter_Tex2DAllocCallback "Tex2DAllocCallback"-#define NVSDK_NGX_Parameter_ResourceReleaseCallback "ResourceReleaseCallback"-#define NVSDK_NGX_Parameter_CreationNodeMask "CreationNodeMask"-#define NVSDK_NGX_Parameter_VisibilityNodeMask "VisibilityNodeMask"-#define NVSDK_NGX_Parameter_MV_Offset_X "MV.Offset.X"-#define NVSDK_NGX_Parameter_MV_Offset_Y "MV.Offset.Y"-#define NVSDK_NGX_Parameter_Hint_UseFireflySwatter "Hint.UseFireflySwatter"-#define NVSDK_NGX_Parameter_Resource_Width "ResourceWidth"-#define NVSDK_NGX_Parameter_Resource_Height "ResourceHeight"-#define NVSDK_NGX_Parameter_Resource_OutWidth "ResourceOutWidth"-#define NVSDK_NGX_Parameter_Resource_OutHeight "ResourceOutHeight"-#define NVSDK_NGX_Parameter_Depth "Depth"-#define NVSDK_NGX_Parameter_FI_Depth1 "Depth1"-#define NVSDK_NGX_Parameter_FI_Depth2 "Depth2"-#define NVSDK_NGX_Parameter_DLSSOptimalSettingsCallback "DLSSOptimalSettingsCallback"-#define NVSDK_NGX_Parameter_DLSSGetStatsCallback "DLSSGetStatsCallback"-#define NVSDK_NGX_Parameter_PerfQualityValue "PerfQualityValue"-#define NVSDK_NGX_Parameter_RTXValue "RTXValue"-#define NVSDK_NGX_Parameter_DLSSMode "DLSSMode"-#define NVSDK_NGX_Parameter_FI_Mode "FIMode"-#define NVSDK_NGX_Parameter_FI_OF_Preset "FIOFPreset"-#define NVSDK_NGX_Parameter_FI_OF_GridSize "FIOFGridSize"-#define NVSDK_NGX_Parameter_Jitter_Offset_X "Jitter.Offset.X"-#define NVSDK_NGX_Parameter_Jitter_Offset_Y "Jitter.Offset.Y"-#define NVSDK_NGX_Parameter_Denoise "Denoise"-#define NVSDK_NGX_Parameter_TransparencyMask "TransparencyMask"-#define NVSDK_NGX_Parameter_ExposureTexture "ExposureTexture" // a 1x1 texture containing the final exposure scale-#define NVSDK_NGX_Parameter_DLSS_Feature_Create_Flags "DLSS.Feature.Create.Flags"-#define NVSDK_NGX_Parameter_DLSS_Checkerboard_Jitter_Hack "DLSS.Checkerboard.Jitter.Hack"-#define NVSDK_NGX_Parameter_GBuffer_Normals "GBuffer.Normals"-#define NVSDK_NGX_Parameter_GBuffer_Albedo "GBuffer.Albedo"-#define NVSDK_NGX_Parameter_GBuffer_Roughness "GBuffer.Roughness"-#define NVSDK_NGX_Parameter_GBuffer_DiffuseAlbedo "GBuffer.DiffuseAlbedo"-#define NVSDK_NGX_Parameter_GBuffer_SpecularAlbedo "GBuffer.SpecularAlbedo"-#define NVSDK_NGX_Parameter_GBuffer_IndirectAlbedo "GBuffer.IndirectAlbedo"-#define NVSDK_NGX_Parameter_GBuffer_SpecularMvec "GBuffer.SpecularMvec"-#define NVSDK_NGX_Parameter_GBuffer_DisocclusionMask "GBuffer.DisocclusionMask"-#define NVSDK_NGX_Parameter_GBuffer_Metallic "GBuffer.Metallic"-#define NVSDK_NGX_Parameter_GBuffer_Specular "GBuffer.Specular"-#define NVSDK_NGX_Parameter_GBuffer_Subsurface "GBuffer.Subsurface"-#define NVSDK_NGX_Parameter_GBuffer_ShadingModelId "GBuffer.ShadingModelId"-#define NVSDK_NGX_Parameter_GBuffer_MaterialId "GBuffer.MaterialId"-#define NVSDK_NGX_Parameter_GBuffer_Atrrib_8 "GBuffer.Attrib.8"-#define NVSDK_NGX_Parameter_GBuffer_Atrrib_9 "GBuffer.Attrib.9"-#define NVSDK_NGX_Parameter_GBuffer_Atrrib_10 "GBuffer.Attrib.10"-#define NVSDK_NGX_Parameter_GBuffer_Atrrib_11 "GBuffer.Attrib.11"-#define NVSDK_NGX_Parameter_GBuffer_Atrrib_12 "GBuffer.Attrib.12"-#define NVSDK_NGX_Parameter_GBuffer_Atrrib_13 "GBuffer.Attrib.13"-#define NVSDK_NGX_Parameter_GBuffer_Atrrib_14 "GBuffer.Attrib.14"-#define NVSDK_NGX_Parameter_GBuffer_Atrrib_15 "GBuffer.Attrib.15"-#define NVSDK_NGX_Parameter_TonemapperType "TonemapperType"-#define NVSDK_NGX_Parameter_FreeMemOnReleaseFeature "FreeMemOnReleaseFeature"-#define NVSDK_NGX_Parameter_MotionVectors3D "MotionVectors3D"-#define NVSDK_NGX_Parameter_IsParticleMask "IsParticleMask"-#define NVSDK_NGX_Parameter_AnimatedTextureMask "AnimatedTextureMask"-#define NVSDK_NGX_Parameter_DepthHighRes "DepthHighRes"-#define NVSDK_NGX_Parameter_Position_ViewSpace "Position.ViewSpace"-#define NVSDK_NGX_Parameter_FrameTimeDeltaInMsec "FrameTimeDeltaInMsec"-#define NVSDK_NGX_Parameter_RayTracingHitDistance "RayTracingHitDistance"-#define NVSDK_NGX_Parameter_MotionVectorsReflection "MotionVectorsReflection"-#define NVSDK_NGX_Parameter_DLSS_Enable_Output_Subrects "DLSS.Enable.Output.Subrects"-#define NVSDK_NGX_Parameter_DLSS_Input_Color_Subrect_Base_X "DLSS.Input.Color.Subrect.Base.X"-#define NVSDK_NGX_Parameter_DLSS_Input_Color_Subrect_Base_Y "DLSS.Input.Color.Subrect.Base.Y"-#define NVSDK_NGX_Parameter_DLSS_Input_Depth_Subrect_Base_X "DLSS.Input.Depth.Subrect.Base.X"-#define NVSDK_NGX_Parameter_DLSS_Input_Depth_Subrect_Base_Y "DLSS.Input.Depth.Subrect.Base.Y"-#define NVSDK_NGX_Parameter_DLSS_Input_MV_SubrectBase_X "DLSS.Input.MV.Subrect.Base.X"-#define NVSDK_NGX_Parameter_DLSS_Input_MV_SubrectBase_Y "DLSS.Input.MV.Subrect.Base.Y"-#define NVSDK_NGX_Parameter_DLSS_Input_Translucency_SubrectBase_X "DLSS.Input.Translucency.Subrect.Base.X"-#define NVSDK_NGX_Parameter_DLSS_Input_Translucency_SubrectBase_Y "DLSS.Input.Translucency.Subrect.Base.Y"-#define NVSDK_NGX_Parameter_DLSS_Output_Subrect_Base_X "DLSS.Output.Subrect.Base.X"-#define NVSDK_NGX_Parameter_DLSS_Output_Subrect_Base_Y "DLSS.Output.Subrect.Base.Y"-#define NVSDK_NGX_Parameter_DLSS_Render_Subrect_Dimensions_Width "DLSS.Render.Subrect.Dimensions.Width"-#define NVSDK_NGX_Parameter_DLSS_Render_Subrect_Dimensions_Height "DLSS.Render.Subrect.Dimensions.Height"-#define NVSDK_NGX_Parameter_DLSS_Pre_Exposure "DLSS.Pre.Exposure"-#define NVSDK_NGX_Parameter_DLSS_Exposure_Scale "DLSS.Exposure.Scale"-#define NVSDK_NGX_Parameter_DLSS_Input_Bias_Current_Color_Mask "DLSS.Input.Bias.Current.Color.Mask"-#define NVSDK_NGX_Parameter_DLSS_Input_Bias_Current_Color_SubrectBase_X "DLSS.Input.Bias.Current.Color.Subrect.Base.X"-#define NVSDK_NGX_Parameter_DLSS_Input_Bias_Current_Color_SubrectBase_Y "DLSS.Input.Bias.Current.Color.Subrect.Base.Y"-#define NVSDK_NGX_Parameter_DLSS_Indicator_Invert_Y_Axis "DLSS.Indicator.Invert.Y.Axis"-#define NVSDK_NGX_Parameter_DLSS_Indicator_Invert_X_Axis "DLSS.Indicator.Invert.X.Axis"-#define NVSDK_NGX_Parameter_DLSS_Overlay_Debug_Layer "DLSS.Overlay.Debug.Layer"-#define NVSDK_NGX_Parameter_DLSS_Overlay_Full_Screen "DLSS.Overlay.Full.Screen"-#define NVSDK_NGX_Parameter_DLSS_Overlay_Show_Nans "DLSS.Overlay.Show.Nans"-#define NVSDK_NGX_Parameter_DLSS_Overlay_Jitter_Debug "DLSS.Overlay.Jitter.Debug"-#define NVSDK_NGX_Parameter_DLSS_INV_VIEW_PROJECTION_MATRIX "InvViewProjectionMatrix"-#define NVSDK_NGX_Parameter_DLSS_CLIP_TO_PREV_CLIP_MATRIX "ClipToPrevClipMatrix"--#define NVSDK_NGX_Parameter_DLSS_TransparencyLayer "DLSS.TransparencyLayer"-#define NVSDK_NGX_Parameter_DLSS_TransparencyLayer_Subrect_Base_X "DLSS.TransparencyLayer.Subrect.Base.X"-#define NVSDK_NGX_Parameter_DLSS_TransparencyLayer_Subrect_Base_Y "DLSS.TransparencyLayer.Subrect.Base.Y"-#define NVSDK_NGX_Parameter_DLSS_TransparencyLayerOpacity "DLSS.TransparencyLayerOpacity"-#define NVSDK_NGX_Parameter_DLSS_TransparencyLayerOpacity_Subrect_Base_X "DLSS.TransparencyLayerOpacity.Subrect.Base.X"-#define NVSDK_NGX_Parameter_DLSS_TransparencyLayerOpacity_Subrect_Base_Y "DLSS.TransparencyLayerOpacity.Subrect.Base.Y"-#define NVSDK_NGX_Parameter_DLSS_TransparencyLayerMvecs "DLSS.TransparencyLayerMvecs"-#define NVSDK_NGX_Parameter_DLSS_TransparencyLayerMvecs_Subrect_Base_X "DLSS.TransparencyLayerMvecs.Subrect.Base.X"-#define NVSDK_NGX_Parameter_DLSS_TransparencyLayerMvecs_Subrect_Base_Y "DLSS.TransparencyLayerMvecs.Subrect.Base.Y"-#define NVSDK_NGX_Parameter_DLSS_DisocclusionMask "DLSS.DisocclusionMask"-#define NVSDK_NGX_Parameter_DLSS_DisocclusionMask_Subrect_Base_X "DLSS.DisocclusionMask.Subrect.Base.X"-#define NVSDK_NGX_Parameter_DLSS_DisocclusionMask_Subrect_Base_Y "DLSS.DisocclusionMask.Subrect.Base.Y"-#define NVSDK_NGX_Parameter_DLSS_ResponsivityMask "DLSS.ResponsivityMask"-#define NVSDK_NGX_Parameter_DLSS_ResponsivityMask_Subrect_Base_X "DLSS.ResponsivityMask.Subrect.Base.X"-#define NVSDK_NGX_Parameter_DLSS_ResponsivityMask_Subrect_Base_Y "DLSS.ResponsivityMask.Subrect.Base.Y"--#define NVSDK_NGX_Parameter_DLSS_Get_Dynamic_Max_Render_Width "DLSS.Get.Dynamic.Max.Render.Width"-#define NVSDK_NGX_Parameter_DLSS_Get_Dynamic_Max_Render_Height "DLSS.Get.Dynamic.Max.Render.Height"-#define NVSDK_NGX_Parameter_DLSS_Get_Dynamic_Min_Render_Width "DLSS.Get.Dynamic.Min.Render.Width"-#define NVSDK_NGX_Parameter_DLSS_Get_Dynamic_Min_Render_Height "DLSS.Get.Dynamic.Min.Render.Height"--#define NVSDK_NGX_Parameter_DLSS_Hint_Render_Preset_DLAA "DLSS.Hint.Render.Preset.DLAA"-#define NVSDK_NGX_Parameter_DLSS_Hint_Render_Preset_Quality "DLSS.Hint.Render.Preset.Quality"-#define NVSDK_NGX_Parameter_DLSS_Hint_Render_Preset_Balanced "DLSS.Hint.Render.Preset.Balanced"-#define NVSDK_NGX_Parameter_DLSS_Hint_Render_Preset_Performance "DLSS.Hint.Render.Preset.Performance"-#define NVSDK_NGX_Parameter_DLSS_Hint_Render_Preset_UltraPerformance "DLSS.Hint.Render.Preset.UltraPerformance"-#define NVSDK_NGX_Parameter_DLSS_Hint_Render_Preset_UltraQuality "DLSS.Hint.Render.Preset.UltraQuality"--#ifdef __cplusplus-} // extern "C"-#endif--#endifdiff --git a/native/NVIDIA-DLSS/include/nvsdk_ngx_defs_dlssd.h b/native/NVIDIA-DLSS/include/nvsdk_ngx_defs_dlssd.hdeleted file mode 100644index d057599..0000000--- a/native/NVIDIA-DLSS/include/nvsdk_ngx_defs_dlssd.h+++ /dev/null@@ -1,166 +0,0 @@-/*- * SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.- * SPDX-License-Identifier: LicenseRef-NvidiaProprietary- *- * NVIDIA CORPORATION, its affiliates and licensors retain all intellectual- * property and proprietary rights in and to this material, related- * documentation and any modifications thereto. Any use, reproduction,- * disclosure or distribution of this material and related documentation- * without an express license agreement from NVIDIA CORPORATION or- * its affiliates is strictly prohibited.- */--#ifndef NVSDK_NGX_DEFS_DLSSD_H-#define NVSDK_NGX_DEFS_DLSSD_H-#pragma once--typedef enum NVSDK_NGX_DLSS_Denoise_Mode-{- NVSDK_NGX_DLSS_Denoise_Mode_Off = 0,- NVSDK_NGX_DLSS_Denoise_Mode_DLUnified = 1, // DL based unified upscaler-} NVSDK_NGX_DLSS_Denoise_Mode;--typedef enum NVSDK_NGX_DLSS_Roughness_Mode-{- NVSDK_NGX_DLSS_Roughness_Mode_Unpacked = 0, // Read roughness separately- NVSDK_NGX_DLSS_Roughness_Mode_Packed = 1, // Read roughness from normals.w-} NVSDK_NGX_DLSS_Roughness_Mode;--typedef enum NVSDK_NGX_DLSS_Depth_Type-{- NVSDK_NGX_DLSS_Depth_Type_Linear = 0, // Linear Depth- NVSDK_NGX_DLSS_Depth_Type_HW = 1, // HW Depth-} NVSDK_NGX_DLSS_Depth_Type;---typedef enum NVSDK_NGX_RayReconstruction_Hint_Render_Preset-{- NVSDK_NGX_RayReconstruction_Hint_Render_Preset_Default = 0, // default behavior, may or may not change after OTA- // NVSDK_NGX_RayReconstruction_Hint_Render_Preset_A removed, use preset D or E- // NVSDK_NGX_RayReconstruction_Hint_Render_Preset_B removed, use preset D or E- // NVSDK_NGX_RayReconstruction_Hint_Render_Preset_C removed, use preset D or E- NVSDK_NGX_RayReconstruction_Hint_Render_Preset_D = 4, // Default model (transformer)- NVSDK_NGX_RayReconstruction_Hint_Render_Preset_E = 5, // Latest transformer model (must use if DoF guide is needed)- NVSDK_NGX_RayReconstruction_Hint_Render_Preset_F = 6, // Do not use. reverts to default behavior- NVSDK_NGX_RayReconstruction_Hint_Render_Preset_G = 7, // Do not use, reverts to default behavior- NVSDK_NGX_RayReconstruction_Hint_Render_Preset_H = 8, // Do not use, reverts to default behavior- NVSDK_NGX_RayReconstruction_Hint_Render_Preset_I = 9, // Do not use, reverts to default behavior- NVSDK_NGX_RayReconstruction_Hint_Render_Preset_J = 10, // Do not use, reverts to default behavior- NVSDK_NGX_RayReconstruction_Hint_Render_Preset_K = 11, // Do not use, reverts to default behavior- NVSDK_NGX_RayReconstruction_Hint_Render_Preset_L = 12, // Do not use, reverts to default behavior- NVSDK_NGX_RayReconstruction_Hint_Render_Preset_M = 13, // Do not use, reverts to default behavior- NVSDK_NGX_RayReconstruction_Hint_Render_Preset_N = 14, // Do not use, reverts to default behavior- NVSDK_NGX_RayReconstruction_Hint_Render_Preset_O = 15, // Do not use, reverts to default behavior-} NVSDK_NGX_RayReconstruction_Hint_Render_Preset;--#define NVSDK_NGX_Parameter_DLSS_Denoise_Mode "DLSS.Denoise.Mode"-#define NVSDK_NGX_Parameter_DLSS_Roughness_Mode "DLSS.Roughness.Mode"-#define NVSDK_NGX_Parameter_DiffuseAlbedo "DLSS.Input.DiffuseAlbedo"-#define NVSDK_NGX_Parameter_SpecularAlbedo "DLSS.Input.SpecularAlbedo"-#define NVSDK_NGX_Parameter_DLSS_Input_DiffuseAlbedo_Subrect_Base_X "DLSS.Input.DiffuseAlbedo.Subrect.Base.X"-#define NVSDK_NGX_Parameter_DLSS_Input_DiffuseAlbedo_Subrect_Base_Y "DLSS.Input.DiffuseAlbedo.Subrect.Base.Y"-#define NVSDK_NGX_Parameter_DLSS_Input_SpecularAlbedo_Subrect_Base_X "DLSS.Input.SpecularAlbedo.Subrect.Base.X"-#define NVSDK_NGX_Parameter_DLSS_Input_SpecularAlbedo_Subrect_Base_Y "DLSS.Input.SpecularAlbedo.Subrect.Base.Y"-#define NVSDK_NGX_Parameter_DLSS_Input_Normals_Subrect_Base_X "DLSS.Input.Normals.Subrect.Base.X"-#define NVSDK_NGX_Parameter_DLSS_Input_Normals_Subrect_Base_Y "DLSS.Input.Normals.Subrect.Base.Y"-#define NVSDK_NGX_Parameter_DLSS_Input_Roughness_Subrect_Base_X "DLSS.Input.Roughness.Subrect.Base.X"-#define NVSDK_NGX_Parameter_DLSS_Input_Roughness_Subrect_Base_Y "DLSS.Input.Roughness.Subrect.Base.Y"-#define NVSDK_NGX_Parameter_ViewToClipMatrix "ViewToClipMatrix"-#define NVSDK_NGX_Parameter_GBuffer_Emissive "GBuffer.Emissive"-#define NVSDK_NGX_Parameter_Use_Folded_Network "DLSS.Use.Folded.Network"-#define NVSDK_NGX_Parameter_Diffuse_Ray_Direction "Diffuse.Ray.Direction"-#define NVSDK_NGX_Parameter_DLSS_WORLD_TO_VIEW_MATRIX "WorldToViewMatrix"-#define NVSDK_NGX_Parameter_DLSS_VIEW_TO_CLIP_MATRIX "ViewToClipMatrix"-#define NVSDK_NGX_Parameter_Use_HW_Depth "DLSS.Use.HW.Depth"-#define NVSDK_NGX_Parameter_DLSSD_ReflectedAlbedo "DLSSD.ReflectedAlbedo"-#define NVSDK_NGX_Parameter_DLSSD_ColorBeforeParticles "DLSSD.ColorBeforeParticles"-#define NVSDK_NGX_Parameter_DLSSD_ColorAfterParticles "DLSSD.ColorAfterParticles"-#define NVSDK_NGX_Parameter_DLSSD_ColorBeforeTransparency "DLSSD.ColorBeforeTransparency"-#define NVSDK_NGX_Parameter_DLSSD_ColorAfterTransparency "DLSSD.ColorAfterTransparency"-#define NVSDK_NGX_Parameter_DLSSD_ColorBeforeFog "DLSSD.ColorBeforeFog"-#define NVSDK_NGX_Parameter_DLSSD_ColorAfterFog "DLSSD.ColorAfterFog"-#define NVSDK_NGX_Parameter_DLSSD_ScreenSpaceSubsurfaceScatteringGuide "DLSSD.ScreenSpaceSubsurfaceScatteringGuide"-#define NVSDK_NGX_Parameter_DLSSD_ColorBeforeScreenSpaceSubsurfaceScattering "DLSSD.ColorBeforeScreenSpaceSubsurfaceScattering"-#define NVSDK_NGX_Parameter_DLSSD_ColorAfterScreenSpaceSubsurfaceScattering "DLSSD.ColorAfterScreenSpaceSubsurfaceScattering"-#define NVSDK_NGX_Parameter_DLSSD_ScreenSpaceRefractionGuide "DLSSD.ScreenSpaceRefractionGuide"-#define NVSDK_NGX_Parameter_DLSSD_ColorBeforeScreenSpaceRefraction "DLSSD.ColorBeforeScreenSpaceRefraction"-#define NVSDK_NGX_Parameter_DLSSD_ColorAfterScreenSpaceRefraction "DLSSD.ColorAfterScreenSpaceRefraction"-#define NVSDK_NGX_Parameter_DLSSD_DepthOfFieldGuide "DLSSD.DepthOfFieldGuide"-#define NVSDK_NGX_Parameter_DLSSD_ColorBeforeDepthOfField "DLSSD.ColorBeforeDepthOfField"-#define NVSDK_NGX_Parameter_DLSSD_ColorAfterDepthOfField "DLSSD.ColorAfterDepthOfField"-#define NVSDK_NGX_Parameter_DLSSD_DiffuseHitDistance "DLSSD.DiffuseHitDistance"-#define NVSDK_NGX_Parameter_DLSSD_SpecularHitDistance "DLSSD.SpecularHitDistance"-#define NVSDK_NGX_Parameter_DLSSD_DiffuseRayDirection "DLSSD.DiffuseRayDirection"-#define NVSDK_NGX_Parameter_DLSSD_SpecularRayDirection "DLSSD.SpecularRayDirection"-#define NVSDK_NGX_Parameter_DLSSD_DiffuseRayDirectionHitDistance "DLSSD.DiffuseRayDirectionHitDistance"-#define NVSDK_NGX_Parameter_DLSSD_SpecularRayDirectionHitDistance "DLSSD.SpecularRayDirectionHitDistance"-#define NVSDK_NGX_Parameter_DLSSD_Alpha "DLSSD.Alpha"-#define NVSDK_NGX_Parameter_DLSSD_OutputAlpha "DLSSD.OutputAlpha"-#define NVSDK_NGX_Parameter_DLSSD_ResponsivityMask "DLSSD.ResponsivityMask"-#define NVSDK_NGX_Parameter_DLSSD_Alpha_Subrect_Base_X "DLSSD.Alpha.Subrect.Base.X"-#define NVSDK_NGX_Parameter_DLSSD_Alpha_Subrect_Base_Y "DLSSD.Alpha.Subrect.Base.Y"-#define NVSDK_NGX_Parameter_DLSSD_OutputAlpha_Subrect_Base_X "DLSSD.OutputAlpha.Subrect.Base.X"-#define NVSDK_NGX_Parameter_DLSSD_OutputAlpha_Subrect_Base_Y "DLSSD.OutputAlpha.Subrect.Base.Y"-#define NVSDK_NGX_Parameter_DLSSD_ReflectedAlbedo_Subrect_Base_X "DLSSD.ReflectedAlbedo.Subrect.Base.X"-#define NVSDK_NGX_Parameter_DLSSD_ReflectedAlbedo_Subrect_Base_Y "DLSSD.ReflectedAlbedo.Subrect.Base.Y"-#define NVSDK_NGX_Parameter_DLSSD_ColorBeforeParticles_Subrect_Base_X "DLSSD.ColorBeforeParticles.Subrect.Base.X"-#define NVSDK_NGX_Parameter_DLSSD_ColorBeforeParticles_Subrect_Base_Y "DLSSD.ColorBeforeParticles.Subrect.Base.Y"-#define NVSDK_NGX_Parameter_DLSSD_ColorAfterParticles_Subrect_Base_X "DLSSD.ColorAfterParticles.Subrect.Base.X"-#define NVSDK_NGX_Parameter_DLSSD_ColorAfterParticles_Subrect_Base_Y "DLSSD.ColorAfterParticles.Subrect.Base.Y"-#define NVSDK_NGX_Parameter_DLSSD_ColorBeforeTransparency_Subrect_Base_X "DLSSD.ColorBeforeTransparency.Subrect.Base.X"-#define NVSDK_NGX_Parameter_DLSSD_ColorBeforeTransparency_Subrect_Base_Y "DLSSD.ColorBeforeTransparency.Subrect.Base.Y"-#define NVSDK_NGX_Parameter_DLSSD_ColorAfterTransparency_Subrect_Base_X "DLSSD.ColorAfterTransparency.Subrect.Base.X"-#define NVSDK_NGX_Parameter_DLSSD_ColorAfterTransparency_Subrect_Base_Y "DLSSD.ColorAfterTransparency.Subrect.Base.Y"-#define NVSDK_NGX_Parameter_DLSSD_ColorBeforeFog_Subrect_Base_X "DLSSD.ColorBeforeFog.Subrect.Base.X"-#define NVSDK_NGX_Parameter_DLSSD_ColorBeforeFog_Subrect_Base_Y "DLSSD.ColorBeforeFog.Subrect.Base.Y"-#define NVSDK_NGX_Parameter_DLSSD_ColorAfterFog_Subrect_Base_X "DLSSD.ColorAfterFog.Subrect.Base.X"-#define NVSDK_NGX_Parameter_DLSSD_ColorAfterFog_Subrect_Base_Y "DLSSD.ColorAfterFog.Subrect.Base.Y"-#define NVSDK_NGX_Parameter_DLSSD_ScreenSpaceSubsurfaceScatteringGuide_Subrect_Base_X "DLSSD.ScreenSpaceSubsurfaceScatteringGuide.Subrect.Base.X"-#define NVSDK_NGX_Parameter_DLSSD_ScreenSpaceSubsurfaceScatteringGuide_Subrect_Base_Y "DLSSD.ScreenSpaceSubsurfaceScatteringGuide.Subrect.Base.Y"-#define NVSDK_NGX_Parameter_DLSSD_ColorBeforeScreenSpaceSubsurfaceScattering_Subrect_Base_X "DLSSD.ColorBeforeScreenSpaceSubsurfaceScattering.Subrect.Base.X"-#define NVSDK_NGX_Parameter_DLSSD_ColorBeforeScreenSpaceSubsurfaceScattering_Subrect_Base_Y "DLSSD.ColorBeforeScreenSpaceSubsurfaceScattering.Subrect.Base.Y"-#define NVSDK_NGX_Parameter_DLSSD_ColorAfterScreenSpaceSubsurfaceScattering_Subrect_Base_X "DLSSD.ColorAfterScreenSpaceSubsurfaceScattering.Subrect.Base.X"-#define NVSDK_NGX_Parameter_DLSSD_ColorAfterScreenSpaceSubsurfaceScattering_Subrect_Base_Y "DLSSD.ColorAfterScreenSpaceSubsurfaceScattering.Subrect.Base.Y"-#define NVSDK_NGX_Parameter_DLSSD_ScreenSpaceRefractionGuide_Subrect_Base_X "DLSSD.ScreenSpaceRefractionGuide.Subrect.Base.X"-#define NVSDK_NGX_Parameter_DLSSD_ScreenSpaceRefractionGuide_Subrect_Base_Y "DLSSD.ScreenSpaceRefractionGuide.Subrect.Base.Y"-#define NVSDK_NGX_Parameter_DLSSD_ColorBeforeScreenSpaceRefraction_Subrect_Base_X "DLSSD.ColorBeforeScreenSpaceRefraction.Subrect.Base.X"-#define NVSDK_NGX_Parameter_DLSSD_ColorBeforeScreenSpaceRefraction_Subrect_Base_Y "DLSSD.ColorBeforeScreenSpaceRefraction.Subrect.Base.Y"-#define NVSDK_NGX_Parameter_DLSSD_ColorAfterScreenSpaceRefraction_Subrect_Base_X "DLSSD.ColorAfterScreenSpaceRefraction.Subrect.Base.X"-#define NVSDK_NGX_Parameter_DLSSD_ColorAfterScreenSpaceRefraction_Subrect_Base_Y "DLSSD.ColorAfterScreenSpaceRefraction.Subrect.Base.Y"-#define NVSDK_NGX_Parameter_DLSSD_DepthOfFieldGuide_Subrect_Base_X "DLSSD.DepthOfFieldGuide.Subrect.Base.X"-#define NVSDK_NGX_Parameter_DLSSD_DepthOfFieldGuide_Subrect_Base_Y "DLSSD.DepthOfFieldGuide.Subrect.Base.Y"-#define NVSDK_NGX_Parameter_DLSSD_ColorBeforeDepthOfField_Subrect_Base_X "DLSSD.ColorBeforeDepthOfField.Subrect.Base.X"-#define NVSDK_NGX_Parameter_DLSSD_ColorBeforeDepthOfField_Subrect_Base_Y "DLSSD.ColorBeforeDepthOfField.Subrect.Base.Y"-#define NVSDK_NGX_Parameter_DLSSD_ColorAfterDepthOfField_Subrect_Base_X "DLSSD.ColorAfterDepthOfField.Subrect.Base.X"-#define NVSDK_NGX_Parameter_DLSSD_ColorAfterDepthOfField_Subrect_Base_Y "DLSSD.ColorAfterDepthOfField.Subrect.Base.Y"-#define NVSDK_NGX_Parameter_DLSSD_DiffuseHitDistance_Subrect_Base_X "DLSSD.DiffuseHitDistance.Subrect.Base.X"-#define NVSDK_NGX_Parameter_DLSSD_DiffuseHitDistance_Subrect_Base_Y "DLSSD.DiffuseHitDistance.Subrect.Base.Y"-#define NVSDK_NGX_Parameter_DLSSD_SpecularHitDistance_Subrect_Base_X "DLSSD.SpecularHitDistance.Subrect.Base.X"-#define NVSDK_NGX_Parameter_DLSSD_SpecularHitDistance_Subrect_Base_Y "DLSSD.SpecularHitDistance.Subrect.Base.Y"-#define NVSDK_NGX_Parameter_DLSSD_DiffuseRayDirection_Subrect_Base_X "DLSSD.DiffuseRayDirection.Subrect.Base.X"-#define NVSDK_NGX_Parameter_DLSSD_DiffuseRayDirection_Subrect_Base_Y "DLSSD.DiffuseRayDirection.Subrect.Base.Y"-#define NVSDK_NGX_Parameter_DLSSD_SpecularRayDirection_Subrect_Base_X "DLSSD.SpecularRayDirection.Subrect.Base.X"-#define NVSDK_NGX_Parameter_DLSSD_SpecularRayDirection_Subrect_Base_Y "DLSSD.SpecularRayDirection.Subrect.Base.Y"-#define NVSDK_NGX_Parameter_DLSSD_DiffuseRayDirectionHitDistance_Subrect_Base_X "DLSSD.DiffuseRayDirectionHitDistance.Subrect.Base.X"-#define NVSDK_NGX_Parameter_DLSSD_DiffuseRayDirectionHitDistance_Subrect_Base_Y "DLSSD.DiffuseRayDirectionHitDistance.Subrect.Base.Y"-#define NVSDK_NGX_Parameter_DLSSD_SpecularRayDirectionHitDistance_Subrect_Base_X "DLSSD.SpecularRayDirectionHitDistance.Subrect.Base.X"-#define NVSDK_NGX_Parameter_DLSSD_SpecularRayDirectionHitDistance_Subrect_Base_Y "DLSSD.SpecularRayDirectionHitDistance.Subrect.Base.Y"-#define NVSDK_NGX_Parameter_DLSSD_ResponsivityMask_Subrect_Base_X "DLSSD.ResponsivityMask.Subrect.Base.X"-#define NVSDK_NGX_Parameter_DLSSD_ResponsivityMask_Subrect_Base_Y "DLSSD.ResponsivityMask.Subrect.Base.Y"--#define NVSDK_NGX_Parameter_SuperSamplingDenoising_Available "SuperSamplingDenoising.Available"-#define NVSDK_NGX_Parameter_SuperSamplingDenoising_NeedsUpdatedDriver "SuperSamplingDenoising.NeedsUpdatedDriver"-#define NVSDK_NGX_Parameter_SuperSamplingDenoising_MinDriverVersionMajor "SuperSamplingDenoising.MinDriverVersionMajor"-#define NVSDK_NGX_Parameter_SuperSamplingDenoising_MinDriverVersionMinor "SuperSamplingDenoising.MinDriverVersionMinor"-#define NVSDK_NGX_Parameter_SuperSamplingDenoising_FeatureInitResult "SuperSamplingDenoising.FeatureInitResult"-#define NVSDK_NGX_Parameter_DLSSDOptimalSettingsCallback "DLSSDOptimalSettingsCallback"-#define NVSDK_NGX_Parameter_DLSSDGetStatsCallback "DLSSDGetStatsCallback"--#define NVSDK_NGX_Parameter_RayReconstruction_Hint_Render_Preset_DLAA "RayReconstruction.Hint.Render.Preset.DLAA"-#define NVSDK_NGX_Parameter_RayReconstruction_Hint_Render_Preset_Quality "RayReconstruction.Hint.Render.Preset.Quality"-#define NVSDK_NGX_Parameter_RayReconstruction_Hint_Render_Preset_Balanced "RayReconstruction.Hint.Render.Preset.Balanced"-#define NVSDK_NGX_Parameter_RayReconstruction_Hint_Render_Preset_Performance "RayReconstruction.Hint.Render.Preset.Performance"-#define NVSDK_NGX_Parameter_RayReconstruction_Hint_Render_Preset_UltraPerformance "RayReconstruction.Hint.Render.Preset.UltraPerformance"-#define NVSDK_NGX_Parameter_RayReconstruction_Hint_Render_Preset_UltraQuality "RayReconstruction.Hint.Render.Preset.UltraQuality"--#endif // NVSDK_NGX_DEFS_DLSSD_Hdiff --git a/native/NVIDIA-DLSS/include/nvsdk_ngx_defs_dlssg.h b/native/NVIDIA-DLSS/include/nvsdk_ngx_defs_dlssg.hdeleted file mode 100644index 883422b..0000000--- a/native/NVIDIA-DLSS/include/nvsdk_ngx_defs_dlssg.h+++ /dev/null@@ -1,376 +0,0 @@-#pragma once-/*-* Copyright (c) 2021-2024 NVIDIA CORPORATION. All rights reserved.-*-* NVIDIA Corporation and its licensors retain all intellectual property and proprietary-* rights in and to this software, related documentation and any modifications thereto.-* Any use, reproduction, disclosure or distribution of this software and related-* documentation without an express license agreement from NVIDIA Corporation is strictly-* prohibited.-*-* TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THIS SOFTWARE IS PROVIDED *AS IS*-* AND NVIDIA AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES, EITHER EXPRESS OR IMPLIED,-* INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A-* PARTICULAR PURPOSE. IN NO EVENT SHALL NVIDIA OR ITS SUPPLIERS BE LIABLE FOR ANY-* SPECIAL, INCIDENTAL, INDIRECT, OR CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT-* LIMITATION, DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF-* BUSINESS INFORMATION, OR ANY OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR-* INABILITY TO USE THIS SOFTWARE, EVEN IF NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF-* SUCH DAMAGES.-*/---#ifndef NVSDK_NGX_DEFS_DLSSG_H-#define NVSDK_NGX_DEFS_DLSSG_H--#include <stddef.h> // for size_t-#include <stdint.h> // for uint64_t--#include "nvsdk_ngx_defs.h"-#include "nvsdk_ngx_params.h"--typedef enum NVSDK_NGX_DLSSG_ResourceFlags-{- NVSDK_NGX_DLSSG_ResourceFlags_Backbuffer = 1 << 0,- NVSDK_NGX_DLSSG_ResourceFlags_MVecs = 1 << 1,- NVSDK_NGX_DLSSG_ResourceFlags_Depth = 1 << 2,- NVSDK_NGX_DLSSG_ResourceFlags_HUDLess = 1 << 3,- NVSDK_NGX_DLSSG_ResourceFlags_UI = 1 << 4,- NVSDK_NGX_DLSSG_ResourceFlags_BidirectionalDistortionField = 1 << 5,- NVSDK_NGX_DLSSG_ResourceFlags_Reserved6 = 1 << 6,- NVSDK_NGX_DLSSG_ResourceFlags_UIAlpha = 1 << 7,-- NVSDK_NGX_DLSSG_ResourceFlags_OutputInterpolated = 1 << 24,- NVSDK_NGX_DLSSG_ResourceFlags_OutputReal = 1 << 25,- NVSDK_NGX_DLSSG_ResourceFlags_OutputDisableInterpolation = 1 << 26,-} NVSDK_NGX_DLSSG_ResourceFlags;--#define NVSDK_NGX_Parameter_FrameGeneration_Available "FrameGeneration.Available"-#define NVSDK_NGX_Parameter_FrameGeneration_FeatureInitResult "FrameGeneration.FeatureInitResult"-#define NVSDK_NGX_Parameter_FrameGeneration_MinDriverVersionMajor "FrameGeneration.MinDriverVersionMajor"-#define NVSDK_NGX_Parameter_FrameGeneration_MinDriverVersionMinor "FrameGeneration.MinDriverVersionMinor"-#define NVSDK_NGX_Parameter_FrameGeneration_NeedsUpdatedDriver "FrameGeneration.NeedsUpdatedDriver"--#define NVSDK_NGX_Parameter_FrameInterpolation_Available "FrameInterpolation.Available"-#define NVSDK_NGX_Parameter_FrameInterpolation_FeatureInitResult "FrameInterpolation.FeatureInitResult"-#define NVSDK_NGX_Parameter_FrameInterpolation_MinDriverVersionMajor "FrameInterpolation.MinDriverVersionMajor"-#define NVSDK_NGX_Parameter_FrameInterpolation_MinDriverVersionMinor "FrameInterpolation.MinDriverVersionMinor"-#define NVSDK_NGX_Parameter_FrameInterpolation_NeedsUpdatedDriver "FrameInterpolation.NeedsUpdatedDriver"--#define NVSDK_NGX_DLSSG_Parameter_BackbufferFormat "DLSSG.BackbufferFormat"--// Required Input Textures--#define NVSDK_NGX_DLSSG_Parameter_Backbuffer "DLSSG.Backbuffer"-#define NVSDK_NGX_DLSSG_Parameter_MVecs "DLSSG.MVecs"-#define NVSDK_NGX_DLSSG_Parameter_Depth "DLSSG.Depth"--// Optional Input Textures to improve Image Quality (strongly suggested)--// NVSDK_NGX_DLSSG_Parameter_BidirectionalDistortionField: Resource describing post-processing distortion effects,-// such as lens distortion, that have been applied to the final color. If you use this type of effect, the final-// color is no longer aligned with the input depth, motion vectors, and camera information.-// The bidirectional distortion field serves as a mapping between the pixels in the distorted color texture-// and the undistorted guide buffers.-#define NVSDK_NGX_DLSSG_Parameter_BidirectionalDistortionField "DLSSG.BidirectionalDistortionField"-// NVSDK_NGX_DLSSG_Parameter_HUDLess: Contains the scene color before any UI or HUD elements-// are drawn. Its content for non-UI pixels should be identical to the backbuffer.-#define NVSDK_NGX_DLSSG_Parameter_HUDLess "DLSSG.HUDLess"-// NVSDK_NGX_DLSSG_Parameter_UI: A four-channel resource containing the color and opacity/alpha of the UI.-// The color should be pre-multiplied by the alpha value, such that for each pixel:-// backbuffer_color = ui_color + (1 - ui_alpha) * hudless_scene_color-#define NVSDK_NGX_DLSSG_Parameter_UI "DLSSG.UI"-// NVSDK_NGX_DLSSG_Parameter_UIAlpha: A single channel resource of only the alpha UI values, between 0.0f and 1.0f.-#define NVSDK_NGX_DLSSG_Parameter_UIAlpha "DLSSG.UIAlpha"-// Note: Only one of NVSDK_NGX_DLSSG_Parameter_UIAlpha or NVSDK_NGX_DLSSG_Parameter_UI need to be provided.-// For User Interface Recomposition (UIR) frame generation, both HUDless and one of UI or UIAlpha must be provided.-// Additionally set the NVSDK_NGX_DLSSG_Parameter_UserInterfaceRecompositionEnabled parameter to trigger-// the create time decisions required for this UIR mode. See that parameter description for more information.--// Required Output Texture (same texture format as Backbuffer)-#define NVSDK_NGX_DLSSG_Parameter_OutputInterpolated "DLSSG.OutputInterpolated"-// Optional Output Texture (gives FG the opportunity to render text or debug info onto the real frame)-#define NVSDK_NGX_DLSSG_Parameter_OutputReal "DLSSG.OutputReal"--// Legacy names for the output interpolated and real frames. Use the equivalent parameters-// NVSDK_NGX_DLSSG_Parameter_OutputInterpolated and NVSDK_NGX_DLSSG_Parameter_OutputReal-// instead.-#define NVSDK_NGX_Parameter_OutputInterpolated "DLSSG.OutputInterpolated"-#define NVSDK_NGX_Parameter_OutputReal "DLSSG.OutputReal"--// Create-time resource flag bitmasks (see NVSDK_NGX_DLSSG_ResourceFlags)-// denoting resources that the application will always/never provide for the-// lifetime of the feature instance. Setting these values may enable memory-// optimizations to reduce VRAM. Resources not specified in either mask remain-// optional, and may be provided on some frames, but not others. Resources-// required by the algorithm (backbuffer, mvecs, depth, and output) are assumed-// to be set in AlwaysProvidedFlags and unset in NeverProvidedFlags, regardless-// of the actual values-#define NVSDK_NGX_DLSSG_Parameter_ResourceAlwaysProvided_Flags "DLSSG.ResourceAlwaysProvidedFlags"-#define NVSDK_NGX_DLSSG_Parameter_ResourceNeverProvided_Flags "DLSSG.ResourceNeverProvidedFlags"--// DLFG-specific width/height parameters, to avoid name conflicts with other-// features. If set in CreateFeature, these parameters will be used instead of-// the generic NVSDK_NGX_Parameter{Width,Height}-#define NVSDK_NGX_DLSSG_Parameter_Width "DLSSG.Width"-#define NVSDK_NGX_DLSSG_Parameter_Height "DLSSG.Height"--// Output resource which allows the snippet to hint to the host application that-// the interpolated frame(s) should not be shown this frame. This resource must-// be created by the application with a minimum size of 4 bytes, and will be filled-// by the snippet: if interpolation should be disabled for this frame, boolean true-// will be written to the first byte of the buffer.-#define NVSDK_NGX_DLSSG_Parameter_OutputDisableInterpolation "DLSSG.OutputDisableInterpolation"--// IMPORTANT: All matrices should NOT contain temporal AA jitter offset-// Specifies matrix transformation from the camera view to the clip space.-// Float4x4 as void*-#define NVSDK_NGX_DLSSG_Parameter_CameraViewToClip "DLSSG.CameraViewToClip"-// Float4x4 as void*-#define NVSDK_NGX_DLSSG_Parameter_ClipToCameraView "DLSSG.ClipToCameraView"-// Float4x4 as void*-#define NVSDK_NGX_DLSSG_Parameter_ClipToLensClip "DLSSG.ClipToLensClip"-// Float4x4 as void*-#define NVSDK_NGX_DLSSG_Parameter_ClipToPrevClip "DLSSG.ClipToPrevClip"-// Float4x4 as void*-#define NVSDK_NGX_DLSSG_Parameter_PrevClipToClip "DLSSG.PrevClipToClip"--// Specifies clip space jitter offset-#define NVSDK_NGX_DLSSG_Parameter_JitterOffsetX "DLSSG.JitterOffsetX"-#define NVSDK_NGX_DLSSG_Parameter_JitterOffsetY "DLSSG.JitterOffsetY"--// Specifies scale factors used to normalize motion vectors (so the values are in [-1,1] range)-#define NVSDK_NGX_DLSSG_Parameter_MvecScaleX "DLSSG.MvecScaleX"-#define NVSDK_NGX_DLSSG_Parameter_MvecScaleY "DLSSG.MvecScaleY"--// Specifies camera pinhole offset.-#define NVSDK_NGX_DLSSG_Parameter_CameraPinholeOffsetX "DLSSG.CameraPinholeOffsetX"-#define NVSDK_NGX_DLSSG_Parameter_CameraPinholeOffsetY "DLSSG.CameraPinholeOffsetY"--// Specifies camera position in world space.-#define NVSDK_NGX_DLSSG_Parameter_CameraPosX "DLSSG.CameraPosX"-#define NVSDK_NGX_DLSSG_Parameter_CameraPosY "DLSSG.CameraPosY"-#define NVSDK_NGX_DLSSG_Parameter_CameraPosZ "DLSSG.CameraPosZ"--// Specifies camera up vector in world space.-#define NVSDK_NGX_DLSSG_Parameter_CameraUpX "DLSSG.CameraUpX"-#define NVSDK_NGX_DLSSG_Parameter_CameraUpY "DLSSG.CameraUpY"-#define NVSDK_NGX_DLSSG_Parameter_CameraUpZ "DLSSG.CameraUpZ"--// Specifies camera right vector in world space.-#define NVSDK_NGX_DLSSG_Parameter_CameraRightX "DLSSG.CameraRightX"-#define NVSDK_NGX_DLSSG_Parameter_CameraRightY "DLSSG.CameraRightY"-#define NVSDK_NGX_DLSSG_Parameter_CameraRightZ "DLSSG.CameraRightZ"--// Specifies camera forward vector in world space.-#define NVSDK_NGX_DLSSG_Parameter_CameraFwdX "DLSSG.CameraFwdX"-#define NVSDK_NGX_DLSSG_Parameter_CameraFwdY "DLSSG.CameraFwdY"-#define NVSDK_NGX_DLSSG_Parameter_CameraFwdZ "DLSSG.CameraFwdZ"--// Specifies camera near view plane distance.-#define NVSDK_NGX_DLSSG_Parameter_CameraNear "DLSSG.CameraNear"--// Specifies camera far view plane distance.-#define NVSDK_NGX_DLSSG_Parameter_CameraFar "DLSSG.CameraFar"--// Specifies camera field of view in radians.-#define NVSDK_NGX_DLSSG_Parameter_CameraFOV "DLSSG.CameraFOV"--// Specifies camera aspect ratio defined as view space width divided by height.-#define NVSDK_NGX_DLSSG_Parameter_CameraAspectRatio "DLSSG.CameraAspectRatio"--// Specifies if tagged color buffers are full HDR (rendering to an HDR monitor) or not-#define NVSDK_NGX_DLSSG_Parameter_ColorBuffersHDR "DLSSG.ColorBuffersHDR"--// Specifies if depth values are inverted (value closer to the camera is higher) or not.-#define NVSDK_NGX_DLSSG_Parameter_DepthInverted "DLSSG.DepthInverted"--// Specifies if camera motion is included in the MVec buffer.-#define NVSDK_NGX_DLSSG_Parameter_CameraMotionIncluded "DLSSG.CameraMotionIncluded"--// Specifies if motion vectors include jitter data.--// Specifies if previous frame has no connection to the current one (motion vectors are invalid)-#define NVSDK_NGX_DLSSG_Parameter_Reset "DLSSG.Reset"--// Specifies if Automode overrode the input Reset flag to true.-#define NVSDK_NGX_DLSSG_Parameter_AutomodeOverrideReset "DLSSG.AutomodeOverrideReset"--// Specifies if application is not currently rendering game frames (paused in menu, playing video cut-scenes)-#define NVSDK_NGX_DLSSG_Parameter_NotRenderingGameFrames "DLSSG.NotRenderingGameFrames"--// Specifies if orthographic projection is used or not.-#define NVSDK_NGX_DLSSG_Parameter_OrthoProjection "DLSSG.OrthoProjection"--#define NVSDK_NGX_Parameter_DLSSGGetCurrentSettingsCallback "DLSSG.GetCurrentSettingsCallback"-#define NVSDK_NGX_Parameter_DLSSGEstimateVRAMCallback "DLSSG.EstimateVRAMCallback"--#define NVSDK_NGX_Parameter_DLSSGMustCallEval "DLSSG.MustCallEval"-#define NVSDK_NGX_Parameter_DLSSGBurstCaptureRunning "DLSSG.BurstCaptureRunning"--#define NVSDK_NGX_Parameter_DLSSGInvertXAxis "DLSSG.InvertXAxis"-#define NVSDK_NGX_Parameter_DLSSGInvertYAxis "DLSSG.InvertYAxis"--#define NVSDK_NGX_DLSSG_Parameter_UserDebugText "DLSSG.UserDebugText"--#define NVSDK_NGX_DLSSG_Parameter_MvecInvalidValue "DLSSG.MvecInvalidValue"-#define NVSDK_NGX_DLSSG_Parameter_MvecDilated "DLSSG.MvecDilated"-#define NVSDK_NGX_DLSSG_Parameter_MvecJittered "DLSSG.MvecJittered"--#define NVSDK_NGX_DLSSG_Parameter_MenuDetectionEnabled "DLSSG.MenuDetectionEnabled"--// If true, allow the snippet to create internal resources on a separate thread, to avoid hitches during feature creation (default false)-#define NVSDK_NGX_DLSSG_Parameter_AsyncCreateEnabled "DLSSG.AsyncCreateEnabled"--// The DLSS Frame Generation algorithm processes all depth in a "linearized" depth space using the below formulation.-//-// if NVSDK_NGX_DLSSG_Parameter_DepthInverted is false: `lin_depth = 1 / (1 - depth)`-// if NVSDK_NGX_DLSSG_Parameter_DepthInverted is true: `lin_depth = 1 / depth`-//-// This enables the algorithm to reliably threshold and characterize depth interactions.-//-// The Frame Generation algorithm is tuned such that most game integrations do not need to modify these values.-// However, the below parameters provide mechanisms to control the shape of the internal depth processing space.-// Typically useful when input raw depth units are compressed into a small dynamic range. The scale modifier-// NVSDK_NGX_DLSSG_Parameter_LinearizedDepth_Scale is a good place to start that won't require more changes.-//-// Note: the input depth texture must be consistent with the input camera transformation matrices, e.g. clip2prevclip.--// Optional scalar on the linearized depth before algorithm processing.-//-// Defaults to 1.0f. A value of 0.1f can help with a compressed input depth range.-#define NVSDK_NGX_DLSSG_Parameter_LinearizedDepth_Scale "DLSSG.LinearizedDepth_Scale"--// Optional heuristic that defines the z-distance to the depth plane that artificially partitions near from far objects.-// DLSS Frame Generation uses this plane to restrict far plane object motion from scattering into near plane objects.-//-// Defaults to 600.0f. A value of 4000.0f can help with a compressed input depth range.-#define NVSDK_NGX_DLSSG_Parameter_LinearizedDepth_NearFarPartition "DLSSG.LinearizedDepth_NearFarPartition"--// Optional heuristic that specifies the minimum linearized depth difference between two objects in screen-space.-// DLSS Frame Generation uses this heuristic to understand contiguous depth surfaces.-//-// Defaults to 40.0f.-#define NVSDK_NGX_DLSSG_Parameter_MinRelativeLinearDepthObjectSeparation "DLSSG.MinRelativeLinearDepthObjectSeparation"--// Texture Subrect Definitions--// Subrect definitions for the input backbuffer (NVSDK_NGX_DLSSG_Parameter_Backbuffer)-#define NVSDK_NGX_DLSSG_Parameter_InputBackbufferSubrectBaseX "DLSSG.InputBackbufferSubrectBaseX"-#define NVSDK_NGX_DLSSG_Parameter_InputBackbufferSubrectBaseY "DLSSG.InputBackbufferSubrectBaseY"-#define NVSDK_NGX_DLSSG_Parameter_InputBackbufferSubrectWidth "DLSSG.InputBackbufferSubrectWidth"-#define NVSDK_NGX_DLSSG_Parameter_InputBackbufferSubrectHeight "DLSSG.InputBackbufferSubrectHeight"--#define NVSDK_NGX_DLSSG_Parameter_MVecsSubrectBaseX "DLSSG.MVecsSubrectBaseX"-#define NVSDK_NGX_DLSSG_Parameter_MVecsSubrectBaseY "DLSSG.MVecsSubrectBaseY"-#define NVSDK_NGX_DLSSG_Parameter_MVecsSubrectWidth "DLSSG.MVecsSubrectWidth"-#define NVSDK_NGX_DLSSG_Parameter_MVecsSubrectHeight "DLSSG.MVecsSubrectHeight"--#define NVSDK_NGX_DLSSG_Parameter_DepthSubrectBaseX "DLSSG.DepthSubrectBaseX"-#define NVSDK_NGX_DLSSG_Parameter_DepthSubrectBaseY "DLSSG.DepthSubrectBaseY"-#define NVSDK_NGX_DLSSG_Parameter_DepthSubrectWidth "DLSSG.DepthSubrectWidth"-#define NVSDK_NGX_DLSSG_Parameter_DepthSubrectHeight "DLSSG.DepthSubrectHeight"--#define NVSDK_NGX_DLSSG_Parameter_HUDLessSubrectBaseX "DLSSG.HUDLessSubrectBaseX"-#define NVSDK_NGX_DLSSG_Parameter_HUDLessSubrectBaseY "DLSSG.HUDLessSubrectBaseY"-#define NVSDK_NGX_DLSSG_Parameter_HUDLessSubrectWidth "DLSSG.HUDLessSubrectWidth"-#define NVSDK_NGX_DLSSG_Parameter_HUDLessSubrectHeight "DLSSG.HUDLessSubrectHeight"--#define NVSDK_NGX_DLSSG_Parameter_UISubrectBaseX "DLSSG.UISubrectBaseX"-#define NVSDK_NGX_DLSSG_Parameter_UISubrectBaseY "DLSSG.UISubrectBaseY"-#define NVSDK_NGX_DLSSG_Parameter_UISubrectWidth "DLSSG.UISubrectWidth"-#define NVSDK_NGX_DLSSG_Parameter_UISubrectHeight "DLSSG.UISubrectHeight"--#define NVSDK_NGX_DLSSG_Parameter_UIAlphaSubrectBaseX "DLSSG.UIAlphaSubrectBaseX"-#define NVSDK_NGX_DLSSG_Parameter_UIAlphaSubrectBaseY "DLSSG.UIAlphaSubrectBaseY"-#define NVSDK_NGX_DLSSG_Parameter_UIAlphaSubrectWidth "DLSSG.UIAlphaSubrectWidth"-#define NVSDK_NGX_DLSSG_Parameter_UIAlphaSubrectHeight "DLSSG.UIAlphaSubrectHeight"--#define NVSDK_NGX_DLSSG_Parameter_BidirectionalDistortionFieldSubrectBaseX "DLSSG.BidirectionalDistortionFieldSubrectBaseX"-#define NVSDK_NGX_DLSSG_Parameter_BidirectionalDistortionFieldSubrectBaseY "DLSSG.BidirectionalDistortionFieldSubrectBaseY"-#define NVSDK_NGX_DLSSG_Parameter_BidirectionalDistortionFieldSubrectWidth "DLSSG.BidirectionalDistortionFieldSubrectWidth"-#define NVSDK_NGX_DLSSG_Parameter_BidirectionalDistortionFieldSubrectHeight "DLSSG.BidirectionalDistortionFieldSubrectHeight"-#define NVSDK_NGX_DLSSG_Parameter_BidirectionalDistortionField_LowPrecision_IsLowPrecision "DLSSG.BidirectionalDistortionFieldLowPrecision.IsLowPrecision"-#define NVSDK_NGX_DLSSG_Parameter_BidirectionalDistortionField_LowPrecision_Bias "DLSSG.BidirectionalDistortionFieldLowPrecision.Bias"-#define NVSDK_NGX_DLSSG_Parameter_BidirectionalDistortionField_LowPrecision_Scale "DLSSG.BidirectionalDistortionFieldLowPrecision.Scale"--#define NVSDK_NGX_DLSSG_Parameter_OutputInterpolatedSubrectBaseX "DLSSG.OutputInterpolatedSubrectBaseX"-#define NVSDK_NGX_DLSSG_Parameter_OutputInterpolatedSubrectBaseY "DLSSG.OutputInterpolatedSubrectBaseY"-#define NVSDK_NGX_DLSSG_Parameter_OutputInterpolatedSubrectWidth "DLSSG.OutputInterpolatedSubrectWidth"-#define NVSDK_NGX_DLSSG_Parameter_OutputInterpolatedSubrectHeight "DLSSG.OutputInterpolatedSubrectHeight"--#define NVSDK_NGX_DLSSG_Parameter_OutputRealSubrectBaseX "DLSSG.OutputRealSubrectBaseX"-#define NVSDK_NGX_DLSSG_Parameter_OutputRealSubrectBaseY "DLSSG.OutputRealSubrectBaseY"-#define NVSDK_NGX_DLSSG_Parameter_OutputRealSubrectWidth "DLSSG.OutputRealSubrectWidth"-#define NVSDK_NGX_DLSSG_Parameter_OutputRealSubrectHeight "DLSSG.OutputRealSubrectHeight"--// DEPRECATED. Backbuffer subrect definitions. These apply to BOTH the input and-// output backbuffer resources (Backbuffer, OutputInterpolated, OutputReal).-//-// Use InputBackbufferSubrect, OutputInterpolatedSubrect, and OutputRealSubrect-// instead.-#define NVSDK_NGX_DLSSG_Parameter_BackbufferSubrectBaseX "DLSSG.BackbufferSubrectBaseX"-#define NVSDK_NGX_DLSSG_Parameter_BackbufferSubrectBaseY "DLSSG.BackbufferSubrectBaseY"-#define NVSDK_NGX_DLSSG_Parameter_BackbufferSubrectWidth "DLSSG.BackbufferSubrectWidth"-#define NVSDK_NGX_DLSSG_Parameter_BackbufferSubrectHeight "DLSSG.BackbufferSubrectHeight"--// Specifies the internal resolution to be used (mainly for dynamic resolution)-#define NVSDK_NGX_DLSSG_Parameter_InternalWidth "DLSSG.InternalWidth"-#define NVSDK_NGX_DLSSG_Parameter_InternalHeight "DLSSG.InternalHeight"--// If nonzero, we expect to use dynamic resolution (MVec and Depth res will change, possibly per frame)-#define NVSDK_NGX_DLSSG_Parameter_DynamicResolution "DLSSG.DynamicResolution"--typedef enum NVSDK_NGX_DLSSG_EvalFlags-{- // The default behaviour for evaluate is to write the interpolated pixels inside of the- // backbuffer extent and uninterpolated pixels - outside of the extent. If this flag is- // set, then only the inside of the backbuffer extent is updated, the outside of the extent- // stays untouched.- NVSDK_NGX_DLSSG_EvalFlags_UpdateOnlyInsideExtents = (1 << 0)-} NVSDK_NGX_DLSSG_EvalFlags;-#define NVSDK_NGX_DLSSG_Parameter_EvalFlags "DLSSG.EvalFlags"--typedef enum NVSDK_NGX_DLSSG_FullscreenMode-{- NVSDK_NGX_DLSSG_FullscreenMode_Windowed = 0,- NVSDK_NGX_DLSSG_FullscreenMode_Borderless = 1,- NVSDK_NGX_DLSSG_FullscreenMode_Exclusive = 2-} NVSDK_NGX_DLSSG_FullscreenMode;--#define NVSDK_NGX_DLSSG_Parameter_FullscreenMode "DLSSG.FullscreenMode"-#define NVSDK_NGX_DLSSG_Parameter_TargetFrameRate "DLSSG.TargetFrameRate"--// Callback function types-typedef NVSDK_NGX_Result(NVSDK_CONV* PFN_NVSDK_NGX_DLSSG_GetCurrentSettingsCallback)(const NVSDK_NGX_Handle* InHandle, NVSDK_NGX_Parameter* InParams);-typedef NVSDK_NGX_Result(NVSDK_CONV* PFN_NVSDK_NGX_DLSSG_EstimateVRAMCallback)(uint32_t mvecDepthWidth, uint32_t mvecDepthHeight,- uint32_t colorWidth, uint32_t colorHeight,- uint32_t colorBufferFormat,- uint32_t mvecBufferFormat, uint32_t depthBufferFormat,- uint32_t hudLessBufferFormat, uint32_t uiBufferFormat, size_t* estimatedVRAMInBytes);--// DLSS 4--// Output Capability Parameters (access via GetDeviceCapabilityParameters)-// The maximum number of generated frames supported by the feature (e.g. 3 for 4x)-// If 1 or not set, multiframe is not supported-#define NVSDK_NGX_DLSSG_Parameter_MultiFrameCountMax "DLSSG.MultiFrameCountMax"--// InParameters-// uint32_t, Total of Number Frames expected to Interpolate for given Real-Frame Pair. For 4x, this is 3. For 2x, this is 1.-#define NVSDK_NGX_DLSSG_Parameter_MultiFrameCount "DLSSG.MultiFrameCount"-// uint32_t, Current inner frame index. For 4x, this is 1, 2, and 3. For 2x, this is 1.-#define NVSDK_NGX_DLSSG_Parameter_MultiFrameIndex "DLSSG.MultiFrameIndex"--// Optional: uint64_t that increments by one for each fully rendered backbuffer frame such that-// Current Backbuffer ID == (Previous Backbuffer ID + 1). The number should increment even-// if FG is off, for example, when rendering a menu with FG temporarily disabled.-#define NVSDK_NGX_DLSSG_Parameter_BackbufferFrameID "DLSSG.BackbufferFrameID"--// Create Time Parameter: Specifies if User Interface Recomposition is enabled.-// When enabled, the algorithm will generate output frames using the HUDless and UI Color & Alpha textures if present.-// Boolean value: 0 (disabled) or 1 (enabled).-// The end user can override this with Nvidia App DLSS Override.-#define NVSDK_NGX_DLSSG_Parameter_UserInterfaceRecompositionEnabled "DLSSG.UserInterfaceRecompositionEnabled"--#endif // NVSDK_NGX_DEFS_DLSSG_Hdiff --git a/native/NVIDIA-DLSS/include/nvsdk_ngx_defs_vk.h b/native/NVIDIA-DLSS/include/nvsdk_ngx_defs_vk.hdeleted file mode 100644index 98fc873..0000000--- a/native/NVIDIA-DLSS/include/nvsdk_ngx_defs_vk.h+++ /dev/null@@ -1,106 +0,0 @@-/*- * SPDX-FileCopyrightText: Copyright (c) 2019-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.- * SPDX-License-Identifier: LicenseRef-NvidiaProprietary- *- * NVIDIA CORPORATION, its affiliates and licensors retain all intellectual- * property and proprietary rights in and to this material, related- * documentation and any modifications thereto. Any use, reproduction,- * disclosure or distribution of this material and related documentation- * without an express license agreement from NVIDIA CORPORATION or- * its affiliates is strictly prohibited.- */--#ifndef NVSDK_NGX_DEFS_VK_H-#define NVSDK_NGX_DEFS_VK_H-#pragma once--#ifndef __cplusplus-#include <stdbool.h>-#endif--#ifdef __cplusplus-extern "C"-{-#endif--typedef enum NVSDK_NGX_Resource_VK_Type-{- NVSDK_NGX_RESOURCE_VK_TYPE_VK_IMAGEVIEW,- NVSDK_NGX_RESOURCE_VK_TYPE_VK_BUFFER-} NVSDK_NGX_Resource_VK_Type;--////////////////////////////////////////////////////////////////////////////////-// NVSDK_NGX_ImageViewInfo_VK [Vulkan only]-// Contains ImageView-specific metadata.-// ImageView:-// The VkImageView resource.-//-// Image:-// The VkImage associated to this VkImageView.-//-// SubresourceRange:-// The VkImageSubresourceRange associated to this VkImageView.-//-// Format:-// The format of the resource.-//-// Width:-// The width of the resource.-//-// Height:-// The height of the resource.-//-typedef struct NVSDK_NGX_ImageViewInfo_VK {- VkImageView ImageView;- VkImage Image;- VkImageSubresourceRange SubresourceRange;- VkFormat Format;- unsigned int Width;- unsigned int Height;-} NVSDK_NGX_ImageViewInfo_VK;--////////////////////////////////////////////////////////////////////////////////-// NVSDK_NGX_BufferInfo_VK [Vulkan only]-// Contains Buffer-specific metadata.-// Buffer-// The VkBuffer resource.-//-// SizeInBytes:-// The size of the resource (in bytes).-//-typedef struct NVSDK_NGX_BufferInfo_VK {- VkBuffer Buffer;- unsigned int SizeInBytes;-} NVSDK_NGX_BufferInfo_VK;--////////////////////////////////////////////////////////////////////////////////-// NVSDK_NGX_Resource_VK [Vulkan only]-//-// ImageViewInfo:-// The VkImageView resource, and VkImageView-specific metadata. A NVSDK_NGX_Resource_VK can only have one of ImageViewInfo or BufferInfo.-//-// BufferInfo:-// The VkBuffer Resource, and VkBuffer-specific metadata. A NVSDK_NGX_Resource_VK can only have one of ImageViewInfo or BufferInfo.-//-// Type:-// Whether or this resource is a VkImageView or a VkBuffer.-//-// ReadWrite:-// True if the resource is available for read and write access.-// For VkBuffer resources: VkBufferUsageFlags includes VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT or VK_BUFFER_USAGE_STORAGE_BUFFER_BIT-// For VkImage resources: VkImageUsageFlags for associated VkImage includes VK_IMAGE_USAGE_STORAGE_BIT-//-typedef struct NVSDK_NGX_Resource_VK {- union {- NVSDK_NGX_ImageViewInfo_VK ImageViewInfo;- NVSDK_NGX_BufferInfo_VK BufferInfo;- } Resource;- NVSDK_NGX_Resource_VK_Type Type;- bool ReadWrite;-} NVSDK_NGX_Resource_VK;--#ifdef __cplusplus-} // extern "C"-#endif--#endif // NVSDK_NGX_DEFS_VK_Hdiff --git a/native/NVIDIA-DLSS/include/nvsdk_ngx_helpers.h b/native/NVIDIA-DLSS/include/nvsdk_ngx_helpers.hdeleted file mode 100644index da4be98..0000000--- a/native/NVIDIA-DLSS/include/nvsdk_ngx_helpers.h+++ /dev/null@@ -1,559 +0,0 @@-/*- * SPDX-FileCopyrightText: Copyright (c) 2019-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.- * SPDX-License-Identifier: LicenseRef-NvidiaProprietary- *- * NVIDIA CORPORATION, its affiliates and licensors retain all intellectual- * property and proprietary rights in and to this material, related- * documentation and any modifications thereto. Any use, reproduction,- * disclosure or distribution of this material and related documentation- * without an express license agreement from NVIDIA CORPORATION or- * its affiliates is strictly prohibited.- */--#ifndef NVSDK_NGX_HELPERS_H-#define NVSDK_NGX_HELPERS_H-#pragma once--#include "nvsdk_ngx.h"-#include "nvsdk_ngx_defs.h"--static inline NVSDK_NGX_Result NGX_DLSS_GET_STATS_2(- NVSDK_NGX_Parameter *pInParams,- unsigned long long *pVRAMAllocatedBytes,- unsigned int *pOptLevel, unsigned int *IsDevSnippetBranch)-{- void *Callback = NULL;- NVSDK_NGX_Parameter_GetVoidPointer(pInParams, NVSDK_NGX_Parameter_DLSSGetStatsCallback, &Callback);- if (!Callback)- {- // Possible reasons for this:- // - Installed DLSS is out of date and does not support the feature we need- // - You used NVSDK_NGX_AllocateParameters() for creating InParams. Try using NVSDK_NGX_GetCapabilityParameters() instead- return NVSDK_NGX_Result_FAIL_OutOfDate;- }-- NVSDK_NGX_Result Res = NVSDK_NGX_Result_Success;- PFN_NVSDK_NGX_DLSS_GetStatsCallback PFNCallback = (PFN_NVSDK_NGX_DLSS_GetStatsCallback)Callback;- Res = PFNCallback(pInParams);- if (NVSDK_NGX_FAILED(Res))- {- return Res;- }- NVSDK_NGX_Parameter_GetULL(pInParams, NVSDK_NGX_Parameter_SizeInBytes, pVRAMAllocatedBytes);- NVSDK_NGX_Parameter_GetUI(pInParams, NVSDK_NGX_EParameter_OptLevel, pOptLevel);- NVSDK_NGX_Parameter_GetUI(pInParams, NVSDK_NGX_EParameter_IsDevSnippetBranch, IsDevSnippetBranch);- return Res;-}--static inline NVSDK_NGX_Result NGX_DLSS_GET_STATS_1(- NVSDK_NGX_Parameter *pInParams,- unsigned long long *pVRAMAllocatedBytes,- unsigned int *pOptLevel)-{- unsigned int dummy = 0;- return NGX_DLSS_GET_STATS_2(pInParams, pVRAMAllocatedBytes, pOptLevel, &dummy);-}--static inline NVSDK_NGX_Result NGX_DLSS_GET_STATS(- NVSDK_NGX_Parameter *pInParams,- unsigned long long *pVRAMAllocatedBytes)-{- unsigned int dummy = 0;- return NGX_DLSS_GET_STATS_2(pInParams, pVRAMAllocatedBytes, &dummy, &dummy);-}--static inline NVSDK_NGX_Result NGX_DLSS_GET_OPTIMAL_SETTINGS(- NVSDK_NGX_Parameter *pInParams,- unsigned int InUserSelectedWidth,- unsigned int InUserSelectedHeight,- NVSDK_NGX_PerfQuality_Value InPerfQualityValue,- unsigned int *pOutRenderOptimalWidth,- unsigned int *pOutRenderOptimalHeight,- unsigned int *pOutRenderMaxWidth,- unsigned int *pOutRenderMaxHeight,- unsigned int *pOutRenderMinWidth,- unsigned int *pOutRenderMinHeight,- float *pOutSharpness)-{- void *Callback = NULL;- NVSDK_NGX_Parameter_GetVoidPointer(pInParams, NVSDK_NGX_Parameter_DLSSOptimalSettingsCallback, &Callback);- if (!Callback)- {- // Possible reasons for this:- // - Installed DLSS is out of date and does not support the feature we need- // - You used NVSDK_NGX_AllocateParameters() for creating InParams. Try using NVSDK_NGX_GetCapabilityParameters() instead- return NVSDK_NGX_Result_FAIL_OutOfDate;- }-- // These are selections made by user in UI- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_Width, InUserSelectedWidth);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_Height, InUserSelectedHeight);- NVSDK_NGX_Parameter_SetI(pInParams, NVSDK_NGX_Parameter_PerfQualityValue, InPerfQualityValue);- NVSDK_NGX_Parameter_SetI(pInParams, NVSDK_NGX_Parameter_RTXValue, false); // Some older DLSS dlls still expect this value to be set-- NVSDK_NGX_Result Res = NVSDK_NGX_Result_Success;- PFN_NVSDK_NGX_DLSS_GetOptimalSettingsCallback PFNCallback = (PFN_NVSDK_NGX_DLSS_GetOptimalSettingsCallback)Callback;- Res = PFNCallback(pInParams);- if (NVSDK_NGX_FAILED(Res))- {- return Res;- }- NVSDK_NGX_Parameter_GetUI(pInParams, NVSDK_NGX_Parameter_OutWidth, pOutRenderOptimalWidth);- NVSDK_NGX_Parameter_GetUI(pInParams, NVSDK_NGX_Parameter_OutHeight, pOutRenderOptimalHeight);- // If we have an older DLSS Dll those might need to be set to the optimal dimensions instead- *pOutRenderMaxWidth = *pOutRenderOptimalWidth;- *pOutRenderMaxHeight = *pOutRenderOptimalHeight;- *pOutRenderMinWidth = *pOutRenderOptimalWidth;- *pOutRenderMinHeight = *pOutRenderOptimalHeight;- NVSDK_NGX_Parameter_GetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Get_Dynamic_Max_Render_Width, pOutRenderMaxWidth);- NVSDK_NGX_Parameter_GetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Get_Dynamic_Max_Render_Height, pOutRenderMaxHeight);- NVSDK_NGX_Parameter_GetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Get_Dynamic_Min_Render_Width, pOutRenderMinWidth);- NVSDK_NGX_Parameter_GetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Get_Dynamic_Min_Render_Height, pOutRenderMinHeight);- NVSDK_NGX_Parameter_GetF(pInParams, NVSDK_NGX_Parameter_Sharpness, pOutSharpness);- return Res;-}--/*** D3D11 ***/-typedef struct NVSDK_NGX_D3D11_Feature_Eval_Params-{- ID3D11Resource* pInColor;- ID3D11Resource* pInOutput;- /*** OPTIONAL for DLSS ***/- float InSharpness;-} NVSDK_NGX_D3D11_Feature_Eval_Params;--typedef struct NVSDK_NGX_CUDA_Feature_Eval_Params-{- CUtexObject* pInColor;- CUtexObject* pInOutput;- /*** OPTIONAL for DLSS ***/- float InSharpness;-} NVSDK_NGX_CUDA_Feature_Eval_Params;--typedef struct NVSDK_NGX_D3D11_GBuffer-{- ID3D11Resource* pInAttrib[NVSDK_NGX_GBUFFERTYPE_NUM];-} NVSDK_NGX_D3D11_GBuffer;--typedef struct NVSDK_NGX_D3D11_DLSS_Eval_Params-{- NVSDK_NGX_D3D11_Feature_Eval_Params Feature;- ID3D11Resource* pInDepth;- ID3D11Resource* pInMotionVectors;- float InJitterOffsetX; /* Jitter offset must be in input/render pixel space */- float InJitterOffsetY;- NVSDK_NGX_Dimensions InRenderSubrectDimensions;- /*** OPTIONAL - leave to 0/0.0f if unused ***/- int InReset; /* Set to 1 when scene changes completely (new level etc) */- float InMVScaleX; /* If MVs need custom scaling to convert to pixel space */- float InMVScaleY;- ID3D11Resource* pInTransparencyMask; /* Unused/Reserved for future use */- ID3D11Resource* pInExposureTexture;- ID3D11Resource* pInBiasCurrentColorMask;- NVSDK_NGX_Coordinates InColorSubrectBase;- NVSDK_NGX_Coordinates InDepthSubrectBase;- NVSDK_NGX_Coordinates InMVSubrectBase;- NVSDK_NGX_Coordinates InTranslucencySubrectBase;- NVSDK_NGX_Coordinates InBiasCurrentColorSubrectBase;- NVSDK_NGX_Coordinates InOutputSubrectBase;- float InPreExposure;- float InExposureScale;- int InIndicatorInvertXAxis;- int InIndicatorInvertYAxis;- /*** OPTIONAL - only for research purposes ***/- NVSDK_NGX_D3D11_GBuffer GBufferSurface;- NVSDK_NGX_ToneMapperType InToneMapperType;- ID3D11Resource* pInMotionVectors3D;- ID3D11Resource* pInIsParticleMask; /* to identify which pixels contains particles, essentially that are not drawn as part of base pass */- ID3D11Resource* pInAnimatedTextureMask; /* a binary mask covering pixels occupied by animated textures */- ID3D11Resource* pInDepthHighRes;- ID3D11Resource* pInPositionViewSpace;- float InFrameTimeDeltaInMsec; /* helps in determining the amount to denoise or anti-alias based on the speed of the object from motion vector magnitudes and fps as determined by this delta */- ID3D11Resource* pInRayTracingHitDistance; /* for each effect - approximation to the amount of noise in a ray-traced color */- ID3D11Resource* pInMotionVectorsReflections; /* motion vectors of reflected objects like for mirrored surfaces */-} NVSDK_NGX_D3D11_DLSS_Eval_Params;--typedef struct NVSDK_NGX_D3D11_DLISP_Eval_Params-{- NVSDK_NGX_D3D11_Feature_Eval_Params Feature;- /*** OPTIONAL - leave to 0/0.0f if unused ***/- unsigned int InRectX;- unsigned int InRectY;- unsigned int InRectW;- unsigned int InRectH;- float InDenoise;-} NVSDK_NGX_D3D11_DLISP_Eval_Params;--typedef struct NVSDK_NGX_CUDA_DLISP_Eval_Params-{- NVSDK_NGX_CUDA_Feature_Eval_Params Feature;- /*** OPTIONAL - leave to 0/0.0f if unused ***/- unsigned int InRectX;- unsigned int InRectY;- unsigned int InRectW;- unsigned int InRectH;- float InDenoise;-} NVSDK_NGX_CUDA_DLISP_Eval_Params;---static inline NVSDK_NGX_Result NGX_D3D11_CREATE_DLSS_EXT(- ID3D11DeviceContext *pInCtx,- NVSDK_NGX_Handle **ppOutHandle,- NVSDK_NGX_Parameter *pInParams,- NVSDK_NGX_DLSS_Create_Params *pInDlssCreateParams)-{- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_Width, pInDlssCreateParams->Feature.InWidth);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_Height, pInDlssCreateParams->Feature.InHeight);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_OutWidth, pInDlssCreateParams->Feature.InTargetWidth);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_OutHeight, pInDlssCreateParams->Feature.InTargetHeight);- NVSDK_NGX_Parameter_SetI(pInParams, NVSDK_NGX_Parameter_PerfQualityValue, pInDlssCreateParams->Feature.InPerfQualityValue);- NVSDK_NGX_Parameter_SetI(pInParams, NVSDK_NGX_Parameter_DLSS_Feature_Create_Flags, pInDlssCreateParams->InFeatureCreateFlags);- NVSDK_NGX_Parameter_SetI(pInParams, NVSDK_NGX_Parameter_DLSS_Enable_Output_Subrects, pInDlssCreateParams->InEnableOutputSubrects ? 1 : 0);-- return NVSDK_NGX_D3D11_CreateFeature(pInCtx, NVSDK_NGX_Feature_SuperSampling, pInParams, ppOutHandle);-}---static inline NVSDK_NGX_Result NGX_D3D11_EVALUATE_DLSS_EXT(- ID3D11DeviceContext *pInCtx,- NVSDK_NGX_Handle *pInHandle,- NVSDK_NGX_Parameter *pInParams,- NVSDK_NGX_D3D11_DLSS_Eval_Params *pInDlssEvalParams)-{- NVSDK_NGX_Parameter_SetD3d11Resource(pInParams, NVSDK_NGX_Parameter_Color, pInDlssEvalParams->Feature.pInColor);- NVSDK_NGX_Parameter_SetD3d11Resource(pInParams, NVSDK_NGX_Parameter_Output, pInDlssEvalParams->Feature.pInOutput);- NVSDK_NGX_Parameter_SetD3d11Resource(pInParams, NVSDK_NGX_Parameter_Depth, pInDlssEvalParams->pInDepth);- NVSDK_NGX_Parameter_SetD3d11Resource(pInParams, NVSDK_NGX_Parameter_MotionVectors, pInDlssEvalParams->pInMotionVectors);- NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_Parameter_Jitter_Offset_X, pInDlssEvalParams->InJitterOffsetX);- NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_Parameter_Jitter_Offset_Y, pInDlssEvalParams->InJitterOffsetY);- NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_Parameter_Sharpness, pInDlssEvalParams->Feature.InSharpness);- NVSDK_NGX_Parameter_SetI(pInParams, NVSDK_NGX_Parameter_Reset, pInDlssEvalParams->InReset);- NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_Parameter_MV_Scale_X, pInDlssEvalParams->InMVScaleX == 0.0f ? 1.0f : pInDlssEvalParams->InMVScaleX);- NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_Parameter_MV_Scale_Y, pInDlssEvalParams->InMVScaleY == 0.0f ? 1.0f : pInDlssEvalParams->InMVScaleY);- NVSDK_NGX_Parameter_SetD3d11Resource(pInParams, NVSDK_NGX_Parameter_TransparencyMask, pInDlssEvalParams->pInTransparencyMask);- NVSDK_NGX_Parameter_SetD3d11Resource(pInParams, NVSDK_NGX_Parameter_ExposureTexture, pInDlssEvalParams->pInExposureTexture);- NVSDK_NGX_Parameter_SetD3d11Resource(pInParams, NVSDK_NGX_Parameter_DLSS_Input_Bias_Current_Color_Mask, pInDlssEvalParams->pInBiasCurrentColorMask);- NVSDK_NGX_Parameter_SetD3d11Resource(pInParams, NVSDK_NGX_Parameter_GBuffer_Albedo, pInDlssEvalParams->GBufferSurface.pInAttrib[NVSDK_NGX_GBUFFER_ALBEDO]);- NVSDK_NGX_Parameter_SetD3d11Resource(pInParams, NVSDK_NGX_Parameter_GBuffer_Roughness, pInDlssEvalParams->GBufferSurface.pInAttrib[NVSDK_NGX_GBUFFER_ROUGHNESS]);- NVSDK_NGX_Parameter_SetD3d11Resource(pInParams, NVSDK_NGX_Parameter_GBuffer_Metallic, pInDlssEvalParams->GBufferSurface.pInAttrib[NVSDK_NGX_GBUFFER_METALLIC]);- NVSDK_NGX_Parameter_SetD3d11Resource(pInParams, NVSDK_NGX_Parameter_GBuffer_Specular, pInDlssEvalParams->GBufferSurface.pInAttrib[NVSDK_NGX_GBUFFER_SPECULAR]);- NVSDK_NGX_Parameter_SetD3d11Resource(pInParams, NVSDK_NGX_Parameter_GBuffer_Subsurface, pInDlssEvalParams->GBufferSurface.pInAttrib[NVSDK_NGX_GBUFFER_SUBSURFACE]);- NVSDK_NGX_Parameter_SetD3d11Resource(pInParams, NVSDK_NGX_Parameter_GBuffer_Normals, pInDlssEvalParams->GBufferSurface.pInAttrib[NVSDK_NGX_GBUFFER_NORMALS]);- NVSDK_NGX_Parameter_SetD3d11Resource(pInParams, NVSDK_NGX_Parameter_GBuffer_ShadingModelId, pInDlssEvalParams->GBufferSurface.pInAttrib[NVSDK_NGX_GBUFFER_SHADINGMODELID]);- NVSDK_NGX_Parameter_SetD3d11Resource(pInParams, NVSDK_NGX_Parameter_GBuffer_MaterialId, pInDlssEvalParams->GBufferSurface.pInAttrib[NVSDK_NGX_GBUFFER_MATERIALID]);- NVSDK_NGX_Parameter_SetD3d11Resource(pInParams, NVSDK_NGX_Parameter_GBuffer_Atrrib_8, pInDlssEvalParams->GBufferSurface.pInAttrib[8]);- NVSDK_NGX_Parameter_SetD3d11Resource(pInParams, NVSDK_NGX_Parameter_GBuffer_Atrrib_9, pInDlssEvalParams->GBufferSurface.pInAttrib[9]);- NVSDK_NGX_Parameter_SetD3d11Resource(pInParams, NVSDK_NGX_Parameter_GBuffer_Atrrib_10, pInDlssEvalParams->GBufferSurface.pInAttrib[10]);- NVSDK_NGX_Parameter_SetD3d11Resource(pInParams, NVSDK_NGX_Parameter_GBuffer_Atrrib_11, pInDlssEvalParams->GBufferSurface.pInAttrib[11]);- NVSDK_NGX_Parameter_SetD3d11Resource(pInParams, NVSDK_NGX_Parameter_GBuffer_Atrrib_12, pInDlssEvalParams->GBufferSurface.pInAttrib[12]);- NVSDK_NGX_Parameter_SetD3d11Resource(pInParams, NVSDK_NGX_Parameter_GBuffer_Atrrib_13, pInDlssEvalParams->GBufferSurface.pInAttrib[13]);- NVSDK_NGX_Parameter_SetD3d11Resource(pInParams, NVSDK_NGX_Parameter_GBuffer_Atrrib_14, pInDlssEvalParams->GBufferSurface.pInAttrib[14]);- NVSDK_NGX_Parameter_SetD3d11Resource(pInParams, NVSDK_NGX_Parameter_GBuffer_Atrrib_15, pInDlssEvalParams->GBufferSurface.pInAttrib[15]);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_TonemapperType, pInDlssEvalParams->InToneMapperType);- NVSDK_NGX_Parameter_SetD3d11Resource(pInParams, NVSDK_NGX_Parameter_MotionVectors3D, pInDlssEvalParams->pInMotionVectors3D);- NVSDK_NGX_Parameter_SetD3d11Resource(pInParams, NVSDK_NGX_Parameter_IsParticleMask, pInDlssEvalParams->pInIsParticleMask);- NVSDK_NGX_Parameter_SetD3d11Resource(pInParams, NVSDK_NGX_Parameter_AnimatedTextureMask, pInDlssEvalParams->pInAnimatedTextureMask);- NVSDK_NGX_Parameter_SetD3d11Resource(pInParams, NVSDK_NGX_Parameter_DepthHighRes, pInDlssEvalParams->pInDepthHighRes);- NVSDK_NGX_Parameter_SetD3d11Resource(pInParams, NVSDK_NGX_Parameter_Position_ViewSpace, pInDlssEvalParams->pInPositionViewSpace);- NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_Parameter_FrameTimeDeltaInMsec, pInDlssEvalParams->InFrameTimeDeltaInMsec);- NVSDK_NGX_Parameter_SetD3d11Resource(pInParams, NVSDK_NGX_Parameter_RayTracingHitDistance, pInDlssEvalParams->pInRayTracingHitDistance);- NVSDK_NGX_Parameter_SetD3d11Resource(pInParams, NVSDK_NGX_Parameter_MotionVectorsReflection, pInDlssEvalParams->pInMotionVectorsReflections);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Input_Color_Subrect_Base_X, pInDlssEvalParams->InColorSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Input_Color_Subrect_Base_Y, pInDlssEvalParams->InColorSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Input_Depth_Subrect_Base_X, pInDlssEvalParams->InDepthSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Input_Depth_Subrect_Base_Y, pInDlssEvalParams->InDepthSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Input_MV_SubrectBase_X, pInDlssEvalParams->InMVSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Input_MV_SubrectBase_Y, pInDlssEvalParams->InMVSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Input_Translucency_SubrectBase_X, pInDlssEvalParams->InTranslucencySubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Input_Translucency_SubrectBase_Y, pInDlssEvalParams->InTranslucencySubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Input_Bias_Current_Color_SubrectBase_X, pInDlssEvalParams->InBiasCurrentColorSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Input_Bias_Current_Color_SubrectBase_Y, pInDlssEvalParams->InBiasCurrentColorSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Output_Subrect_Base_X, pInDlssEvalParams->InOutputSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Output_Subrect_Base_Y, pInDlssEvalParams->InOutputSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Render_Subrect_Dimensions_Width , pInDlssEvalParams->InRenderSubrectDimensions.Width);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Render_Subrect_Dimensions_Height, pInDlssEvalParams->InRenderSubrectDimensions.Height);- NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_Parameter_DLSS_Pre_Exposure, pInDlssEvalParams->InPreExposure == 0.0f ? 1.0f : pInDlssEvalParams->InPreExposure);- NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_Parameter_DLSS_Exposure_Scale, pInDlssEvalParams->InExposureScale == 0.0f ? 1.0f : pInDlssEvalParams->InExposureScale);- NVSDK_NGX_Parameter_SetI(pInParams, NVSDK_NGX_Parameter_DLSS_Indicator_Invert_X_Axis, pInDlssEvalParams->InIndicatorInvertXAxis);- NVSDK_NGX_Parameter_SetI(pInParams, NVSDK_NGX_Parameter_DLSS_Indicator_Invert_Y_Axis, pInDlssEvalParams->InIndicatorInvertYAxis);-- return NVSDK_NGX_D3D11_EvaluateFeature_C(pInCtx, pInHandle, pInParams, NULL);-}--static inline NVSDK_NGX_Result NGX_D3D11_CREATE_DLISP_EXT(- ID3D11DeviceContext *pInCtx,- NVSDK_NGX_Handle **ppOutHandle,- NVSDK_NGX_Parameter *pInParams,- NVSDK_NGX_Feature_Create_Params *pDlispCreateParams)-{- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_Width, pDlispCreateParams->InWidth);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_Height, pDlispCreateParams->InHeight);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_OutWidth, pDlispCreateParams->InTargetWidth);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_OutHeight, pDlispCreateParams->InTargetHeight);-- return NVSDK_NGX_D3D11_CreateFeature(pInCtx, NVSDK_NGX_Feature_ImageSignalProcessing, pInParams, ppOutHandle);-}--static inline NVSDK_NGX_Result NGX_CUDA_CREATE_DLISP_EXT(- NVSDK_NGX_Handle** ppOutHandle,- NVSDK_NGX_Parameter* pInParams,- NVSDK_NGX_Feature_Create_Params* pDlispCreateParams)-{- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_Width, pDlispCreateParams->InWidth);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_Height, pDlispCreateParams->InHeight);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_OutWidth, pDlispCreateParams->InTargetWidth);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_OutHeight, pDlispCreateParams->InTargetHeight);-- return NVSDK_NGX_CUDA_CreateFeature(NVSDK_NGX_Feature_ImageSignalProcessing, pInParams, ppOutHandle);-}--static inline NVSDK_NGX_Result NGX_D3D11_EVALUATE_DLISP_EXT(- ID3D11DeviceContext *pInCtx,- NVSDK_NGX_Handle *pInHandle,- NVSDK_NGX_Parameter *pInParams,- NVSDK_NGX_D3D11_DLISP_Eval_Params *pDlispEvalParams)-{- if (pDlispEvalParams->Feature.InSharpness < 0.0f || pDlispEvalParams->Feature.InSharpness > 1.0f || pDlispEvalParams->InDenoise < 0.0f || pDlispEvalParams->InDenoise > 1.0f)- {- return NVSDK_NGX_Result_FAIL_InvalidParameter;- }- NVSDK_NGX_Parameter_SetD3d11Resource(pInParams, NVSDK_NGX_Parameter_Color, pDlispEvalParams->Feature.pInColor);- NVSDK_NGX_Parameter_SetD3d11Resource(pInParams, NVSDK_NGX_Parameter_Output, pDlispEvalParams->Feature.pInOutput);- // Both sharpness and denoise in range [0.0f,1.0f]- NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_Parameter_Sharpness, pDlispEvalParams->Feature.InSharpness);- NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_Parameter_Denoise, pDlispEvalParams->InDenoise);- // If input is atlas - use RECT to upscale only the required area- if (pDlispEvalParams->InRectW)- {- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_Rect_X, pDlispEvalParams->InRectX);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_Rect_Y, pDlispEvalParams->InRectY);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_Rect_W, pDlispEvalParams->InRectW);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_Rect_H, pDlispEvalParams->InRectH);- }-- return NVSDK_NGX_D3D11_EvaluateFeature_C(pInCtx, pInHandle, pInParams, NULL);-}--static inline NVSDK_NGX_Result NGX_CUDA_EVALUATE_DLISP_EXT(- NVSDK_NGX_Handle *pInHandle,- NVSDK_NGX_Parameter *pInParams,- NVSDK_NGX_CUDA_DLISP_Eval_Params *pDlispEvalParams)-{- if (pDlispEvalParams->Feature.InSharpness < 0.0f || pDlispEvalParams->Feature.InSharpness > 1.0f || pDlispEvalParams->InDenoise < 0.0f || pDlispEvalParams->InDenoise > 1.0f)- {- return NVSDK_NGX_Result_FAIL_InvalidParameter;- }- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_Color, pDlispEvalParams->Feature.pInColor);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_Output, pDlispEvalParams->Feature.pInOutput);- // Both sharpness and denoise in range [0.0f,1.0f]- NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_Parameter_Sharpness, pDlispEvalParams->Feature.InSharpness);- NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_Parameter_Denoise, pDlispEvalParams->InDenoise);- // If input is atlas - use RECT to upscale only the required area- if (pDlispEvalParams->InRectW)- {- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_Rect_X, pDlispEvalParams->InRectX);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_Rect_Y, pDlispEvalParams->InRectY);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_Rect_W, pDlispEvalParams->InRectW);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_Rect_H, pDlispEvalParams->InRectH);- }-- return NVSDK_NGX_CUDA_EvaluateFeature_C(pInHandle, pInParams, NULL);-}--/*** D3D12 ***/-typedef struct NVSDK_NGX_D3D12_Feature_Eval_Params-{- ID3D12Resource* pInColor;- ID3D12Resource* pInOutput;- /*** OPTIONAL for DLSS ***/- float InSharpness;-} NVSDK_NGX_D3D12_Feature_Eval_Params;--typedef struct NVSDK_NGX_D3D12_GBuffer-{- ID3D12Resource* pInAttrib[NVSDK_NGX_GBUFFERTYPE_NUM];-} NVSDK_NGX_D3D12_GBuffer;--typedef struct NVSDK_NGX_D3D12_DLSS_Eval_Params-{- NVSDK_NGX_D3D12_Feature_Eval_Params Feature;- ID3D12Resource* pInDepth;- ID3D12Resource* pInMotionVectors;- float InJitterOffsetX; /* Jitter offset must be in input/render pixel space */- float InJitterOffsetY;- NVSDK_NGX_Dimensions InRenderSubrectDimensions;- /*** OPTIONAL - leave to 0/0.0f if unused ***/- int InReset; /* Set to 1 when scene changes completely (new level etc) */- float InMVScaleX; /* If MVs need custom scaling to convert to pixel space */- float InMVScaleY;- ID3D12Resource* pInTransparencyMask; /* Unused/Reserved for future use */- ID3D12Resource* pInExposureTexture;- ID3D12Resource* pInBiasCurrentColorMask;- NVSDK_NGX_Coordinates InColorSubrectBase;- NVSDK_NGX_Coordinates InDepthSubrectBase;- NVSDK_NGX_Coordinates InMVSubrectBase;- NVSDK_NGX_Coordinates InTranslucencySubrectBase;- NVSDK_NGX_Coordinates InBiasCurrentColorSubrectBase;- NVSDK_NGX_Coordinates InOutputSubrectBase;- float InPreExposure;- float InExposureScale;- int InIndicatorInvertXAxis;- int InIndicatorInvertYAxis;- /*** OPTIONAL - only for research purposes ***/- NVSDK_NGX_D3D12_GBuffer GBufferSurface;- NVSDK_NGX_ToneMapperType InToneMapperType;- ID3D12Resource* pInMotionVectors3D;- ID3D12Resource* pInIsParticleMask; /* to identify which pixels contains particles, essentially that are not drawn as part of base pass */- ID3D12Resource* pInAnimatedTextureMask; /* a binary mask covering pixels occupied by animated textures */- ID3D12Resource* pInDepthHighRes;- ID3D12Resource* pInPositionViewSpace;- float InFrameTimeDeltaInMsec; /* helps in determining the amount to denoise or anti-alias based on the speed of the object from motion vector magnitudes and fps as determined by this delta */- ID3D12Resource* pInRayTracingHitDistance; /* for each effect - approximation to the amount of noise in a ray-traced color */- ID3D12Resource* pInMotionVectorsReflections; /* motion vectors of reflected objects like for mirrored surfaces */-} NVSDK_NGX_D3D12_DLSS_Eval_Params;--typedef struct NVSDK_NGX_D3D12_DLISP_Eval_Params-{- NVSDK_NGX_D3D12_Feature_Eval_Params Feature;- /*** OPTIONAL ***/- unsigned int InRectX;- unsigned int InRectY;- unsigned int InRectW;- unsigned int InRectH;- float InDenoise;-} NVSDK_NGX_D3D12_DLISP_Eval_Params;---static inline NVSDK_NGX_Result NGX_D3D12_CREATE_DLSS_EXT(- ID3D12GraphicsCommandList *pInCmdList,- unsigned int InCreationNodeMask,- unsigned int InVisibilityNodeMask,- NVSDK_NGX_Handle **ppOutHandle,- NVSDK_NGX_Parameter *pInParams,- NVSDK_NGX_DLSS_Create_Params *pInDlssCreateParams)-{- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_CreationNodeMask, InCreationNodeMask);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_VisibilityNodeMask, InVisibilityNodeMask);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_Width, pInDlssCreateParams->Feature.InWidth);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_Height, pInDlssCreateParams->Feature.InHeight);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_OutWidth, pInDlssCreateParams->Feature.InTargetWidth);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_OutHeight, pInDlssCreateParams->Feature.InTargetHeight);- NVSDK_NGX_Parameter_SetI(pInParams, NVSDK_NGX_Parameter_PerfQualityValue, pInDlssCreateParams->Feature.InPerfQualityValue);- NVSDK_NGX_Parameter_SetI(pInParams, NVSDK_NGX_Parameter_DLSS_Feature_Create_Flags, pInDlssCreateParams->InFeatureCreateFlags);- NVSDK_NGX_Parameter_SetI(pInParams, NVSDK_NGX_Parameter_DLSS_Enable_Output_Subrects, pInDlssCreateParams->InEnableOutputSubrects ? 1 : 0);-- return NVSDK_NGX_D3D12_CreateFeature(pInCmdList, NVSDK_NGX_Feature_SuperSampling, pInParams, ppOutHandle);-}---static inline NVSDK_NGX_Result NGX_D3D12_EVALUATE_DLSS_EXT(- ID3D12GraphicsCommandList *pInCmdList,- NVSDK_NGX_Handle *pInHandle,- NVSDK_NGX_Parameter *pInParams,- NVSDK_NGX_D3D12_DLSS_Eval_Params *pInDlssEvalParams)-{- NVSDK_NGX_Parameter_SetD3d12Resource(pInParams, NVSDK_NGX_Parameter_Color, pInDlssEvalParams->Feature.pInColor);- NVSDK_NGX_Parameter_SetD3d12Resource(pInParams, NVSDK_NGX_Parameter_Output, pInDlssEvalParams->Feature.pInOutput);- NVSDK_NGX_Parameter_SetD3d12Resource(pInParams, NVSDK_NGX_Parameter_Depth, pInDlssEvalParams->pInDepth);- NVSDK_NGX_Parameter_SetD3d12Resource(pInParams, NVSDK_NGX_Parameter_MotionVectors, pInDlssEvalParams->pInMotionVectors);- NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_Parameter_Jitter_Offset_X, pInDlssEvalParams->InJitterOffsetX);- NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_Parameter_Jitter_Offset_Y, pInDlssEvalParams->InJitterOffsetY);- NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_Parameter_Sharpness, pInDlssEvalParams->Feature.InSharpness);- NVSDK_NGX_Parameter_SetI(pInParams, NVSDK_NGX_Parameter_Reset, pInDlssEvalParams->InReset);- NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_Parameter_MV_Scale_X, pInDlssEvalParams->InMVScaleX == 0.0f ? 1.0f : pInDlssEvalParams->InMVScaleX);- NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_Parameter_MV_Scale_Y, pInDlssEvalParams->InMVScaleY == 0.0f ? 1.0f : pInDlssEvalParams->InMVScaleY);- NVSDK_NGX_Parameter_SetD3d12Resource(pInParams, NVSDK_NGX_Parameter_TransparencyMask, pInDlssEvalParams->pInTransparencyMask);- NVSDK_NGX_Parameter_SetD3d12Resource(pInParams, NVSDK_NGX_Parameter_ExposureTexture, pInDlssEvalParams->pInExposureTexture);- NVSDK_NGX_Parameter_SetD3d12Resource(pInParams, NVSDK_NGX_Parameter_DLSS_Input_Bias_Current_Color_Mask, pInDlssEvalParams->pInBiasCurrentColorMask);- NVSDK_NGX_Parameter_SetD3d12Resource(pInParams, NVSDK_NGX_Parameter_GBuffer_Albedo, pInDlssEvalParams->GBufferSurface.pInAttrib[NVSDK_NGX_GBUFFER_ALBEDO]);- NVSDK_NGX_Parameter_SetD3d12Resource(pInParams, NVSDK_NGX_Parameter_GBuffer_Roughness, pInDlssEvalParams->GBufferSurface.pInAttrib[NVSDK_NGX_GBUFFER_ROUGHNESS]);- NVSDK_NGX_Parameter_SetD3d12Resource(pInParams, NVSDK_NGX_Parameter_GBuffer_Metallic, pInDlssEvalParams->GBufferSurface.pInAttrib[NVSDK_NGX_GBUFFER_METALLIC]);- NVSDK_NGX_Parameter_SetD3d12Resource(pInParams, NVSDK_NGX_Parameter_GBuffer_Specular, pInDlssEvalParams->GBufferSurface.pInAttrib[NVSDK_NGX_GBUFFER_SPECULAR]);- NVSDK_NGX_Parameter_SetD3d12Resource(pInParams, NVSDK_NGX_Parameter_GBuffer_Subsurface, pInDlssEvalParams->GBufferSurface.pInAttrib[NVSDK_NGX_GBUFFER_SUBSURFACE]);- NVSDK_NGX_Parameter_SetD3d12Resource(pInParams, NVSDK_NGX_Parameter_GBuffer_Normals, pInDlssEvalParams->GBufferSurface.pInAttrib[NVSDK_NGX_GBUFFER_NORMALS]);- NVSDK_NGX_Parameter_SetD3d12Resource(pInParams, NVSDK_NGX_Parameter_GBuffer_ShadingModelId, pInDlssEvalParams->GBufferSurface.pInAttrib[NVSDK_NGX_GBUFFER_SHADINGMODELID]);- NVSDK_NGX_Parameter_SetD3d12Resource(pInParams, NVSDK_NGX_Parameter_GBuffer_MaterialId, pInDlssEvalParams->GBufferSurface.pInAttrib[NVSDK_NGX_GBUFFER_MATERIALID]);- NVSDK_NGX_Parameter_SetD3d12Resource(pInParams, NVSDK_NGX_Parameter_GBuffer_Atrrib_8, pInDlssEvalParams->GBufferSurface.pInAttrib[8]);- NVSDK_NGX_Parameter_SetD3d12Resource(pInParams, NVSDK_NGX_Parameter_GBuffer_Atrrib_9, pInDlssEvalParams->GBufferSurface.pInAttrib[9]);- NVSDK_NGX_Parameter_SetD3d12Resource(pInParams, NVSDK_NGX_Parameter_GBuffer_Atrrib_10, pInDlssEvalParams->GBufferSurface.pInAttrib[10]);- NVSDK_NGX_Parameter_SetD3d12Resource(pInParams, NVSDK_NGX_Parameter_GBuffer_Atrrib_11, pInDlssEvalParams->GBufferSurface.pInAttrib[11]);- NVSDK_NGX_Parameter_SetD3d12Resource(pInParams, NVSDK_NGX_Parameter_GBuffer_Atrrib_12, pInDlssEvalParams->GBufferSurface.pInAttrib[12]);- NVSDK_NGX_Parameter_SetD3d12Resource(pInParams, NVSDK_NGX_Parameter_GBuffer_Atrrib_13, pInDlssEvalParams->GBufferSurface.pInAttrib[13]);- NVSDK_NGX_Parameter_SetD3d12Resource(pInParams, NVSDK_NGX_Parameter_GBuffer_Atrrib_14, pInDlssEvalParams->GBufferSurface.pInAttrib[14]);- NVSDK_NGX_Parameter_SetD3d12Resource(pInParams, NVSDK_NGX_Parameter_GBuffer_Atrrib_15, pInDlssEvalParams->GBufferSurface.pInAttrib[15]);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_TonemapperType, pInDlssEvalParams->InToneMapperType);- NVSDK_NGX_Parameter_SetD3d12Resource(pInParams, NVSDK_NGX_Parameter_MotionVectors3D, pInDlssEvalParams->pInMotionVectors3D);- NVSDK_NGX_Parameter_SetD3d12Resource(pInParams, NVSDK_NGX_Parameter_IsParticleMask, pInDlssEvalParams->pInIsParticleMask);- NVSDK_NGX_Parameter_SetD3d12Resource(pInParams, NVSDK_NGX_Parameter_AnimatedTextureMask, pInDlssEvalParams->pInAnimatedTextureMask);- NVSDK_NGX_Parameter_SetD3d12Resource(pInParams, NVSDK_NGX_Parameter_DepthHighRes, pInDlssEvalParams->pInDepthHighRes);- NVSDK_NGX_Parameter_SetD3d12Resource(pInParams, NVSDK_NGX_Parameter_Position_ViewSpace, pInDlssEvalParams->pInPositionViewSpace);- NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_Parameter_FrameTimeDeltaInMsec, pInDlssEvalParams->InFrameTimeDeltaInMsec);- NVSDK_NGX_Parameter_SetD3d12Resource(pInParams, NVSDK_NGX_Parameter_RayTracingHitDistance, pInDlssEvalParams->pInRayTracingHitDistance);- NVSDK_NGX_Parameter_SetD3d12Resource(pInParams, NVSDK_NGX_Parameter_MotionVectorsReflection, pInDlssEvalParams->pInMotionVectorsReflections);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Input_Color_Subrect_Base_X, pInDlssEvalParams->InColorSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Input_Color_Subrect_Base_Y, pInDlssEvalParams->InColorSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Input_Depth_Subrect_Base_X, pInDlssEvalParams->InDepthSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Input_Depth_Subrect_Base_Y, pInDlssEvalParams->InDepthSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Input_MV_SubrectBase_X, pInDlssEvalParams->InMVSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Input_MV_SubrectBase_Y, pInDlssEvalParams->InMVSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Input_Translucency_SubrectBase_X, pInDlssEvalParams->InTranslucencySubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Input_Translucency_SubrectBase_Y, pInDlssEvalParams->InTranslucencySubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Input_Bias_Current_Color_SubrectBase_X, pInDlssEvalParams->InBiasCurrentColorSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Input_Bias_Current_Color_SubrectBase_Y, pInDlssEvalParams->InBiasCurrentColorSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Output_Subrect_Base_X, pInDlssEvalParams->InOutputSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Output_Subrect_Base_Y, pInDlssEvalParams->InOutputSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Render_Subrect_Dimensions_Width , pInDlssEvalParams->InRenderSubrectDimensions.Width);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Render_Subrect_Dimensions_Height, pInDlssEvalParams->InRenderSubrectDimensions.Height);- NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_Parameter_DLSS_Pre_Exposure, pInDlssEvalParams->InPreExposure == 0.0f ? 1.0f : pInDlssEvalParams->InPreExposure);- NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_Parameter_DLSS_Exposure_Scale, pInDlssEvalParams->InExposureScale == 0.0f ? 1.0f : pInDlssEvalParams->InExposureScale);- NVSDK_NGX_Parameter_SetI(pInParams, NVSDK_NGX_Parameter_DLSS_Indicator_Invert_X_Axis, pInDlssEvalParams->InIndicatorInvertXAxis);- NVSDK_NGX_Parameter_SetI(pInParams, NVSDK_NGX_Parameter_DLSS_Indicator_Invert_Y_Axis, pInDlssEvalParams->InIndicatorInvertYAxis);-- return NVSDK_NGX_D3D12_EvaluateFeature_C(pInCmdList, pInHandle, pInParams, NULL);-}--static inline NVSDK_NGX_Result NGX_D3D12_CREATE_DLISP_EXT(- ID3D12GraphicsCommandList *InCmdList,- unsigned int InCreationNodeMask,- unsigned int InVisibilityNodeMask,- NVSDK_NGX_Handle **ppOutHandle,- NVSDK_NGX_Parameter *pInParams,- NVSDK_NGX_Feature_Create_Params *pDlispCreateParams)-{- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_CreationNodeMask, InCreationNodeMask);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_VisibilityNodeMask, InVisibilityNodeMask);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_Width, pDlispCreateParams->InWidth);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_Height, pDlispCreateParams->InHeight);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_OutWidth, pDlispCreateParams->InTargetWidth);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_OutHeight, pDlispCreateParams->InTargetHeight);- NVSDK_NGX_Parameter_SetI(pInParams, NVSDK_NGX_Parameter_PerfQualityValue, pDlispCreateParams->InPerfQualityValue);-- return NVSDK_NGX_D3D12_CreateFeature(InCmdList, NVSDK_NGX_Feature_ImageSignalProcessing, pInParams, ppOutHandle);-}--static inline NVSDK_NGX_Result NGX_D3D12_EVALUATE_DLISP_EXT(- ID3D12GraphicsCommandList *pInCmdList,- NVSDK_NGX_Handle *pInHandle,- NVSDK_NGX_Parameter *pInParams,- NVSDK_NGX_D3D12_DLISP_Eval_Params *pDlispEvalParams)-{- if (pDlispEvalParams->Feature.InSharpness < 0.0f || pDlispEvalParams->Feature.InSharpness > 1.0f || pDlispEvalParams->InDenoise < 0.0f || pDlispEvalParams->InDenoise > 1.0f)- {- return NVSDK_NGX_Result_FAIL_InvalidParameter;- }- NVSDK_NGX_Parameter_SetD3d12Resource(pInParams, NVSDK_NGX_Parameter_Color, pDlispEvalParams->Feature.pInColor);- NVSDK_NGX_Parameter_SetD3d12Resource(pInParams, NVSDK_NGX_Parameter_Output, pDlispEvalParams->Feature.pInOutput);- // Both sharpness and denoise in range [0.0f,1.0f]- NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_Parameter_Sharpness, pDlispEvalParams->Feature.InSharpness);- NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_Parameter_Denoise, pDlispEvalParams->InDenoise);- // If input is atlas - use RECT to upscale only the required area- if (pDlispEvalParams->InRectW)- {- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_Rect_X, pDlispEvalParams->InRectX);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_Rect_Y, pDlispEvalParams->InRectY);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_Rect_W, pDlispEvalParams->InRectW);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_Rect_H, pDlispEvalParams->InRectH);- }- return NVSDK_NGX_D3D12_EvaluateFeature_C(pInCmdList, pInHandle, pInParams, NULL);-}-#endifdiff --git a/native/NVIDIA-DLSS/include/nvsdk_ngx_helpers_dlssd.h b/native/NVIDIA-DLSS/include/nvsdk_ngx_helpers_dlssd.hdeleted file mode 100644index ae80408..0000000--- a/native/NVIDIA-DLSS/include/nvsdk_ngx_helpers_dlssd.h+++ /dev/null@@ -1,721 +0,0 @@-/*- * SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.- * SPDX-License-Identifier: LicenseRef-NvidiaProprietary- *- * NVIDIA CORPORATION, its affiliates and licensors retain all intellectual- * property and proprietary rights in and to this material, related- * documentation and any modifications thereto. Any use, reproduction,- * disclosure or distribution of this material and related documentation- * without an express license agreement from NVIDIA CORPORATION or- * its affiliates is strictly prohibited.- */--#ifndef NVSDK_NGX_HELPERS_DLSSD_H-#define NVSDK_NGX_HELPERS_DLSSD_H-#pragma once--#include "nvsdk_ngx_helpers.h"-#include "nvsdk_ngx_defs_dlssd.h"-#include "nvsdk_ngx_params_dlssd.h"--static inline NVSDK_NGX_Result NGX_DLSSD_GET_STATS_2(- NVSDK_NGX_Parameter* pInParams,- unsigned long long* pVRAMAllocatedBytes,- unsigned int* pOptLevel, unsigned int* IsDevSnippetBranch)-{- void* Callback = NULL;- NVSDK_NGX_Parameter_GetVoidPointer(pInParams, NVSDK_NGX_Parameter_DLSSDGetStatsCallback, &Callback);- if (!Callback)- {- // Possible reasons for this:- // - Installed DLSS is out of date and does not support the feature we need- // - You used NVSDK_NGX_AllocateParameters() for creating InParams. Try using NVSDK_NGX_GetCapabilityParameters() instead- return NVSDK_NGX_Result_FAIL_OutOfDate;- }-- NVSDK_NGX_Result Res = NVSDK_NGX_Result_Success;- PFN_NVSDK_NGX_DLSS_GetStatsCallback PFNCallback = (PFN_NVSDK_NGX_DLSS_GetStatsCallback)Callback;- Res = PFNCallback(pInParams);- if (NVSDK_NGX_FAILED(Res))- {- return Res;- }- NVSDK_NGX_Parameter_GetULL(pInParams, NVSDK_NGX_Parameter_SizeInBytes, pVRAMAllocatedBytes);- NVSDK_NGX_Parameter_GetUI(pInParams, NVSDK_NGX_EParameter_OptLevel, pOptLevel);- NVSDK_NGX_Parameter_GetUI(pInParams, NVSDK_NGX_EParameter_IsDevSnippetBranch, IsDevSnippetBranch);- return Res;-}--static inline NVSDK_NGX_Result NGX_DLSSD_GET_STATS_1(- NVSDK_NGX_Parameter* pInParams,- unsigned long long* pVRAMAllocatedBytes,- unsigned int* pOptLevel)-{- unsigned int dummy = 0;- return NGX_DLSSD_GET_STATS_2(pInParams, pVRAMAllocatedBytes, pOptLevel, &dummy);-}--static inline NVSDK_NGX_Result NGX_DLSSD_GET_STATS(- NVSDK_NGX_Parameter* pInParams,- unsigned long long* pVRAMAllocatedBytes)-{- unsigned int dummy = 0;- return NGX_DLSSD_GET_STATS_2(pInParams, pVRAMAllocatedBytes, &dummy, &dummy);-}--static inline NVSDK_NGX_Result NGX_DLSSD_GET_OPTIMAL_SETTINGS(- NVSDK_NGX_Parameter* pInParams,- unsigned int InUserSelectedWidth,- unsigned int InUserSelectedHeight,- NVSDK_NGX_PerfQuality_Value InPerfQualityValue,- unsigned int* pOutRenderOptimalWidth,- unsigned int* pOutRenderOptimalHeight,- unsigned int* pOutRenderMaxWidth,- unsigned int* pOutRenderMaxHeight,- unsigned int* pOutRenderMinWidth,- unsigned int* pOutRenderMinHeight,- float* pOutSharpness)-{- void* Callback = NULL;- NVSDK_NGX_Parameter_GetVoidPointer(pInParams, NVSDK_NGX_Parameter_DLSSDOptimalSettingsCallback, &Callback);- if (!Callback)- {- // Possible reasons for this:- // - Installed DLSS is out of date and does not support the feature we need- // - You used NVSDK_NGX_AllocateParameters() for creating InParams. Try using NVSDK_NGX_GetCapabilityParameters() instead- return NVSDK_NGX_Result_FAIL_OutOfDate;- }-- // These are selections made by user in UI- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_Width, InUserSelectedWidth);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_Height, InUserSelectedHeight);- NVSDK_NGX_Parameter_SetI(pInParams, NVSDK_NGX_Parameter_PerfQualityValue, InPerfQualityValue);- NVSDK_NGX_Parameter_SetI(pInParams, NVSDK_NGX_Parameter_RTXValue, false); // Some older DLSS dlls still expect this value to be set-- NVSDK_NGX_Result Res = NVSDK_NGX_Result_Success;- PFN_NVSDK_NGX_DLSS_GetOptimalSettingsCallback PFNCallback = (PFN_NVSDK_NGX_DLSS_GetOptimalSettingsCallback)Callback;- Res = PFNCallback(pInParams);- if (NVSDK_NGX_FAILED(Res))- {- return Res;- }- NVSDK_NGX_Parameter_GetUI(pInParams, NVSDK_NGX_Parameter_OutWidth, pOutRenderOptimalWidth);- NVSDK_NGX_Parameter_GetUI(pInParams, NVSDK_NGX_Parameter_OutHeight, pOutRenderOptimalHeight);- // If we have an older DLSS Dll those might need to be set to the optimal dimensions instead- *pOutRenderMaxWidth = *pOutRenderOptimalWidth;- *pOutRenderMaxHeight = *pOutRenderOptimalHeight;- *pOutRenderMinWidth = *pOutRenderOptimalWidth;- *pOutRenderMinHeight = *pOutRenderOptimalHeight;- NVSDK_NGX_Parameter_GetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Get_Dynamic_Max_Render_Width, pOutRenderMaxWidth);- NVSDK_NGX_Parameter_GetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Get_Dynamic_Max_Render_Height, pOutRenderMaxHeight);- NVSDK_NGX_Parameter_GetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Get_Dynamic_Min_Render_Width, pOutRenderMinWidth);- NVSDK_NGX_Parameter_GetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Get_Dynamic_Min_Render_Height, pOutRenderMinHeight);- NVSDK_NGX_Parameter_GetF(pInParams, NVSDK_NGX_Parameter_Sharpness, pOutSharpness);- return Res;-}--typedef struct NVSDK_NGX_D3D11_DLSSD_Eval_Params-{- ID3D11Resource* pInDiffuseAlbedo;- ID3D11Resource* pInSpecularAlbedo;- ID3D11Resource* pInNormals;- ID3D11Resource* pInRoughness;-- ID3D11Resource* pInColor;- ID3D11Resource* pInAlpha;- ID3D11Resource* pInOutput;- ID3D11Resource* pInOutputAlpha;- ID3D11Resource* pInDepth;- ID3D11Resource* pInMotionVectors;- float InJitterOffsetX; /* Jitter offset must be in input/render pixel space */- float InJitterOffsetY;- NVSDK_NGX_Dimensions InRenderSubrectDimensions;- /*** OPTIONAL - leave to 0/0.0f if unused ***/- int InReset; /* Set to 1 when scene changes completely (new level etc) */- float InMVScaleX; /* If MVs need custom scaling to convert to pixel space */- float InMVScaleY;- ID3D11Resource* pInTransparencyMask; /* Unused/Reserved for future use */- ID3D11Resource* pInExposureTexture;- ID3D11Resource* pInBiasCurrentColorMask;- NVSDK_NGX_Coordinates InAlphaSubrectBase;- NVSDK_NGX_Coordinates InOutputAlphaSubrectBase;- NVSDK_NGX_Coordinates InDiffuseAlbedoSubrectBase;- NVSDK_NGX_Coordinates InSpecularAlbedoSubrectBase;- NVSDK_NGX_Coordinates InNormalsSubrectBase;- NVSDK_NGX_Coordinates InRoughnessSubrectBase;- NVSDK_NGX_Coordinates InColorSubrectBase;- NVSDK_NGX_Coordinates InDepthSubrectBase;- NVSDK_NGX_Coordinates InMVSubrectBase;- NVSDK_NGX_Coordinates InTranslucencySubrectBase;- NVSDK_NGX_Coordinates InBiasCurrentColorSubrectBase;- NVSDK_NGX_Coordinates InOutputSubrectBase;-- ID3D11Resource* pInReflectedAlbedo;- ID3D11Resource* pInColorBeforeParticles;- ID3D11Resource* pInColorAfterParticles;- ID3D11Resource* pInColorBeforeTransparency;- ID3D11Resource* pInColorAfterTransparency;- ID3D11Resource* pInColorBeforeFog;- ID3D11Resource* pInColorAfterFog;- ID3D11Resource* pInScreenSpaceSubsurfaceScatteringGuide;- ID3D11Resource* pInColorBeforeScreenSpaceSubsurfaceScattering;- ID3D11Resource* pInColorAfterScreenSpaceSubsurfaceScattering;- ID3D11Resource* pInScreenSpaceRefractionGuide;- ID3D11Resource* pInColorBeforeScreenSpaceRefraction;- ID3D11Resource* pInColorAfterScreenSpaceRefraction;- ID3D11Resource* pInDepthOfFieldGuide;- ID3D11Resource* pInColorBeforeDepthOfField;- ID3D11Resource* pInColorAfterDepthOfField;- ID3D11Resource* pInDiffuseHitDistance;- ID3D11Resource* pInSpecularHitDistance;- ID3D11Resource* pInDiffuseRayDirection;- ID3D11Resource* pInSpecularRayDirection;- ID3D11Resource* pInDiffuseRayDirectionHitDistance;- ID3D11Resource* pInSpecularRayDirectionHitDistance;- NVSDK_NGX_Coordinates InReflectedAlbedoSubrectBase;- NVSDK_NGX_Coordinates InColorBeforeParticlesSubrectBase;- NVSDK_NGX_Coordinates InColorAfterParticlesSubrectBase;- NVSDK_NGX_Coordinates InColorBeforeTransparencySubrectBase;- NVSDK_NGX_Coordinates InColorAfterTransparencySubrectBase;- NVSDK_NGX_Coordinates InColorBeforeFogSubrectBase;- NVSDK_NGX_Coordinates InColorAfterFogSubrectBase;- NVSDK_NGX_Coordinates InScreenSpaceSubsurfaceScatteringGuideSubrectBase;- NVSDK_NGX_Coordinates InScreenSpaceRefractionGuideSubrectBase;- NVSDK_NGX_Coordinates InDepthOfFieldGuideSubrectBase;- NVSDK_NGX_Coordinates InDiffuseHitDistanceSubrectBase;- NVSDK_NGX_Coordinates InSpecularHitDistanceSubrectBase;- NVSDK_NGX_Coordinates InDiffuseRayDirectionSubrectBase;- NVSDK_NGX_Coordinates InSpecularRayDirectionSubrectBase;- NVSDK_NGX_Coordinates InDiffuseRayDirectionHitDistanceSubrectBase;- NVSDK_NGX_Coordinates InSpecularRayDirectionHitDistanceSubrectBase;- NVSDK_NGX_Coordinates InColorBeforeScreenSpaceSubsurfaceScatteringSubrectBase;- NVSDK_NGX_Coordinates InColorAfterScreenSpaceSubsurfaceScatteringSubrectBase;- NVSDK_NGX_Coordinates InColorBeforeScreenSpaceRefractionSubrectBase;- NVSDK_NGX_Coordinates InColorAfterScreenSpaceRefractionSubrectBase;- NVSDK_NGX_Coordinates InColorBeforeDepthOfFieldSubrectBase;- NVSDK_NGX_Coordinates InColorAfterDepthOfFieldSubtectBase;- float* pInWorldToViewMatrix;- float* pInViewToClipMatrix;-- float InPreExposure;- float InExposureScale;- int InIndicatorInvertXAxis;- int InIndicatorInvertYAxis;- /*** OPTIONAL - only for research purposes ***/- NVSDK_NGX_D3D11_GBuffer GBufferSurface;- NVSDK_NGX_ToneMapperType InToneMapperType;- ID3D11Resource* pInMotionVectors3D;- ID3D11Resource* pInIsParticleMask; /* to identify which pixels contains particles, essentially that are not drawn as part of base pass */- ID3D11Resource* pInAnimatedTextureMask; /* a binary mask covering pixels occupied by animated textures */- ID3D11Resource* pInDepthHighRes;- ID3D11Resource* pInPositionViewSpace;- float InFrameTimeDeltaInMsec; /* helps in determining the amount to denoise or anti-alias based on the speed of the object from motion vector magnitudes and fps as determined by this delta */- ID3D11Resource* pInRayTracingHitDistance; /* for each effect - approximation to the amount of noise in a ray-traced color */- ID3D11Resource* pInMotionVectorsReflections; /* motion vectors of reflected objects like for mirrored surfaces */- ID3D11Resource* pInTransparencyLayer; /* optional input res particle layer */- NVSDK_NGX_Coordinates InTransparencyLayerSubrectBase;- ID3D11Resource* pInTransparencyLayerOpacity; /* optional input res particle opacity layer */- NVSDK_NGX_Coordinates InTransparencyLayerOpacitySubrectBase;- ID3D11Resource* pInTransparencyLayerMvecs; /* optional input res transparency layer mvecs */- NVSDK_NGX_Coordinates InTransparencyLayerMvecsSubrectBase;- ID3D11Resource* pInDisocclusionMask; /* optional input res disocclusion mask */- NVSDK_NGX_Coordinates InDisocclusionMaskSubrectBase;- ID3D11Resource* pInResponsivityMask; /* optional input res responsivity mask; one channel, API range [-1,1]; R16F or R8 SNORM */- NVSDK_NGX_Coordinates InResponsivityMaskSubrectBase;-} NVSDK_NGX_D3D11_DLSSD_Eval_Params;--static inline NVSDK_NGX_Result NGX_D3D11_CREATE_DLSSD_EXT(- ID3D11DeviceContext *pInCtx,- NVSDK_NGX_Handle **ppOutHandle,- NVSDK_NGX_Parameter *pInParams,- NVSDK_NGX_DLSSD_Create_Params *pInDlssDCreateParams)-{- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_Width, pInDlssDCreateParams->InWidth);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_Height, pInDlssDCreateParams->InHeight);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_OutWidth, pInDlssDCreateParams->InTargetWidth);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_OutHeight, pInDlssDCreateParams->InTargetHeight);- NVSDK_NGX_Parameter_SetI(pInParams, NVSDK_NGX_Parameter_PerfQualityValue, pInDlssDCreateParams->InPerfQualityValue);- NVSDK_NGX_Parameter_SetI(pInParams, NVSDK_NGX_Parameter_DLSS_Feature_Create_Flags, pInDlssDCreateParams->InFeatureCreateFlags);- NVSDK_NGX_Parameter_SetI(pInParams, NVSDK_NGX_Parameter_DLSS_Enable_Output_Subrects, pInDlssDCreateParams->InEnableOutputSubrects ? 1 : 0);- NVSDK_NGX_Parameter_SetI(pInParams, NVSDK_NGX_Parameter_DLSS_Denoise_Mode, NVSDK_NGX_DLSS_Denoise_Mode_DLUnified);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Roughness_Mode, pInDlssDCreateParams->InRoughnessMode);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_Use_HW_Depth, pInDlssDCreateParams->InUseHWDepth);-- return NVSDK_NGX_D3D11_CreateFeature(pInCtx, NVSDK_NGX_Feature_RayReconstruction, pInParams, ppOutHandle);-}--static inline NVSDK_NGX_Result NGX_D3D11_EVALUATE_DLSSD_EXT(- ID3D11DeviceContext *pInCtx,- NVSDK_NGX_Handle *pInHandle,- NVSDK_NGX_Parameter *pInParams,- NVSDK_NGX_D3D11_DLSSD_Eval_Params *pInDlssDEvalParams)-{- NVSDK_NGX_Parameter_SetD3d11Resource(pInParams, NVSDK_NGX_Parameter_Color, pInDlssDEvalParams->pInColor);- NVSDK_NGX_Parameter_SetD3d11Resource(pInParams, NVSDK_NGX_Parameter_Output, pInDlssDEvalParams->pInOutput);- NVSDK_NGX_Parameter_SetD3d11Resource(pInParams, NVSDK_NGX_Parameter_Depth, pInDlssDEvalParams->pInDepth);- NVSDK_NGX_Parameter_SetD3d11Resource(pInParams, NVSDK_NGX_Parameter_MotionVectors, pInDlssDEvalParams->pInMotionVectors);- NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_Parameter_Jitter_Offset_X, pInDlssDEvalParams->InJitterOffsetX);- NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_Parameter_Jitter_Offset_Y, pInDlssDEvalParams->InJitterOffsetY);- NVSDK_NGX_Parameter_SetI(pInParams, NVSDK_NGX_Parameter_Reset, pInDlssDEvalParams->InReset);- NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_Parameter_MV_Scale_X, pInDlssDEvalParams->InMVScaleX == 0.0f ? 1.0f : pInDlssDEvalParams->InMVScaleX);- NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_Parameter_MV_Scale_Y, pInDlssDEvalParams->InMVScaleY == 0.0f ? 1.0f : pInDlssDEvalParams->InMVScaleY);- NVSDK_NGX_Parameter_SetD3d11Resource(pInParams, NVSDK_NGX_Parameter_TransparencyMask, pInDlssDEvalParams->pInTransparencyMask);- NVSDK_NGX_Parameter_SetD3d11Resource(pInParams, NVSDK_NGX_Parameter_ExposureTexture, pInDlssDEvalParams->pInExposureTexture);- NVSDK_NGX_Parameter_SetD3d11Resource(pInParams, NVSDK_NGX_Parameter_DLSS_Input_Bias_Current_Color_Mask, pInDlssDEvalParams->pInBiasCurrentColorMask);- NVSDK_NGX_Parameter_SetD3d11Resource(pInParams, NVSDK_NGX_Parameter_GBuffer_Albedo, pInDlssDEvalParams->GBufferSurface.pInAttrib[NVSDK_NGX_GBUFFER_ALBEDO]);- NVSDK_NGX_Parameter_SetD3d11Resource(pInParams, NVSDK_NGX_Parameter_GBuffer_Roughness, pInDlssDEvalParams->GBufferSurface.pInAttrib[NVSDK_NGX_GBUFFER_ROUGHNESS]);- NVSDK_NGX_Parameter_SetD3d11Resource(pInParams, NVSDK_NGX_Parameter_GBuffer_Metallic, pInDlssDEvalParams->GBufferSurface.pInAttrib[NVSDK_NGX_GBUFFER_METALLIC]);- NVSDK_NGX_Parameter_SetD3d11Resource(pInParams, NVSDK_NGX_Parameter_GBuffer_Specular, pInDlssDEvalParams->GBufferSurface.pInAttrib[NVSDK_NGX_GBUFFER_SPECULAR]);- NVSDK_NGX_Parameter_SetD3d11Resource(pInParams, NVSDK_NGX_Parameter_GBuffer_Subsurface, pInDlssDEvalParams->GBufferSurface.pInAttrib[NVSDK_NGX_GBUFFER_SUBSURFACE]);- NVSDK_NGX_Parameter_SetD3d11Resource(pInParams, NVSDK_NGX_Parameter_GBuffer_Normals, pInDlssDEvalParams->GBufferSurface.pInAttrib[NVSDK_NGX_GBUFFER_NORMALS]);- NVSDK_NGX_Parameter_SetD3d11Resource(pInParams, NVSDK_NGX_Parameter_GBuffer_ShadingModelId, pInDlssDEvalParams->GBufferSurface.pInAttrib[NVSDK_NGX_GBUFFER_SHADINGMODELID]);- NVSDK_NGX_Parameter_SetD3d11Resource(pInParams, NVSDK_NGX_Parameter_GBuffer_MaterialId, pInDlssDEvalParams->GBufferSurface.pInAttrib[NVSDK_NGX_GBUFFER_MATERIALID]);- NVSDK_NGX_Parameter_SetD3d11Resource(pInParams, NVSDK_NGX_Parameter_GBuffer_Atrrib_8, pInDlssDEvalParams->GBufferSurface.pInAttrib[8]);- NVSDK_NGX_Parameter_SetD3d11Resource(pInParams, NVSDK_NGX_Parameter_GBuffer_Atrrib_9, pInDlssDEvalParams->GBufferSurface.pInAttrib[9]);- NVSDK_NGX_Parameter_SetD3d11Resource(pInParams, NVSDK_NGX_Parameter_GBuffer_SpecularMvec, pInDlssDEvalParams->pInMotionVectorsReflections);- NVSDK_NGX_Parameter_SetD3d11Resource(pInParams, NVSDK_NGX_Parameter_GBuffer_Atrrib_11, pInDlssDEvalParams->GBufferSurface.pInAttrib[11]);- NVSDK_NGX_Parameter_SetD3d11Resource(pInParams, NVSDK_NGX_Parameter_GBuffer_Atrrib_12, pInDlssDEvalParams->GBufferSurface.pInAttrib[12]);- NVSDK_NGX_Parameter_SetD3d11Resource(pInParams, NVSDK_NGX_Parameter_GBuffer_Atrrib_13, pInDlssDEvalParams->GBufferSurface.pInAttrib[13]);- NVSDK_NGX_Parameter_SetD3d11Resource(pInParams, NVSDK_NGX_Parameter_GBuffer_Atrrib_14, pInDlssDEvalParams->GBufferSurface.pInAttrib[14]);- NVSDK_NGX_Parameter_SetD3d11Resource(pInParams, NVSDK_NGX_Parameter_GBuffer_Atrrib_15, pInDlssDEvalParams->GBufferSurface.pInAttrib[15]);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_TonemapperType, pInDlssDEvalParams->InToneMapperType);- NVSDK_NGX_Parameter_SetD3d11Resource(pInParams, NVSDK_NGX_Parameter_MotionVectors3D, pInDlssDEvalParams->pInMotionVectors3D);- NVSDK_NGX_Parameter_SetD3d11Resource(pInParams, NVSDK_NGX_Parameter_IsParticleMask, pInDlssDEvalParams->pInIsParticleMask);- NVSDK_NGX_Parameter_SetD3d11Resource(pInParams, NVSDK_NGX_Parameter_AnimatedTextureMask, pInDlssDEvalParams->pInAnimatedTextureMask);- NVSDK_NGX_Parameter_SetD3d11Resource(pInParams, NVSDK_NGX_Parameter_DepthHighRes, pInDlssDEvalParams->pInDepthHighRes);- NVSDK_NGX_Parameter_SetD3d11Resource(pInParams, NVSDK_NGX_Parameter_Position_ViewSpace, pInDlssDEvalParams->pInPositionViewSpace);- NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_Parameter_FrameTimeDeltaInMsec, pInDlssDEvalParams->InFrameTimeDeltaInMsec);- NVSDK_NGX_Parameter_SetD3d11Resource(pInParams, NVSDK_NGX_Parameter_RayTracingHitDistance, pInDlssDEvalParams->pInRayTracingHitDistance);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Input_Color_Subrect_Base_X, pInDlssDEvalParams->InColorSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Input_Color_Subrect_Base_Y, pInDlssDEvalParams->InColorSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Input_Depth_Subrect_Base_X, pInDlssDEvalParams->InDepthSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Input_Depth_Subrect_Base_Y, pInDlssDEvalParams->InDepthSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Input_MV_SubrectBase_X, pInDlssDEvalParams->InMVSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Input_MV_SubrectBase_Y, pInDlssDEvalParams->InMVSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Input_Translucency_SubrectBase_X, pInDlssDEvalParams->InTranslucencySubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Input_Translucency_SubrectBase_Y, pInDlssDEvalParams->InTranslucencySubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Input_Bias_Current_Color_SubrectBase_X, pInDlssDEvalParams->InBiasCurrentColorSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Input_Bias_Current_Color_SubrectBase_Y, pInDlssDEvalParams->InBiasCurrentColorSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Output_Subrect_Base_X, pInDlssDEvalParams->InOutputSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Output_Subrect_Base_Y, pInDlssDEvalParams->InOutputSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Render_Subrect_Dimensions_Width , pInDlssDEvalParams->InRenderSubrectDimensions.Width);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Render_Subrect_Dimensions_Height, pInDlssDEvalParams->InRenderSubrectDimensions.Height);- NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_Parameter_DLSS_Pre_Exposure, pInDlssDEvalParams->InPreExposure == 0.0f ? 1.0f : pInDlssDEvalParams->InPreExposure);- NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_Parameter_DLSS_Exposure_Scale, pInDlssDEvalParams->InExposureScale == 0.0f ? 1.0f : pInDlssDEvalParams->InExposureScale);- NVSDK_NGX_Parameter_SetI(pInParams, NVSDK_NGX_Parameter_DLSS_Indicator_Invert_X_Axis, pInDlssDEvalParams->InIndicatorInvertXAxis);- NVSDK_NGX_Parameter_SetI(pInParams, NVSDK_NGX_Parameter_DLSS_Indicator_Invert_Y_Axis, pInDlssDEvalParams->InIndicatorInvertYAxis);-- NVSDK_NGX_Parameter_SetD3d11Resource(pInParams, NVSDK_NGX_Parameter_DiffuseAlbedo, pInDlssDEvalParams->pInDiffuseAlbedo);- NVSDK_NGX_Parameter_SetD3d11Resource(pInParams, NVSDK_NGX_Parameter_SpecularAlbedo, pInDlssDEvalParams->pInSpecularAlbedo);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Input_DiffuseAlbedo_Subrect_Base_X, pInDlssDEvalParams->InDiffuseAlbedoSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Input_DiffuseAlbedo_Subrect_Base_Y, pInDlssDEvalParams->InDiffuseAlbedoSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Input_SpecularAlbedo_Subrect_Base_X, pInDlssDEvalParams->InSpecularAlbedoSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Input_SpecularAlbedo_Subrect_Base_Y, pInDlssDEvalParams->InSpecularAlbedoSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Input_Normals_Subrect_Base_X, pInDlssDEvalParams->InNormalsSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Input_Normals_Subrect_Base_Y, pInDlssDEvalParams->InNormalsSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Input_Roughness_Subrect_Base_X, pInDlssDEvalParams->InRoughnessSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Input_Roughness_Subrect_Base_Y, pInDlssDEvalParams->InRoughnessSubrectBase.Y);- NVSDK_NGX_Parameter_SetD3d11Resource(pInParams, NVSDK_NGX_Parameter_GBuffer_Emissive, pInDlssDEvalParams->GBufferSurface.pInAttrib[NVSDK_NGX_GBUFFER_EMISSIVE]);-- NVSDK_NGX_Parameter_SetD3d11Resource(pInParams, NVSDK_NGX_Parameter_DLSSD_Alpha, pInDlssDEvalParams->pInAlpha);- NVSDK_NGX_Parameter_SetD3d11Resource(pInParams, NVSDK_NGX_Parameter_DLSSD_OutputAlpha, pInDlssDEvalParams->pInOutputAlpha);- NVSDK_NGX_Parameter_SetD3d11Resource(pInParams, NVSDK_NGX_Parameter_DLSSD_ReflectedAlbedo, pInDlssDEvalParams->pInReflectedAlbedo);- NVSDK_NGX_Parameter_SetD3d11Resource(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorBeforeParticles, pInDlssDEvalParams->pInColorBeforeParticles);- NVSDK_NGX_Parameter_SetD3d11Resource(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorAfterParticles, pInDlssDEvalParams->pInColorAfterParticles);- NVSDK_NGX_Parameter_SetD3d11Resource(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorBeforeTransparency, pInDlssDEvalParams->pInColorBeforeTransparency);- NVSDK_NGX_Parameter_SetD3d11Resource(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorAfterTransparency, pInDlssDEvalParams->pInColorAfterTransparency);- NVSDK_NGX_Parameter_SetD3d11Resource(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorBeforeFog, pInDlssDEvalParams->pInColorBeforeFog);- NVSDK_NGX_Parameter_SetD3d11Resource(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorAfterFog, pInDlssDEvalParams->pInColorAfterFog);- NVSDK_NGX_Parameter_SetD3d11Resource(pInParams, NVSDK_NGX_Parameter_DLSSD_ScreenSpaceSubsurfaceScatteringGuide, pInDlssDEvalParams->pInScreenSpaceSubsurfaceScatteringGuide);- NVSDK_NGX_Parameter_SetD3d11Resource(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorBeforeScreenSpaceSubsurfaceScattering, pInDlssDEvalParams->pInColorBeforeScreenSpaceSubsurfaceScattering);- NVSDK_NGX_Parameter_SetD3d11Resource(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorAfterScreenSpaceSubsurfaceScattering, pInDlssDEvalParams->pInColorAfterScreenSpaceSubsurfaceScattering);- NVSDK_NGX_Parameter_SetD3d11Resource(pInParams, NVSDK_NGX_Parameter_DLSSD_ScreenSpaceRefractionGuide, pInDlssDEvalParams->pInScreenSpaceRefractionGuide);- NVSDK_NGX_Parameter_SetD3d11Resource(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorBeforeScreenSpaceRefraction, pInDlssDEvalParams->pInColorBeforeScreenSpaceRefraction);- NVSDK_NGX_Parameter_SetD3d11Resource(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorAfterScreenSpaceRefraction, pInDlssDEvalParams->pInColorAfterScreenSpaceRefraction);- NVSDK_NGX_Parameter_SetD3d11Resource(pInParams, NVSDK_NGX_Parameter_DLSSD_DepthOfFieldGuide, pInDlssDEvalParams->pInDepthOfFieldGuide);- NVSDK_NGX_Parameter_SetD3d11Resource(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorBeforeDepthOfField, pInDlssDEvalParams->pInColorBeforeDepthOfField);- NVSDK_NGX_Parameter_SetD3d11Resource(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorAfterDepthOfField, pInDlssDEvalParams->pInColorAfterDepthOfField);- NVSDK_NGX_Parameter_SetD3d11Resource(pInParams, NVSDK_NGX_Parameter_DLSSD_DiffuseHitDistance, pInDlssDEvalParams->pInDiffuseHitDistance);- NVSDK_NGX_Parameter_SetD3d11Resource(pInParams, NVSDK_NGX_Parameter_DLSSD_SpecularHitDistance, pInDlssDEvalParams->pInSpecularHitDistance);- NVSDK_NGX_Parameter_SetD3d11Resource(pInParams, NVSDK_NGX_Parameter_DLSSD_DiffuseRayDirection, pInDlssDEvalParams->pInDiffuseRayDirection);- NVSDK_NGX_Parameter_SetD3d11Resource(pInParams, NVSDK_NGX_Parameter_DLSSD_SpecularRayDirection, pInDlssDEvalParams->pInSpecularRayDirection);- NVSDK_NGX_Parameter_SetD3d11Resource(pInParams, NVSDK_NGX_Parameter_DLSSD_DiffuseRayDirectionHitDistance, pInDlssDEvalParams->pInDiffuseRayDirectionHitDistance);- NVSDK_NGX_Parameter_SetD3d11Resource(pInParams, NVSDK_NGX_Parameter_DLSSD_SpecularRayDirectionHitDistance, pInDlssDEvalParams->pInSpecularRayDirectionHitDistance);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_Alpha_Subrect_Base_X, pInDlssDEvalParams->InAlphaSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_Alpha_Subrect_Base_Y, pInDlssDEvalParams->InAlphaSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_OutputAlpha_Subrect_Base_X, pInDlssDEvalParams->InOutputAlphaSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_OutputAlpha_Subrect_Base_Y, pInDlssDEvalParams->InOutputAlphaSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_ReflectedAlbedo_Subrect_Base_X, pInDlssDEvalParams->InReflectedAlbedoSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_ReflectedAlbedo_Subrect_Base_Y, pInDlssDEvalParams->InReflectedAlbedoSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorAfterParticles_Subrect_Base_X, pInDlssDEvalParams->InColorAfterParticlesSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorAfterParticles_Subrect_Base_Y, pInDlssDEvalParams->InColorAfterParticlesSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorBeforeParticles_Subrect_Base_X, pInDlssDEvalParams->InColorBeforeParticlesSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorBeforeParticles_Subrect_Base_Y, pInDlssDEvalParams->InColorBeforeParticlesSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorBeforeTransparency_Subrect_Base_X, pInDlssDEvalParams->InColorBeforeTransparencySubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorBeforeTransparency_Subrect_Base_Y, pInDlssDEvalParams->InColorBeforeTransparencySubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorAfterTransparency_Subrect_Base_X, pInDlssDEvalParams->InColorAfterTransparencySubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorAfterTransparency_Subrect_Base_Y, pInDlssDEvalParams->InColorAfterTransparencySubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorBeforeFog_Subrect_Base_X, pInDlssDEvalParams->InColorBeforeFogSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorBeforeFog_Subrect_Base_Y, pInDlssDEvalParams->InColorBeforeFogSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorAfterFog_Subrect_Base_X, pInDlssDEvalParams->InColorAfterFogSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorAfterFog_Subrect_Base_Y, pInDlssDEvalParams->InColorAfterFogSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_ScreenSpaceSubsurfaceScatteringGuide_Subrect_Base_X, pInDlssDEvalParams->InScreenSpaceSubsurfaceScatteringGuideSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_ScreenSpaceSubsurfaceScatteringGuide_Subrect_Base_Y, pInDlssDEvalParams->InScreenSpaceSubsurfaceScatteringGuideSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorBeforeScreenSpaceSubsurfaceScattering_Subrect_Base_X, pInDlssDEvalParams->InColorBeforeScreenSpaceSubsurfaceScatteringSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorBeforeScreenSpaceSubsurfaceScattering_Subrect_Base_Y, pInDlssDEvalParams->InColorBeforeScreenSpaceSubsurfaceScatteringSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorAfterScreenSpaceSubsurfaceScattering_Subrect_Base_X, pInDlssDEvalParams->InColorAfterScreenSpaceSubsurfaceScatteringSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorAfterScreenSpaceSubsurfaceScattering_Subrect_Base_Y, pInDlssDEvalParams->InColorAfterScreenSpaceSubsurfaceScatteringSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_ScreenSpaceRefractionGuide_Subrect_Base_X, pInDlssDEvalParams->InScreenSpaceRefractionGuideSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_ScreenSpaceRefractionGuide_Subrect_Base_Y, pInDlssDEvalParams->InScreenSpaceRefractionGuideSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorBeforeScreenSpaceRefraction_Subrect_Base_X, pInDlssDEvalParams->InColorBeforeScreenSpaceRefractionSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorBeforeScreenSpaceRefraction_Subrect_Base_Y, pInDlssDEvalParams->InColorBeforeScreenSpaceRefractionSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorAfterScreenSpaceRefraction_Subrect_Base_X, pInDlssDEvalParams->InColorAfterScreenSpaceRefractionSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorAfterScreenSpaceRefraction_Subrect_Base_Y, pInDlssDEvalParams->InColorAfterScreenSpaceRefractionSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_DepthOfFieldGuide_Subrect_Base_X, pInDlssDEvalParams->InDepthOfFieldGuideSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_DepthOfFieldGuide_Subrect_Base_Y, pInDlssDEvalParams->InDepthOfFieldGuideSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorBeforeDepthOfField_Subrect_Base_X, pInDlssDEvalParams->InColorBeforeDepthOfFieldSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorBeforeDepthOfField_Subrect_Base_Y, pInDlssDEvalParams->InColorBeforeDepthOfFieldSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorAfterDepthOfField_Subrect_Base_X, pInDlssDEvalParams->InColorAfterDepthOfFieldSubtectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorAfterDepthOfField_Subrect_Base_Y, pInDlssDEvalParams->InColorAfterDepthOfFieldSubtectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_DiffuseHitDistance_Subrect_Base_X, pInDlssDEvalParams->InDiffuseHitDistanceSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_DiffuseHitDistance_Subrect_Base_Y, pInDlssDEvalParams->InDiffuseHitDistanceSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_SpecularHitDistance_Subrect_Base_X, pInDlssDEvalParams->InSpecularHitDistanceSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_SpecularHitDistance_Subrect_Base_Y, pInDlssDEvalParams->InSpecularHitDistanceSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_DiffuseRayDirection_Subrect_Base_X, pInDlssDEvalParams->InDiffuseRayDirectionSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_DiffuseRayDirection_Subrect_Base_Y, pInDlssDEvalParams->InDiffuseRayDirectionSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_SpecularRayDirection_Subrect_Base_X, pInDlssDEvalParams->InSpecularRayDirectionSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_SpecularRayDirection_Subrect_Base_Y, pInDlssDEvalParams->InSpecularRayDirectionSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_DiffuseRayDirectionHitDistance_Subrect_Base_X, pInDlssDEvalParams->InDiffuseRayDirectionHitDistanceSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_DiffuseRayDirectionHitDistance_Subrect_Base_Y, pInDlssDEvalParams->InDiffuseRayDirectionHitDistanceSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_SpecularRayDirectionHitDistance_Subrect_Base_X, pInDlssDEvalParams->InSpecularRayDirectionHitDistanceSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_SpecularRayDirectionHitDistance_Subrect_Base_Y, pInDlssDEvalParams->InSpecularRayDirectionHitDistanceSubrectBase.Y);-- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_DLSS_WORLD_TO_VIEW_MATRIX, pInDlssDEvalParams->pInWorldToViewMatrix);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_DLSS_VIEW_TO_CLIP_MATRIX, pInDlssDEvalParams->pInViewToClipMatrix);-- NVSDK_NGX_Parameter_SetD3d11Resource(pInParams, NVSDK_NGX_Parameter_GBuffer_Normals, pInDlssDEvalParams->pInNormals);- NVSDK_NGX_Parameter_SetD3d11Resource(pInParams, NVSDK_NGX_Parameter_GBuffer_Roughness, pInDlssDEvalParams->pInRoughness);- NVSDK_NGX_Parameter_SetD3d11Resource(pInParams, NVSDK_NGX_Parameter_DLSS_TransparencyLayer, pInDlssDEvalParams->pInTransparencyLayer);- NVSDK_NGX_Parameter_SetD3d11Resource(pInParams, NVSDK_NGX_Parameter_DLSS_TransparencyLayerOpacity, pInDlssDEvalParams->pInTransparencyLayerOpacity);- NVSDK_NGX_Parameter_SetD3d11Resource(pInParams, NVSDK_NGX_Parameter_DLSS_TransparencyLayerMvecs, pInDlssDEvalParams->pInTransparencyLayerMvecs);- NVSDK_NGX_Parameter_SetD3d11Resource(pInParams, NVSDK_NGX_Parameter_DLSS_DisocclusionMask, pInDlssDEvalParams->pInDisocclusionMask);- NVSDK_NGX_Parameter_SetD3d11Resource(pInParams, NVSDK_NGX_Parameter_DLSSD_ResponsivityMask, pInDlssDEvalParams->pInResponsivityMask);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_TransparencyLayer_Subrect_Base_X, pInDlssDEvalParams->InTransparencyLayerSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_TransparencyLayer_Subrect_Base_Y, pInDlssDEvalParams->InTransparencyLayerSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_TransparencyLayerOpacity_Subrect_Base_X, pInDlssDEvalParams->InTransparencyLayerOpacitySubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_TransparencyLayerOpacity_Subrect_Base_Y, pInDlssDEvalParams->InTransparencyLayerOpacitySubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_TransparencyLayerMvecs_Subrect_Base_X, pInDlssDEvalParams->InTransparencyLayerMvecsSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_TransparencyLayerMvecs_Subrect_Base_Y, pInDlssDEvalParams->InTransparencyLayerMvecsSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_DisocclusionMask_Subrect_Base_X, pInDlssDEvalParams->InDisocclusionMaskSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_DisocclusionMask_Subrect_Base_Y, pInDlssDEvalParams->InDisocclusionMaskSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_ResponsivityMask_Subrect_Base_X, pInDlssDEvalParams->InResponsivityMaskSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_ResponsivityMask_Subrect_Base_Y, pInDlssDEvalParams->InResponsivityMaskSubrectBase.Y);--- return NVSDK_NGX_D3D11_EvaluateFeature_C(pInCtx, pInHandle, pInParams, NULL);-}--typedef struct NVSDK_NGX_D3D12_DLSSD_Eval_Params-{- ID3D12Resource* pInDiffuseAlbedo;- ID3D12Resource* pInSpecularAlbedo;- ID3D12Resource* pInNormals;- ID3D12Resource* pInRoughness;-- ID3D12Resource* pInColor;- ID3D12Resource* pInAlpha;- ID3D12Resource* pInOutput;- ID3D12Resource* pInOutputAlpha;- ID3D12Resource* pInDepth;- ID3D12Resource* pInMotionVectors;- float InJitterOffsetX; /* Jitter offset must be in input/render pixel space */- float InJitterOffsetY;- NVSDK_NGX_Dimensions InRenderSubrectDimensions;- /*** OPTIONAL - leave to 0/0.0f if unused ***/- int InReset; /* Set to 1 when scene changes completely (new level etc) */- float InMVScaleX; /* If MVs need custom scaling to convert to pixel space */- float InMVScaleY;- ID3D12Resource* pInTransparencyMask; /* Unused/Reserved for future use */- ID3D12Resource* pInExposureTexture;- ID3D12Resource* pInBiasCurrentColorMask;- NVSDK_NGX_Coordinates InAlphaSubrectBase;- NVSDK_NGX_Coordinates InOutputAlphaSubrectBase;- NVSDK_NGX_Coordinates InDiffuseAlbedoSubrectBase;- NVSDK_NGX_Coordinates InSpecularAlbedoSubrectBase;- NVSDK_NGX_Coordinates InNormalsSubrectBase;- NVSDK_NGX_Coordinates InRoughnessSubrectBase;- NVSDK_NGX_Coordinates InColorSubrectBase;- NVSDK_NGX_Coordinates InDepthSubrectBase;- NVSDK_NGX_Coordinates InMVSubrectBase;- NVSDK_NGX_Coordinates InTranslucencySubrectBase;- NVSDK_NGX_Coordinates InBiasCurrentColorSubrectBase;- NVSDK_NGX_Coordinates InOutputSubrectBase;-- ID3D12Resource* pInReflectedAlbedo;- ID3D12Resource* pInColorBeforeParticles;- ID3D12Resource* pInColorAfterParticles;- ID3D12Resource* pInColorBeforeTransparency;- ID3D12Resource* pInColorAfterTransparency;- ID3D12Resource* pInColorBeforeFog;- ID3D12Resource* pInColorAfterFog;- ID3D12Resource* pInScreenSpaceSubsurfaceScatteringGuide;- ID3D12Resource* pInColorBeforeScreenSpaceSubsurfaceScattering;- ID3D12Resource* pInColorAfterScreenSpaceSubsurfaceScattering;- ID3D12Resource* pInScreenSpaceRefractionGuide;- ID3D12Resource* pInColorBeforeScreenSpaceRefraction;- ID3D12Resource* pInColorAfterScreenSpaceRefraction;- ID3D12Resource* pInDepthOfFieldGuide;- ID3D12Resource* pInColorBeforeDepthOfField;- ID3D12Resource* pInColorAfterDepthOfField;- ID3D12Resource* pInDiffuseHitDistance;- ID3D12Resource* pInSpecularHitDistance;- ID3D12Resource* pInDiffuseRayDirection;- ID3D12Resource* pInSpecularRayDirection;- ID3D12Resource* pInDiffuseRayDirectionHitDistance;- ID3D12Resource* pInSpecularRayDirectionHitDistance;- NVSDK_NGX_Coordinates InReflectedAlbedoSubrectBase;- NVSDK_NGX_Coordinates InColorBeforeParticlesSubrectBase;- NVSDK_NGX_Coordinates InColorAfterParticlesSubrectBase;- NVSDK_NGX_Coordinates InColorBeforeTransparencySubrectBase;- NVSDK_NGX_Coordinates InColorAfterTransparencySubrectBase;- NVSDK_NGX_Coordinates InColorBeforeFogSubrectBase;- NVSDK_NGX_Coordinates InColorAfterFogSubrectBase;- NVSDK_NGX_Coordinates InScreenSpaceSubsurfaceScatteringGuideSubrectBase;- NVSDK_NGX_Coordinates InScreenSpaceRefractionGuideSubrectBase;- NVSDK_NGX_Coordinates InDepthOfFieldGuideSubrectBase;- NVSDK_NGX_Coordinates InDiffuseHitDistanceSubrectBase;- NVSDK_NGX_Coordinates InSpecularHitDistanceSubrectBase;- NVSDK_NGX_Coordinates InDiffuseRayDirectionSubrectBase;- NVSDK_NGX_Coordinates InSpecularRayDirectionSubrectBase;- NVSDK_NGX_Coordinates InDiffuseRayDirectionHitDistanceSubrectBase;- NVSDK_NGX_Coordinates InSpecularRayDirectionHitDistanceSubrectBase;- NVSDK_NGX_Coordinates InColorBeforeScreenSpaceSubsurfaceScatteringSubrectBase;- NVSDK_NGX_Coordinates InColorAfterScreenSpaceSubsurfaceScatteringSubrectBase;- NVSDK_NGX_Coordinates InColorBeforeScreenSpaceRefractionSubrectBase;- NVSDK_NGX_Coordinates InColorAfterScreenSpaceRefractionSubrectBase;- NVSDK_NGX_Coordinates InColorBeforeDepthOfFieldSubrectBase;- NVSDK_NGX_Coordinates InColorAfterDepthOfFieldSubtectBase;- float* pInWorldToViewMatrix;- float* pInViewToClipMatrix;-- float InPreExposure;- float InExposureScale;- int InIndicatorInvertXAxis;- int InIndicatorInvertYAxis;- /*** OPTIONAL - only for research purposes ***/- NVSDK_NGX_D3D12_GBuffer GBufferSurface;- NVSDK_NGX_ToneMapperType InToneMapperType;- ID3D12Resource* pInMotionVectors3D;- ID3D12Resource* pInIsParticleMask; /* to identify which pixels contains particles, essentially that are not drawn as part of base pass */- ID3D12Resource* pInAnimatedTextureMask; /* a binary mask covering pixels occupied by animated textures */- ID3D12Resource* pInDepthHighRes;- ID3D12Resource* pInPositionViewSpace;- float InFrameTimeDeltaInMsec; /* helps in determining the amount to denoise or anti-alias based on the speed of the object from motion vector magnitudes and fps as determined by this delta */- ID3D12Resource* pInRayTracingHitDistance; /* for each effect - approximation to the amount of noise in a ray-traced color */- ID3D12Resource* pInMotionVectorsReflections; /* motion vectors of reflected objects like for mirrored surfaces */- ID3D12Resource* pInTransparencyLayer; /* optional input res particle layer */- NVSDK_NGX_Coordinates InTransparencyLayerSubrectBase;- ID3D12Resource* pInTransparencyLayerOpacity; /* optional input res particle opacity layer */- NVSDK_NGX_Coordinates InTransparencyLayerOpacitySubrectBase;- ID3D12Resource* pInTransparencyLayerMvecs; /* optional input res transparency layer mvecs */- NVSDK_NGX_Coordinates InTransparencyLayerMvecsSubrectBase;- ID3D12Resource* pInDisocclusionMask; /* optional input res disocclusion mask */- NVSDK_NGX_Coordinates InDisocclusionMaskSubrectBase;- ID3D12Resource* pInResponsivityMask; /* optional input res responsivity mask; one channel, R16F or R8 SNORM */- NVSDK_NGX_Coordinates InResponsivityMaskSubrectBase;--} NVSDK_NGX_D3D12_DLSSD_Eval_Params;--static inline NVSDK_NGX_Result NGX_D3D12_CREATE_DLSSD_EXT(- ID3D12GraphicsCommandList *pInCmdList,- unsigned int InCreationNodeMask,- unsigned int InVisibilityNodeMask,- NVSDK_NGX_Handle **ppOutHandle,- NVSDK_NGX_Parameter *pInParams,- NVSDK_NGX_DLSSD_Create_Params *pInDlssDCreateParams)-{- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_CreationNodeMask, InCreationNodeMask);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_VisibilityNodeMask, InVisibilityNodeMask);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_Width, pInDlssDCreateParams->InWidth);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_Height, pInDlssDCreateParams->InHeight);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_OutWidth, pInDlssDCreateParams->InTargetWidth);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_OutHeight, pInDlssDCreateParams->InTargetHeight);- NVSDK_NGX_Parameter_SetI(pInParams, NVSDK_NGX_Parameter_PerfQualityValue, pInDlssDCreateParams->InPerfQualityValue);- NVSDK_NGX_Parameter_SetI(pInParams, NVSDK_NGX_Parameter_DLSS_Feature_Create_Flags, pInDlssDCreateParams->InFeatureCreateFlags);- NVSDK_NGX_Parameter_SetI(pInParams, NVSDK_NGX_Parameter_DLSS_Enable_Output_Subrects, pInDlssDCreateParams->InEnableOutputSubrects ? 1 : 0);- NVSDK_NGX_Parameter_SetI(pInParams, NVSDK_NGX_Parameter_DLSS_Denoise_Mode, NVSDK_NGX_DLSS_Denoise_Mode_DLUnified);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Roughness_Mode, pInDlssDCreateParams->InRoughnessMode);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_Use_HW_Depth, pInDlssDCreateParams->InUseHWDepth);- return NVSDK_NGX_D3D12_CreateFeature(pInCmdList, NVSDK_NGX_Feature_RayReconstruction, pInParams, ppOutHandle);-}--static inline NVSDK_NGX_Result NGX_D3D12_EVALUATE_DLSSD_EXT(- ID3D12GraphicsCommandList *pInCmdList,- NVSDK_NGX_Handle *pInHandle,- NVSDK_NGX_Parameter *pInParams,- NVSDK_NGX_D3D12_DLSSD_Eval_Params *pInDlssDEvalParams)-{- NVSDK_NGX_Parameter_SetD3d12Resource(pInParams, NVSDK_NGX_Parameter_Color, pInDlssDEvalParams->pInColor);- NVSDK_NGX_Parameter_SetD3d12Resource(pInParams, NVSDK_NGX_Parameter_Output, pInDlssDEvalParams->pInOutput);- NVSDK_NGX_Parameter_SetD3d12Resource(pInParams, NVSDK_NGX_Parameter_Depth, pInDlssDEvalParams->pInDepth);- NVSDK_NGX_Parameter_SetD3d12Resource(pInParams, NVSDK_NGX_Parameter_MotionVectors, pInDlssDEvalParams->pInMotionVectors);- NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_Parameter_Jitter_Offset_X, pInDlssDEvalParams->InJitterOffsetX);- NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_Parameter_Jitter_Offset_Y, pInDlssDEvalParams->InJitterOffsetY);- NVSDK_NGX_Parameter_SetI(pInParams, NVSDK_NGX_Parameter_Reset, pInDlssDEvalParams->InReset);- NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_Parameter_MV_Scale_X, pInDlssDEvalParams->InMVScaleX == 0.0f ? 1.0f : pInDlssDEvalParams->InMVScaleX);- NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_Parameter_MV_Scale_Y, pInDlssDEvalParams->InMVScaleY == 0.0f ? 1.0f : pInDlssDEvalParams->InMVScaleY);- NVSDK_NGX_Parameter_SetD3d12Resource(pInParams, NVSDK_NGX_Parameter_TransparencyMask, pInDlssDEvalParams->pInTransparencyMask);- NVSDK_NGX_Parameter_SetD3d12Resource(pInParams, NVSDK_NGX_Parameter_ExposureTexture, pInDlssDEvalParams->pInExposureTexture);- NVSDK_NGX_Parameter_SetD3d12Resource(pInParams, NVSDK_NGX_Parameter_DLSS_Input_Bias_Current_Color_Mask, pInDlssDEvalParams->pInBiasCurrentColorMask);- NVSDK_NGX_Parameter_SetD3d12Resource(pInParams, NVSDK_NGX_Parameter_GBuffer_Albedo, pInDlssDEvalParams->GBufferSurface.pInAttrib[NVSDK_NGX_GBUFFER_ALBEDO]);- NVSDK_NGX_Parameter_SetD3d12Resource(pInParams, NVSDK_NGX_Parameter_GBuffer_Roughness, pInDlssDEvalParams->GBufferSurface.pInAttrib[NVSDK_NGX_GBUFFER_ROUGHNESS]);- NVSDK_NGX_Parameter_SetD3d12Resource(pInParams, NVSDK_NGX_Parameter_GBuffer_Metallic, pInDlssDEvalParams->GBufferSurface.pInAttrib[NVSDK_NGX_GBUFFER_METALLIC]);- NVSDK_NGX_Parameter_SetD3d12Resource(pInParams, NVSDK_NGX_Parameter_GBuffer_Specular, pInDlssDEvalParams->GBufferSurface.pInAttrib[NVSDK_NGX_GBUFFER_SPECULAR]);- NVSDK_NGX_Parameter_SetD3d12Resource(pInParams, NVSDK_NGX_Parameter_GBuffer_Subsurface, pInDlssDEvalParams->GBufferSurface.pInAttrib[NVSDK_NGX_GBUFFER_SUBSURFACE]);- NVSDK_NGX_Parameter_SetD3d12Resource(pInParams, NVSDK_NGX_Parameter_GBuffer_Normals, pInDlssDEvalParams->GBufferSurface.pInAttrib[NVSDK_NGX_GBUFFER_NORMALS]);- NVSDK_NGX_Parameter_SetD3d12Resource(pInParams, NVSDK_NGX_Parameter_GBuffer_ShadingModelId, pInDlssDEvalParams->GBufferSurface.pInAttrib[NVSDK_NGX_GBUFFER_SHADINGMODELID]);- NVSDK_NGX_Parameter_SetD3d12Resource(pInParams, NVSDK_NGX_Parameter_GBuffer_MaterialId, pInDlssDEvalParams->GBufferSurface.pInAttrib[NVSDK_NGX_GBUFFER_MATERIALID]);- NVSDK_NGX_Parameter_SetD3d12Resource(pInParams, NVSDK_NGX_Parameter_GBuffer_Atrrib_8, pInDlssDEvalParams->GBufferSurface.pInAttrib[8]);- NVSDK_NGX_Parameter_SetD3d12Resource(pInParams, NVSDK_NGX_Parameter_GBuffer_Atrrib_9, pInDlssDEvalParams->GBufferSurface.pInAttrib[9]);- NVSDK_NGX_Parameter_SetD3d12Resource(pInParams, NVSDK_NGX_Parameter_GBuffer_Atrrib_11, pInDlssDEvalParams->GBufferSurface.pInAttrib[11]);- NVSDK_NGX_Parameter_SetD3d12Resource(pInParams, NVSDK_NGX_Parameter_GBuffer_Atrrib_12, pInDlssDEvalParams->GBufferSurface.pInAttrib[12]);- NVSDK_NGX_Parameter_SetD3d12Resource(pInParams, NVSDK_NGX_Parameter_GBuffer_Atrrib_13, pInDlssDEvalParams->GBufferSurface.pInAttrib[13]);- NVSDK_NGX_Parameter_SetD3d12Resource(pInParams, NVSDK_NGX_Parameter_GBuffer_Atrrib_14, pInDlssDEvalParams->GBufferSurface.pInAttrib[14]);- NVSDK_NGX_Parameter_SetD3d12Resource(pInParams, NVSDK_NGX_Parameter_GBuffer_Atrrib_15, pInDlssDEvalParams->GBufferSurface.pInAttrib[15]);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_TonemapperType, pInDlssDEvalParams->InToneMapperType);- NVSDK_NGX_Parameter_SetD3d12Resource(pInParams, NVSDK_NGX_Parameter_MotionVectors3D, pInDlssDEvalParams->pInMotionVectors3D);- NVSDK_NGX_Parameter_SetD3d12Resource(pInParams, NVSDK_NGX_Parameter_IsParticleMask, pInDlssDEvalParams->pInIsParticleMask);- NVSDK_NGX_Parameter_SetD3d12Resource(pInParams, NVSDK_NGX_Parameter_AnimatedTextureMask, pInDlssDEvalParams->pInAnimatedTextureMask);- NVSDK_NGX_Parameter_SetD3d12Resource(pInParams, NVSDK_NGX_Parameter_DepthHighRes, pInDlssDEvalParams->pInDepthHighRes);- NVSDK_NGX_Parameter_SetD3d12Resource(pInParams, NVSDK_NGX_Parameter_Position_ViewSpace, pInDlssDEvalParams->pInPositionViewSpace);- NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_Parameter_FrameTimeDeltaInMsec, pInDlssDEvalParams->InFrameTimeDeltaInMsec);- NVSDK_NGX_Parameter_SetD3d12Resource(pInParams, NVSDK_NGX_Parameter_RayTracingHitDistance, pInDlssDEvalParams->pInRayTracingHitDistance);- NVSDK_NGX_Parameter_SetD3d12Resource(pInParams, NVSDK_NGX_Parameter_GBuffer_SpecularMvec, pInDlssDEvalParams->pInMotionVectorsReflections);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Input_Color_Subrect_Base_X, pInDlssDEvalParams->InColorSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Input_Color_Subrect_Base_Y, pInDlssDEvalParams->InColorSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Input_Depth_Subrect_Base_X, pInDlssDEvalParams->InDepthSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Input_Depth_Subrect_Base_Y, pInDlssDEvalParams->InDepthSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Input_MV_SubrectBase_X, pInDlssDEvalParams->InMVSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Input_MV_SubrectBase_Y, pInDlssDEvalParams->InMVSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Input_Translucency_SubrectBase_X, pInDlssDEvalParams->InTranslucencySubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Input_Translucency_SubrectBase_Y, pInDlssDEvalParams->InTranslucencySubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Input_Bias_Current_Color_SubrectBase_X, pInDlssDEvalParams->InBiasCurrentColorSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Input_Bias_Current_Color_SubrectBase_Y, pInDlssDEvalParams->InBiasCurrentColorSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Output_Subrect_Base_X, pInDlssDEvalParams->InOutputSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Output_Subrect_Base_Y, pInDlssDEvalParams->InOutputSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Render_Subrect_Dimensions_Width , pInDlssDEvalParams->InRenderSubrectDimensions.Width);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Render_Subrect_Dimensions_Height, pInDlssDEvalParams->InRenderSubrectDimensions.Height);- NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_Parameter_DLSS_Pre_Exposure, pInDlssDEvalParams->InPreExposure == 0.0f ? 1.0f : pInDlssDEvalParams->InPreExposure);- NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_Parameter_DLSS_Exposure_Scale, pInDlssDEvalParams->InExposureScale == 0.0f ? 1.0f : pInDlssDEvalParams->InExposureScale);- NVSDK_NGX_Parameter_SetI(pInParams, NVSDK_NGX_Parameter_DLSS_Indicator_Invert_X_Axis, pInDlssDEvalParams->InIndicatorInvertXAxis);- NVSDK_NGX_Parameter_SetI(pInParams, NVSDK_NGX_Parameter_DLSS_Indicator_Invert_Y_Axis, pInDlssDEvalParams->InIndicatorInvertYAxis);-- NVSDK_NGX_Parameter_SetD3d12Resource(pInParams, NVSDK_NGX_Parameter_GBuffer_Emissive, pInDlssDEvalParams->GBufferSurface.pInAttrib[NVSDK_NGX_GBUFFER_EMISSIVE]);-- NVSDK_NGX_Parameter_SetD3d12Resource(pInParams, NVSDK_NGX_Parameter_DiffuseAlbedo, pInDlssDEvalParams->pInDiffuseAlbedo);- NVSDK_NGX_Parameter_SetD3d12Resource(pInParams, NVSDK_NGX_Parameter_SpecularAlbedo, pInDlssDEvalParams->pInSpecularAlbedo);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Input_DiffuseAlbedo_Subrect_Base_X, pInDlssDEvalParams->InDiffuseAlbedoSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Input_DiffuseAlbedo_Subrect_Base_Y, pInDlssDEvalParams->InDiffuseAlbedoSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Input_SpecularAlbedo_Subrect_Base_X, pInDlssDEvalParams->InSpecularAlbedoSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Input_SpecularAlbedo_Subrect_Base_Y, pInDlssDEvalParams->InSpecularAlbedoSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Input_Normals_Subrect_Base_X, pInDlssDEvalParams->InNormalsSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Input_Normals_Subrect_Base_Y, pInDlssDEvalParams->InNormalsSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Input_Roughness_Subrect_Base_X, pInDlssDEvalParams->InRoughnessSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Input_Roughness_Subrect_Base_Y, pInDlssDEvalParams->InRoughnessSubrectBase.Y);- NVSDK_NGX_Parameter_SetD3d12Resource(pInParams, NVSDK_NGX_Parameter_GBuffer_Normals, pInDlssDEvalParams->pInNormals);- NVSDK_NGX_Parameter_SetD3d12Resource(pInParams, NVSDK_NGX_Parameter_GBuffer_Roughness, pInDlssDEvalParams->pInRoughness);-- NVSDK_NGX_Parameter_SetD3d12Resource(pInParams, NVSDK_NGX_Parameter_DLSSD_Alpha, pInDlssDEvalParams->pInAlpha);- NVSDK_NGX_Parameter_SetD3d12Resource(pInParams, NVSDK_NGX_Parameter_DLSSD_OutputAlpha, pInDlssDEvalParams->pInOutputAlpha);- NVSDK_NGX_Parameter_SetD3d12Resource(pInParams, NVSDK_NGX_Parameter_DLSSD_ReflectedAlbedo, pInDlssDEvalParams->pInReflectedAlbedo);- NVSDK_NGX_Parameter_SetD3d12Resource(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorBeforeParticles, pInDlssDEvalParams->pInColorBeforeParticles);- NVSDK_NGX_Parameter_SetD3d12Resource(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorAfterParticles, pInDlssDEvalParams->pInColorAfterParticles);- NVSDK_NGX_Parameter_SetD3d12Resource(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorBeforeTransparency, pInDlssDEvalParams->pInColorBeforeTransparency);- NVSDK_NGX_Parameter_SetD3d12Resource(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorAfterTransparency, pInDlssDEvalParams->pInColorAfterTransparency);- NVSDK_NGX_Parameter_SetD3d12Resource(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorBeforeFog, pInDlssDEvalParams->pInColorBeforeFog);- NVSDK_NGX_Parameter_SetD3d12Resource(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorAfterFog, pInDlssDEvalParams->pInColorAfterFog);- NVSDK_NGX_Parameter_SetD3d12Resource(pInParams, NVSDK_NGX_Parameter_DLSSD_ScreenSpaceSubsurfaceScatteringGuide, pInDlssDEvalParams->pInScreenSpaceSubsurfaceScatteringGuide);- NVSDK_NGX_Parameter_SetD3d12Resource(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorBeforeScreenSpaceSubsurfaceScattering, pInDlssDEvalParams->pInColorBeforeScreenSpaceSubsurfaceScattering);- NVSDK_NGX_Parameter_SetD3d12Resource(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorAfterScreenSpaceSubsurfaceScattering, pInDlssDEvalParams->pInColorAfterScreenSpaceSubsurfaceScattering);- NVSDK_NGX_Parameter_SetD3d12Resource(pInParams, NVSDK_NGX_Parameter_DLSSD_ScreenSpaceRefractionGuide, pInDlssDEvalParams->pInScreenSpaceRefractionGuide);- NVSDK_NGX_Parameter_SetD3d12Resource(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorBeforeScreenSpaceRefraction, pInDlssDEvalParams->pInColorBeforeScreenSpaceRefraction);- NVSDK_NGX_Parameter_SetD3d12Resource(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorAfterScreenSpaceRefraction, pInDlssDEvalParams->pInColorAfterScreenSpaceRefraction);- NVSDK_NGX_Parameter_SetD3d12Resource(pInParams, NVSDK_NGX_Parameter_DLSSD_DepthOfFieldGuide, pInDlssDEvalParams->pInDepthOfFieldGuide);- NVSDK_NGX_Parameter_SetD3d12Resource(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorBeforeDepthOfField, pInDlssDEvalParams->pInColorBeforeDepthOfField);- NVSDK_NGX_Parameter_SetD3d12Resource(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorAfterDepthOfField, pInDlssDEvalParams->pInColorAfterDepthOfField);- NVSDK_NGX_Parameter_SetD3d12Resource(pInParams, NVSDK_NGX_Parameter_DLSSD_DiffuseHitDistance, pInDlssDEvalParams->pInDiffuseHitDistance);- NVSDK_NGX_Parameter_SetD3d12Resource(pInParams, NVSDK_NGX_Parameter_DLSSD_SpecularHitDistance, pInDlssDEvalParams->pInSpecularHitDistance);- NVSDK_NGX_Parameter_SetD3d12Resource(pInParams, NVSDK_NGX_Parameter_DLSSD_DiffuseRayDirection, pInDlssDEvalParams->pInDiffuseRayDirection);- NVSDK_NGX_Parameter_SetD3d12Resource(pInParams, NVSDK_NGX_Parameter_DLSSD_SpecularRayDirection, pInDlssDEvalParams->pInSpecularRayDirection);- NVSDK_NGX_Parameter_SetD3d12Resource(pInParams, NVSDK_NGX_Parameter_DLSSD_DiffuseRayDirectionHitDistance, pInDlssDEvalParams->pInDiffuseRayDirectionHitDistance);- NVSDK_NGX_Parameter_SetD3d12Resource(pInParams, NVSDK_NGX_Parameter_DLSSD_SpecularRayDirectionHitDistance, pInDlssDEvalParams->pInSpecularRayDirectionHitDistance);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_Alpha_Subrect_Base_X, pInDlssDEvalParams->InAlphaSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_Alpha_Subrect_Base_Y, pInDlssDEvalParams->InAlphaSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_OutputAlpha_Subrect_Base_X, pInDlssDEvalParams->InOutputAlphaSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_OutputAlpha_Subrect_Base_Y, pInDlssDEvalParams->InOutputAlphaSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_ReflectedAlbedo_Subrect_Base_X, pInDlssDEvalParams->InReflectedAlbedoSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_ReflectedAlbedo_Subrect_Base_Y, pInDlssDEvalParams->InReflectedAlbedoSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorAfterParticles_Subrect_Base_X, pInDlssDEvalParams->InColorAfterParticlesSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorAfterParticles_Subrect_Base_Y, pInDlssDEvalParams->InColorAfterParticlesSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorBeforeParticles_Subrect_Base_X, pInDlssDEvalParams->InColorBeforeParticlesSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorBeforeParticles_Subrect_Base_Y, pInDlssDEvalParams->InColorBeforeParticlesSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorBeforeTransparency_Subrect_Base_X, pInDlssDEvalParams->InColorBeforeTransparencySubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorBeforeTransparency_Subrect_Base_Y, pInDlssDEvalParams->InColorBeforeTransparencySubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorAfterTransparency_Subrect_Base_X, pInDlssDEvalParams->InColorAfterTransparencySubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorAfterTransparency_Subrect_Base_Y, pInDlssDEvalParams->InColorAfterTransparencySubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorAfterFog_Subrect_Base_X, pInDlssDEvalParams->InColorAfterFogSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorAfterFog_Subrect_Base_Y, pInDlssDEvalParams->InColorAfterFogSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorBeforeFog_Subrect_Base_X, pInDlssDEvalParams->InColorBeforeFogSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorBeforeFog_Subrect_Base_Y, pInDlssDEvalParams->InColorBeforeFogSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_ScreenSpaceSubsurfaceScatteringGuide_Subrect_Base_X, pInDlssDEvalParams->InScreenSpaceSubsurfaceScatteringGuideSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_ScreenSpaceSubsurfaceScatteringGuide_Subrect_Base_Y, pInDlssDEvalParams->InScreenSpaceSubsurfaceScatteringGuideSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorBeforeScreenSpaceSubsurfaceScattering_Subrect_Base_X, pInDlssDEvalParams->InColorBeforeScreenSpaceSubsurfaceScatteringSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorBeforeScreenSpaceSubsurfaceScattering_Subrect_Base_Y, pInDlssDEvalParams->InColorBeforeScreenSpaceSubsurfaceScatteringSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorAfterScreenSpaceSubsurfaceScattering_Subrect_Base_X, pInDlssDEvalParams->InColorAfterScreenSpaceSubsurfaceScatteringSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorAfterScreenSpaceSubsurfaceScattering_Subrect_Base_Y, pInDlssDEvalParams->InColorAfterScreenSpaceSubsurfaceScatteringSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_ScreenSpaceRefractionGuide_Subrect_Base_X, pInDlssDEvalParams->InScreenSpaceRefractionGuideSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_ScreenSpaceRefractionGuide_Subrect_Base_Y, pInDlssDEvalParams->InScreenSpaceRefractionGuideSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorBeforeScreenSpaceRefraction_Subrect_Base_X, pInDlssDEvalParams->InColorBeforeScreenSpaceRefractionSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorBeforeScreenSpaceRefraction_Subrect_Base_Y, pInDlssDEvalParams->InColorBeforeScreenSpaceRefractionSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorAfterScreenSpaceRefraction_Subrect_Base_X, pInDlssDEvalParams->InColorAfterScreenSpaceRefractionSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorAfterScreenSpaceRefraction_Subrect_Base_Y, pInDlssDEvalParams->InColorAfterScreenSpaceRefractionSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_DepthOfFieldGuide_Subrect_Base_X, pInDlssDEvalParams->InDepthOfFieldGuideSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_DepthOfFieldGuide_Subrect_Base_Y, pInDlssDEvalParams->InDepthOfFieldGuideSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorBeforeDepthOfField_Subrect_Base_X, pInDlssDEvalParams->InColorBeforeDepthOfFieldSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorBeforeDepthOfField_Subrect_Base_Y, pInDlssDEvalParams->InColorBeforeDepthOfFieldSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorAfterDepthOfField_Subrect_Base_X, pInDlssDEvalParams->InColorAfterDepthOfFieldSubtectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorAfterDepthOfField_Subrect_Base_Y, pInDlssDEvalParams->InColorAfterDepthOfFieldSubtectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_DiffuseHitDistance_Subrect_Base_X, pInDlssDEvalParams->InDiffuseHitDistanceSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_DiffuseHitDistance_Subrect_Base_Y, pInDlssDEvalParams->InDiffuseHitDistanceSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_SpecularHitDistance_Subrect_Base_X, pInDlssDEvalParams->InSpecularHitDistanceSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_SpecularHitDistance_Subrect_Base_Y, pInDlssDEvalParams->InSpecularHitDistanceSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_DiffuseRayDirection_Subrect_Base_X, pInDlssDEvalParams->InDiffuseRayDirectionSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_DiffuseRayDirection_Subrect_Base_Y, pInDlssDEvalParams->InDiffuseRayDirectionSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_SpecularRayDirection_Subrect_Base_X, pInDlssDEvalParams->InSpecularRayDirectionSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_SpecularRayDirection_Subrect_Base_Y, pInDlssDEvalParams->InSpecularRayDirectionSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_DiffuseRayDirectionHitDistance_Subrect_Base_X, pInDlssDEvalParams->InDiffuseRayDirectionHitDistanceSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_DiffuseRayDirectionHitDistance_Subrect_Base_Y, pInDlssDEvalParams->InDiffuseRayDirectionHitDistanceSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_SpecularRayDirectionHitDistance_Subrect_Base_X, pInDlssDEvalParams->InSpecularRayDirectionHitDistanceSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_SpecularRayDirectionHitDistance_Subrect_Base_Y, pInDlssDEvalParams->InSpecularRayDirectionHitDistanceSubrectBase.Y);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_DLSS_WORLD_TO_VIEW_MATRIX, pInDlssDEvalParams->pInWorldToViewMatrix);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_DLSS_VIEW_TO_CLIP_MATRIX, pInDlssDEvalParams->pInViewToClipMatrix);- NVSDK_NGX_Parameter_SetD3d12Resource(pInParams, NVSDK_NGX_Parameter_DLSS_TransparencyLayer, pInDlssDEvalParams->pInTransparencyLayer);- NVSDK_NGX_Parameter_SetD3d12Resource(pInParams, NVSDK_NGX_Parameter_DLSS_TransparencyLayerOpacity, pInDlssDEvalParams->pInTransparencyLayerOpacity);- NVSDK_NGX_Parameter_SetD3d12Resource(pInParams, NVSDK_NGX_Parameter_DLSS_TransparencyLayerMvecs, pInDlssDEvalParams->pInTransparencyLayerMvecs);- NVSDK_NGX_Parameter_SetD3d12Resource(pInParams, NVSDK_NGX_Parameter_DLSS_DisocclusionMask, pInDlssDEvalParams->pInDisocclusionMask);- NVSDK_NGX_Parameter_SetD3d12Resource(pInParams, NVSDK_NGX_Parameter_DLSSD_ResponsivityMask, pInDlssDEvalParams->pInResponsivityMask);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_TransparencyLayer_Subrect_Base_X, pInDlssDEvalParams->InTransparencyLayerSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_TransparencyLayer_Subrect_Base_Y, pInDlssDEvalParams->InTransparencyLayerSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_TransparencyLayerOpacity_Subrect_Base_X, pInDlssDEvalParams->InTransparencyLayerOpacitySubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_TransparencyLayerOpacity_Subrect_Base_Y, pInDlssDEvalParams->InTransparencyLayerOpacitySubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_TransparencyLayerMvecs_Subrect_Base_X, pInDlssDEvalParams->InTransparencyLayerMvecsSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_TransparencyLayerMvecs_Subrect_Base_Y, pInDlssDEvalParams->InTransparencyLayerMvecsSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_DisocclusionMask_Subrect_Base_X, pInDlssDEvalParams->InDisocclusionMaskSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_DisocclusionMask_Subrect_Base_Y, pInDlssDEvalParams->InDisocclusionMaskSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_ResponsivityMask_Subrect_Base_X, pInDlssDEvalParams->InResponsivityMaskSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_ResponsivityMask_Subrect_Base_Y, pInDlssDEvalParams->InResponsivityMaskSubrectBase.Y);-- return NVSDK_NGX_D3D12_EvaluateFeature_C(pInCmdList, pInHandle, pInParams, NULL);-}--#endif // NVSDK_NGX_HELPERS_DLSSD_Hdiff --git a/native/NVIDIA-DLSS/include/nvsdk_ngx_helpers_dlssd_cuda.h b/native/NVIDIA-DLSS/include/nvsdk_ngx_helpers_dlssd_cuda.hdeleted file mode 100644index e3fc446..0000000--- a/native/NVIDIA-DLSS/include/nvsdk_ngx_helpers_dlssd_cuda.h+++ /dev/null@@ -1,364 +0,0 @@-/*- * SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.- * SPDX-License-Identifier: LicenseRef-NvidiaProprietary- *- * NVIDIA CORPORATION, its affiliates and licensors retain all intellectual- * property and proprietary rights in and to this material, related- * documentation and any modifications thereto. Any use, reproduction,- * disclosure or distribution of this material and related documentation- * without an express license agreement from NVIDIA CORPORATION or- * its affiliates is strictly prohibited.- */--#ifndef NVSDK_NGX_HELPERS_DLSSD_CUDA_H-#define NVSDK_NGX_HELPERS_DLSSD_CUDA_H-#pragma once--#include "nvsdk_ngx_helpers.h"-#include "nvsdk_ngx_defs_dlssd.h"-#include "nvsdk_ngx_params_dlssd.h"-#if 1-static inline NVSDK_NGX_Result NGX_DLSSD_GET_STATS_2(- NVSDK_NGX_Parameter* pInParams,- unsigned long long* pVRAMAllocatedBytes,- unsigned int* pOptLevel, unsigned int* IsDevSnippetBranch)-{- void* Callback = NULL;- NVSDK_NGX_Parameter_GetVoidPointer(pInParams, NVSDK_NGX_Parameter_DLSSDGetStatsCallback, &Callback);- if (!Callback)- {- // Possible reasons for this:- // - Installed DLSS is out of date and does not support the feature we need- // - You used NVSDK_NGX_AllocateParameters() for creating InParams. Try using NVSDK_NGX_GetCapabilityParameters() instead- return NVSDK_NGX_Result_FAIL_OutOfDate;- }-- NVSDK_NGX_Result Res = NVSDK_NGX_Result_Success;- PFN_NVSDK_NGX_DLSS_GetStatsCallback PFNCallback = (PFN_NVSDK_NGX_DLSS_GetStatsCallback)Callback;- Res = PFNCallback(pInParams);- if (NVSDK_NGX_FAILED(Res))- {- return Res;- }- NVSDK_NGX_Parameter_GetULL(pInParams, NVSDK_NGX_Parameter_SizeInBytes, pVRAMAllocatedBytes);- NVSDK_NGX_Parameter_GetUI(pInParams, NVSDK_NGX_EParameter_OptLevel, pOptLevel);- NVSDK_NGX_Parameter_GetUI(pInParams, NVSDK_NGX_EParameter_IsDevSnippetBranch, IsDevSnippetBranch);- return Res;-}--static inline NVSDK_NGX_Result NGX_DLSSD_GET_STATS_1(- NVSDK_NGX_Parameter* pInParams,- unsigned long long* pVRAMAllocatedBytes,- unsigned int* pOptLevel)-{- unsigned int dummy = 0;- return NGX_DLSSD_GET_STATS_2(pInParams, pVRAMAllocatedBytes, pOptLevel, &dummy);-}--static inline NVSDK_NGX_Result NGX_DLSSD_GET_STATS(- NVSDK_NGX_Parameter* pInParams,- unsigned long long* pVRAMAllocatedBytes)-{- unsigned int dummy = 0;- return NGX_DLSSD_GET_STATS_2(pInParams, pVRAMAllocatedBytes, &dummy, &dummy);-}-#endif--static inline NVSDK_NGX_Result NGX_DLSSD_GET_OPTIMAL_SETTINGS(- NVSDK_NGX_Parameter* pInParams,- unsigned int InUserSelectedWidth,- unsigned int InUserSelectedHeight,- NVSDK_NGX_PerfQuality_Value InPerfQualityValue,- unsigned int* pOutRenderOptimalWidth,- unsigned int* pOutRenderOptimalHeight,- unsigned int* pOutRenderMaxWidth,- unsigned int* pOutRenderMaxHeight,- unsigned int* pOutRenderMinWidth,- unsigned int* pOutRenderMinHeight,- float* pOutSharpness)-{- void* Callback = NULL;- NVSDK_NGX_Parameter_GetVoidPointer(pInParams, NVSDK_NGX_Parameter_DLSSDOptimalSettingsCallback, &Callback);- if (!Callback)- {- // Possible reasons for this:- // - Installed DLSS is out of date and does not support the feature we need- // - You used NVSDK_NGX_AllocateParameters() for creating InParams. Try using NVSDK_NGX_GetCapabilityParameters() instead- return NVSDK_NGX_Result_FAIL_OutOfDate;- }-- // These are selections made by user in UI- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_Width, InUserSelectedWidth);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_Height, InUserSelectedHeight);- NVSDK_NGX_Parameter_SetI(pInParams, NVSDK_NGX_Parameter_PerfQualityValue, InPerfQualityValue);- NVSDK_NGX_Parameter_SetI(pInParams, NVSDK_NGX_Parameter_RTXValue, false); // Some older DLSS dlls still expect this value to be set-- NVSDK_NGX_Result Res = NVSDK_NGX_Result_Success;- PFN_NVSDK_NGX_DLSS_GetOptimalSettingsCallback PFNCallback = (PFN_NVSDK_NGX_DLSS_GetOptimalSettingsCallback)Callback;- Res = PFNCallback(pInParams);- if (NVSDK_NGX_FAILED(Res))- {- return Res;- }- NVSDK_NGX_Parameter_GetUI(pInParams, NVSDK_NGX_Parameter_OutWidth, pOutRenderOptimalWidth);- NVSDK_NGX_Parameter_GetUI(pInParams, NVSDK_NGX_Parameter_OutHeight, pOutRenderOptimalHeight);- // If we have an older DLSS Dll those might need to be set to the optimal dimensions instead- *pOutRenderMaxWidth = *pOutRenderOptimalWidth;- *pOutRenderMaxHeight = *pOutRenderOptimalHeight;- *pOutRenderMinWidth = *pOutRenderOptimalWidth;- *pOutRenderMinHeight = *pOutRenderOptimalHeight;- NVSDK_NGX_Parameter_GetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Get_Dynamic_Max_Render_Width, pOutRenderMaxWidth);- NVSDK_NGX_Parameter_GetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Get_Dynamic_Max_Render_Height, pOutRenderMaxHeight);- NVSDK_NGX_Parameter_GetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Get_Dynamic_Min_Render_Width, pOutRenderMinWidth);- NVSDK_NGX_Parameter_GetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Get_Dynamic_Min_Render_Height, pOutRenderMinHeight);- NVSDK_NGX_Parameter_GetF(pInParams, NVSDK_NGX_Parameter_Sharpness, pOutSharpness);- return Res;-}--typedef struct NVSDK_NGX_CUDA_GBuffer-{- CUtexObject* pInAttrib[NVSDK_NGX_GBUFFERTYPE_NUM];-} NVSDK_NGX_CUDA_GBuffer;--typedef struct NVSDK_NGX_CUDA_DLSSD_Create_Params-{- NVSDK_NGX_DLSSD_Create_Params Feature;- void* InCUContext;- void* InCUStream;-} NVSDK_NGX_CUDA_DLSSD_Create_Params;--static inline NVSDK_NGX_Result NGX_CUDA_CREATE_DLSSD_EXT(- NVSDK_NGX_Handle** ppOutHandle,- NVSDK_NGX_Parameter* pInParams,- NVSDK_NGX_CUDA_DLSSD_Create_Params* pInDlssDCreateParams)-{- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_Input1, pInDlssDCreateParams->InCUContext);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_Input2, pInDlssDCreateParams->InCUStream);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_Width, pInDlssDCreateParams->Feature.InWidth);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_Height, pInDlssDCreateParams->Feature.InHeight);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_OutWidth, pInDlssDCreateParams->Feature.InTargetWidth);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_OutHeight, pInDlssDCreateParams->Feature.InTargetHeight);- NVSDK_NGX_Parameter_SetI(pInParams, NVSDK_NGX_Parameter_PerfQualityValue, pInDlssDCreateParams->Feature.InPerfQualityValue);- NVSDK_NGX_Parameter_SetI(pInParams, NVSDK_NGX_Parameter_DLSS_Feature_Create_Flags, pInDlssDCreateParams->Feature.InFeatureCreateFlags);- NVSDK_NGX_Parameter_SetI(pInParams, NVSDK_NGX_Parameter_DLSS_Enable_Output_Subrects, pInDlssDCreateParams->Feature.InEnableOutputSubrects ? 1 : 0);- NVSDK_NGX_Parameter_SetI(pInParams, NVSDK_NGX_Parameter_DLSS_Denoise_Mode, NVSDK_NGX_DLSS_Denoise_Mode_DLUnified);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Roughness_Mode, pInDlssDCreateParams->Feature.InRoughnessMode);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_Use_HW_Depth, pInDlssDCreateParams->Feature.InUseHWDepth);- return NVSDK_NGX_CUDA_CreateFeature(NVSDK_NGX_Feature_RayReconstruction, pInParams, ppOutHandle);-}--static inline NVSDK_NGX_Result NGX_CUDA_CREATE_DLSSD_EXT1(- NVSDK_NGX_CUDADevice *InDevice,- NVSDK_NGX_Handle** ppOutHandle,- NVSDK_NGX_Parameter* pInParams,- NVSDK_NGX_CUDA_DLSSD_Create_Params* pInDlssDCreateParams)-{- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_Input1, pInDlssDCreateParams->InCUContext);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_Input2, pInDlssDCreateParams->InCUStream);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_Width, pInDlssDCreateParams->Feature.InWidth);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_Height, pInDlssDCreateParams->Feature.InHeight);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_OutWidth, pInDlssDCreateParams->Feature.InTargetWidth);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_OutHeight, pInDlssDCreateParams->Feature.InTargetHeight);- NVSDK_NGX_Parameter_SetI(pInParams, NVSDK_NGX_Parameter_PerfQualityValue, pInDlssDCreateParams->Feature.InPerfQualityValue);- NVSDK_NGX_Parameter_SetI(pInParams, NVSDK_NGX_Parameter_DLSS_Feature_Create_Flags, pInDlssDCreateParams->Feature.InFeatureCreateFlags);- NVSDK_NGX_Parameter_SetI(pInParams, NVSDK_NGX_Parameter_DLSS_Enable_Output_Subrects, pInDlssDCreateParams->Feature.InEnableOutputSubrects ? 1 : 0);- NVSDK_NGX_Parameter_SetI(pInParams, NVSDK_NGX_Parameter_DLSS_Denoise_Mode, NVSDK_NGX_DLSS_Denoise_Mode_DLUnified);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Roughness_Mode, pInDlssDCreateParams->Feature.InRoughnessMode);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_Use_HW_Depth, pInDlssDCreateParams->Feature.InUseHWDepth);- return NVSDK_NGX_CUDA_CreateFeature1(InDevice, NVSDK_NGX_Feature_RayReconstruction, pInParams, ppOutHandle);-}--typedef struct NVSDK_NGX_CUDA_DLSSD_Eval_Params-{- void* pInDiffuseAlbedo;- void* pInSpecularAlbedo;- void* pInNormals;- void* pInRoughness;-- void* pInColor;- void* pInOutput;- void* pInDepth;- void* pInMotionVectors;- float InJitterOffsetX; /* Jitter offset must be in input/render pixel space */- float InJitterOffsetY;- NVSDK_NGX_Dimensions InRenderSubrectDimensions;- /*** OPTIONAL - leave to 0/0.0f if unused ***/- int InReset; /* Set to 1 when scene changes completely (new level etc) */- float InMVScaleX; /* If MVs need custom scaling to convert to pixel space */- float InMVScaleY;- void* pInTransparencyMask; /* Unused/Reserved for future use */- void* pInExposureTexture;- void* pInBiasCurrentColorMask;- NVSDK_NGX_Coordinates InDiffuseAlbedoSubrectBase;- NVSDK_NGX_Coordinates InSpecularAlbedoSubrectBase;- NVSDK_NGX_Coordinates InNormalsSubrectBase;- NVSDK_NGX_Coordinates InRoughnessSubrectBase;- NVSDK_NGX_Coordinates InColorSubrectBase;- NVSDK_NGX_Coordinates InDepthSubrectBase;- NVSDK_NGX_Coordinates InMVSubrectBase;- NVSDK_NGX_Coordinates InTranslucencySubrectBase;- NVSDK_NGX_Coordinates InBiasCurrentColorSubrectBase;- NVSDK_NGX_Coordinates InOutputSubrectBase;-- void* pInReflectedAlbedo;- void* pInColorBeforeParticles;- void* pInColorBeforeTransparency;- void* pInColorBeforeFog;- void* pInDiffuseHitDistance;- void* pInSpecularHitDistance;- void* pInDiffuseRayDirection;- void* pInSpecularRayDirection;- void* pInDiffuseRayDirectionHitDistance;- void* pInSpecularRayDirectionHitDistance;- NVSDK_NGX_Coordinates InReflectedAlbedoSubrectBase;- NVSDK_NGX_Coordinates InColorBeforeParticlesSubrectBase;- NVSDK_NGX_Coordinates InColorBeforeTransparencySubrectBase;- NVSDK_NGX_Coordinates InColorBeforeFogSubrectBase;- NVSDK_NGX_Coordinates InDiffuseHitDistanceSubrectBase;- NVSDK_NGX_Coordinates InSpecularHitDistanceSubrectBase;- NVSDK_NGX_Coordinates InDiffuseRayDirectionSubrectBase;- NVSDK_NGX_Coordinates InSpecularRayDirectionSubrectBase;- NVSDK_NGX_Coordinates InDiffuseRayDirectionHitDistanceSubrectBase;- NVSDK_NGX_Coordinates InSpecularRayDirectionHitDistanceSubrectBase;- float* pInWorldToViewMatrix;- float* pInViewToClipMatrix;-- float InPreExposure;- float InExposureScale;- int InIndicatorInvertXAxis;- int InIndicatorInvertYAxis;- /*** OPTIONAL - only for research purposes ***/- NVSDK_NGX_CUDA_GBuffer GBufferSurface;- NVSDK_NGX_ToneMapperType InToneMapperType;- void* pInMotionVectors3D;- void* pInIsParticleMask; /* to identify which pixels contains particles, essentially that are not drawn as part of base pass */- void* pInAnimatedTextureMask; /* a binary mask covering pixels occupied by animated textures */- void* pInDepthHighRes;- void* pInPositionViewSpace;- float InFrameTimeDeltaInMsec; /* helps in determining the amount to denoise or anti-alias based on the speed of the object from motion vector magnitudes and fps as determined by this delta */- void* pInRayTracingHitDistance; /* for each effect - approximation to the amount of noise in a ray-traced color */- void* pInMotionVectorsReflections; /* motion vectors of reflected objects like for mirrored surfaces */- void* pInTransparencyLayer; /* optional input res particle layer */- NVSDK_NGX_Coordinates InTransparencyLayerSubrectBase;- void* pInTransparencyLayerOpacity; /* optional input res particle opacity layer */- NVSDK_NGX_Coordinates InTransparencyLayerOpacitySubrectBase;-} NVSDK_NGX_CUDA_DLSSD_Eval_Params;--static inline NVSDK_NGX_Result NGX_CUDA_EVALUATE_DLSSD_EXT(- NVSDK_NGX_Handle* pInHandle,- NVSDK_NGX_Parameter* pInParams,- NVSDK_NGX_CUDA_DLSSD_Eval_Params* pInDlssDEvalParams)-{- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_Color, pInDlssDEvalParams->pInColor);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_Output, pInDlssDEvalParams->pInOutput);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_Depth, pInDlssDEvalParams->pInDepth);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_MotionVectors, pInDlssDEvalParams->pInMotionVectors);- NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_Parameter_Jitter_Offset_X, pInDlssDEvalParams->InJitterOffsetX);- NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_Parameter_Jitter_Offset_Y, pInDlssDEvalParams->InJitterOffsetY);- NVSDK_NGX_Parameter_SetI(pInParams, NVSDK_NGX_Parameter_Reset, pInDlssDEvalParams->InReset);- NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_Parameter_MV_Scale_X, pInDlssDEvalParams->InMVScaleX == 0.0f ? 1.0f : pInDlssDEvalParams->InMVScaleX);- NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_Parameter_MV_Scale_Y, pInDlssDEvalParams->InMVScaleY == 0.0f ? 1.0f : pInDlssDEvalParams->InMVScaleY);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_TransparencyMask, pInDlssDEvalParams->pInTransparencyMask);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_ExposureTexture, pInDlssDEvalParams->pInExposureTexture);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_DLSS_Input_Bias_Current_Color_Mask, pInDlssDEvalParams->pInBiasCurrentColorMask);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_GBuffer_Albedo, pInDlssDEvalParams->GBufferSurface.pInAttrib[NVSDK_NGX_GBUFFER_ALBEDO]);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_GBuffer_Roughness, pInDlssDEvalParams->GBufferSurface.pInAttrib[NVSDK_NGX_GBUFFER_ROUGHNESS]);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_GBuffer_Metallic, pInDlssDEvalParams->GBufferSurface.pInAttrib[NVSDK_NGX_GBUFFER_METALLIC]);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_GBuffer_Specular, pInDlssDEvalParams->GBufferSurface.pInAttrib[NVSDK_NGX_GBUFFER_SPECULAR]);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_GBuffer_Subsurface, pInDlssDEvalParams->GBufferSurface.pInAttrib[NVSDK_NGX_GBUFFER_SUBSURFACE]);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_GBuffer_Normals, pInDlssDEvalParams->GBufferSurface.pInAttrib[NVSDK_NGX_GBUFFER_NORMALS]);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_GBuffer_ShadingModelId, pInDlssDEvalParams->GBufferSurface.pInAttrib[NVSDK_NGX_GBUFFER_SHADINGMODELID]);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_GBuffer_MaterialId, pInDlssDEvalParams->GBufferSurface.pInAttrib[NVSDK_NGX_GBUFFER_MATERIALID]);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_GBuffer_Atrrib_8, pInDlssDEvalParams->GBufferSurface.pInAttrib[8]);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_GBuffer_Atrrib_9, pInDlssDEvalParams->GBufferSurface.pInAttrib[9]);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_GBuffer_Atrrib_11, pInDlssDEvalParams->GBufferSurface.pInAttrib[11]);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_GBuffer_Atrrib_12, pInDlssDEvalParams->GBufferSurface.pInAttrib[12]);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_GBuffer_Atrrib_13, pInDlssDEvalParams->GBufferSurface.pInAttrib[13]);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_GBuffer_Atrrib_14, pInDlssDEvalParams->GBufferSurface.pInAttrib[14]);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_GBuffer_Atrrib_15, pInDlssDEvalParams->GBufferSurface.pInAttrib[15]);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_TonemapperType, pInDlssDEvalParams->InToneMapperType);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_MotionVectors3D, pInDlssDEvalParams->pInMotionVectors3D);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_IsParticleMask, pInDlssDEvalParams->pInIsParticleMask);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_AnimatedTextureMask, pInDlssDEvalParams->pInAnimatedTextureMask);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_DepthHighRes, pInDlssDEvalParams->pInDepthHighRes);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_Position_ViewSpace, pInDlssDEvalParams->pInPositionViewSpace);- NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_Parameter_FrameTimeDeltaInMsec, pInDlssDEvalParams->InFrameTimeDeltaInMsec);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_RayTracingHitDistance, pInDlssDEvalParams->pInRayTracingHitDistance);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_GBuffer_SpecularMvec, pInDlssDEvalParams->pInMotionVectorsReflections);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Input_Color_Subrect_Base_X, pInDlssDEvalParams->InColorSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Input_Color_Subrect_Base_Y, pInDlssDEvalParams->InColorSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Input_Depth_Subrect_Base_X, pInDlssDEvalParams->InDepthSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Input_Depth_Subrect_Base_Y, pInDlssDEvalParams->InDepthSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Input_MV_SubrectBase_X, pInDlssDEvalParams->InMVSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Input_MV_SubrectBase_Y, pInDlssDEvalParams->InMVSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Input_Translucency_SubrectBase_X, pInDlssDEvalParams->InTranslucencySubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Input_Translucency_SubrectBase_Y, pInDlssDEvalParams->InTranslucencySubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Input_Bias_Current_Color_SubrectBase_X, pInDlssDEvalParams->InBiasCurrentColorSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Input_Bias_Current_Color_SubrectBase_Y, pInDlssDEvalParams->InBiasCurrentColorSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Output_Subrect_Base_X, pInDlssDEvalParams->InOutputSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Output_Subrect_Base_Y, pInDlssDEvalParams->InOutputSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Render_Subrect_Dimensions_Width, pInDlssDEvalParams->InRenderSubrectDimensions.Width);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Render_Subrect_Dimensions_Height, pInDlssDEvalParams->InRenderSubrectDimensions.Height);- NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_Parameter_DLSS_Pre_Exposure, pInDlssDEvalParams->InPreExposure == 0.0f ? 1.0f : pInDlssDEvalParams->InPreExposure);- NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_Parameter_DLSS_Exposure_Scale, pInDlssDEvalParams->InExposureScale == 0.0f ? 1.0f : pInDlssDEvalParams->InExposureScale);- NVSDK_NGX_Parameter_SetI(pInParams, NVSDK_NGX_Parameter_DLSS_Indicator_Invert_X_Axis, pInDlssDEvalParams->InIndicatorInvertXAxis);- NVSDK_NGX_Parameter_SetI(pInParams, NVSDK_NGX_Parameter_DLSS_Indicator_Invert_Y_Axis, pInDlssDEvalParams->InIndicatorInvertYAxis);-- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_GBuffer_Emissive, pInDlssDEvalParams->GBufferSurface.pInAttrib[NVSDK_NGX_GBUFFER_EMISSIVE]);-- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_DiffuseAlbedo, pInDlssDEvalParams->pInDiffuseAlbedo);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_SpecularAlbedo, pInDlssDEvalParams->pInSpecularAlbedo);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Input_DiffuseAlbedo_Subrect_Base_X, pInDlssDEvalParams->InDiffuseAlbedoSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Input_DiffuseAlbedo_Subrect_Base_Y, pInDlssDEvalParams->InDiffuseAlbedoSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Input_SpecularAlbedo_Subrect_Base_X, pInDlssDEvalParams->InSpecularAlbedoSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Input_SpecularAlbedo_Subrect_Base_Y, pInDlssDEvalParams->InSpecularAlbedoSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Input_Normals_Subrect_Base_X, pInDlssDEvalParams->InNormalsSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Input_Normals_Subrect_Base_Y, pInDlssDEvalParams->InNormalsSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Input_Roughness_Subrect_Base_X, pInDlssDEvalParams->InRoughnessSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Input_Roughness_Subrect_Base_Y, pInDlssDEvalParams->InRoughnessSubrectBase.Y);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_GBuffer_Normals, pInDlssDEvalParams->pInNormals);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_GBuffer_Roughness, pInDlssDEvalParams->pInRoughness);-- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_DLSSD_ReflectedAlbedo, pInDlssDEvalParams->pInReflectedAlbedo);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorBeforeParticles, pInDlssDEvalParams->pInColorBeforeParticles);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorBeforeTransparency, pInDlssDEvalParams->pInColorBeforeTransparency);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorBeforeFog, pInDlssDEvalParams->pInColorBeforeFog);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_DLSSD_DiffuseHitDistance, pInDlssDEvalParams->pInDiffuseHitDistance);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_DLSSD_SpecularHitDistance, pInDlssDEvalParams->pInSpecularHitDistance);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_DLSSD_DiffuseRayDirection, pInDlssDEvalParams->pInDiffuseRayDirection);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_DLSSD_SpecularRayDirection, pInDlssDEvalParams->pInSpecularRayDirection);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_DLSSD_DiffuseRayDirectionHitDistance, pInDlssDEvalParams->pInDiffuseRayDirectionHitDistance);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_DLSSD_SpecularRayDirectionHitDistance, pInDlssDEvalParams->pInSpecularRayDirectionHitDistance);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_ReflectedAlbedo_Subrect_Base_X, pInDlssDEvalParams->InReflectedAlbedoSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_ReflectedAlbedo_Subrect_Base_Y, pInDlssDEvalParams->InReflectedAlbedoSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorBeforeParticles_Subrect_Base_X, pInDlssDEvalParams->InColorBeforeParticlesSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorBeforeParticles_Subrect_Base_Y, pInDlssDEvalParams->InColorBeforeParticlesSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorBeforeTransparency_Subrect_Base_X, pInDlssDEvalParams->InColorBeforeTransparencySubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorBeforeTransparency_Subrect_Base_Y, pInDlssDEvalParams->InColorBeforeTransparencySubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorBeforeFog_Subrect_Base_X, pInDlssDEvalParams->InColorBeforeFogSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorBeforeFog_Subrect_Base_Y, pInDlssDEvalParams->InColorBeforeFogSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_DiffuseHitDistance_Subrect_Base_X, pInDlssDEvalParams->InDiffuseHitDistanceSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_DiffuseHitDistance_Subrect_Base_Y, pInDlssDEvalParams->InDiffuseHitDistanceSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_SpecularHitDistance_Subrect_Base_X, pInDlssDEvalParams->InSpecularHitDistanceSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_SpecularHitDistance_Subrect_Base_Y, pInDlssDEvalParams->InSpecularHitDistanceSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_DiffuseRayDirection_Subrect_Base_X, pInDlssDEvalParams->InDiffuseRayDirectionSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_DiffuseRayDirection_Subrect_Base_Y, pInDlssDEvalParams->InDiffuseRayDirectionSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_SpecularRayDirection_Subrect_Base_X, pInDlssDEvalParams->InSpecularRayDirectionSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_SpecularRayDirection_Subrect_Base_Y, pInDlssDEvalParams->InSpecularRayDirectionSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_DiffuseRayDirectionHitDistance_Subrect_Base_X, pInDlssDEvalParams->InDiffuseRayDirectionHitDistanceSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_DiffuseRayDirectionHitDistance_Subrect_Base_Y, pInDlssDEvalParams->InDiffuseRayDirectionHitDistanceSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_SpecularRayDirectionHitDistance_Subrect_Base_X, pInDlssDEvalParams->InSpecularRayDirectionHitDistanceSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_SpecularRayDirectionHitDistance_Subrect_Base_Y, pInDlssDEvalParams->InSpecularRayDirectionHitDistanceSubrectBase.Y);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_DLSS_WORLD_TO_VIEW_MATRIX, pInDlssDEvalParams->pInWorldToViewMatrix);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_DLSS_VIEW_TO_CLIP_MATRIX, pInDlssDEvalParams->pInViewToClipMatrix);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_DLSS_TransparencyLayer, pInDlssDEvalParams->pInTransparencyLayer);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_DLSS_TransparencyLayerOpacity, pInDlssDEvalParams->pInTransparencyLayerOpacity);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_TransparencyLayer_Subrect_Base_X, pInDlssDEvalParams->InTransparencyLayerSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_TransparencyLayer_Subrect_Base_Y, pInDlssDEvalParams->InTransparencyLayerSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_TransparencyLayerOpacity_Subrect_Base_X, pInDlssDEvalParams->InTransparencyLayerOpacitySubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_TransparencyLayerOpacity_Subrect_Base_Y, pInDlssDEvalParams->InTransparencyLayerOpacitySubrectBase.Y);-- return NVSDK_NGX_CUDA_EvaluateFeature_C(pInHandle, pInParams, NULL);-}--#endif // NVSDK_NGX_HELPERS_DLSSD_CUDA_Hdiff --git a/native/NVIDIA-DLSS/include/nvsdk_ngx_helpers_dlssd_vk.h b/native/NVIDIA-DLSS/include/nvsdk_ngx_helpers_dlssd_vk.hdeleted file mode 100644index 7ebe159..0000000--- a/native/NVIDIA-DLSS/include/nvsdk_ngx_helpers_dlssd_vk.h+++ /dev/null@@ -1,379 +0,0 @@-/*- * SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.- * SPDX-License-Identifier: LicenseRef-NvidiaProprietary- *- * NVIDIA CORPORATION, its affiliates and licensors retain all intellectual- * property and proprietary rights in and to this material, related- * documentation and any modifications thereto. Any use, reproduction,- * disclosure or distribution of this material and related documentation- * without an express license agreement from NVIDIA CORPORATION or- * its affiliates is strictly prohibited.- */--#ifndef NVSDK_NGX_HELPERS_DLSSD_VK_H-#define NVSDK_NGX_HELPERS_DLSSD_VK_H-#pragma once--#include "nvsdk_ngx_vk.h"-#include "nvsdk_ngx_defs_dlssd.h"-#include "nvsdk_ngx_params_dlssd.h"--typedef struct NVSDK_NGX_VK_DLSSD_Eval_Params-{- NVSDK_NGX_Resource_VK* pInDiffuseAlbedo;- NVSDK_NGX_Resource_VK* pInSpecularAlbedo;- NVSDK_NGX_Resource_VK* pInNormals;- NVSDK_NGX_Resource_VK* pInRoughness;-- NVSDK_NGX_Resource_VK* pInColor;- NVSDK_NGX_Resource_VK* pInAlpha;- NVSDK_NGX_Resource_VK* pInOutput;- NVSDK_NGX_Resource_VK* pInOutputAlpha;- NVSDK_NGX_Resource_VK * pInDepth;- NVSDK_NGX_Resource_VK * pInMotionVectors;- float InJitterOffsetX; /* Jitter offset must be in input/render pixel space */- float InJitterOffsetY;- NVSDK_NGX_Dimensions InRenderSubrectDimensions;- /*** OPTIONAL - leave to 0/0.0f if unused ***/- int InReset; /* Set to 1 when scene changes completely (new level etc) */- float InMVScaleX; /* If MVs need custom scaling to convert to pixel space */- float InMVScaleY;- NVSDK_NGX_Resource_VK * pInTransparencyMask; /* Unused/Reserved for future use */- NVSDK_NGX_Resource_VK * pInExposureTexture;- NVSDK_NGX_Resource_VK * pInBiasCurrentColorMask;- NVSDK_NGX_Coordinates InAlphaSubrectBase;- NVSDK_NGX_Coordinates InOutputAlphaSubrectBase;- NVSDK_NGX_Coordinates InDiffuseAlbedoSubrectBase;- NVSDK_NGX_Coordinates InSpecularAlbedoSubrectBase;- NVSDK_NGX_Coordinates InNormalsSubrectBase;- NVSDK_NGX_Coordinates InRoughnessSubrectBase;- NVSDK_NGX_Coordinates InColorSubrectBase;- NVSDK_NGX_Coordinates InDepthSubrectBase;- NVSDK_NGX_Coordinates InMVSubrectBase;- NVSDK_NGX_Coordinates InTranslucencySubrectBase;- NVSDK_NGX_Coordinates InBiasCurrentColorSubrectBase;- NVSDK_NGX_Coordinates InOutputSubrectBase;- float InPreExposure;- float InExposureScale;- int InIndicatorInvertXAxis;- int InIndicatorInvertYAxis;- /*** OPTIONAL - only for research purposes ***/-- NVSDK_NGX_Resource_VK* pInReflectedAlbedo;- NVSDK_NGX_Resource_VK* pInColorBeforeParticles;- NVSDK_NGX_Resource_VK* pInColorAfterParticles;- NVSDK_NGX_Resource_VK* pInColorBeforeTransparency;- NVSDK_NGX_Resource_VK* pInColorAfterTransparency;- NVSDK_NGX_Resource_VK* pInColorBeforeFog;- NVSDK_NGX_Resource_VK* pInColorAfterFog;- NVSDK_NGX_Resource_VK* pInScreenSpaceSubsurfaceScatteringGuide;- NVSDK_NGX_Resource_VK* pInColorBeforeScreenSpaceSubsurfaceScattering;- NVSDK_NGX_Resource_VK* pInColorAfterScreenSpaceSubsurfaceScattering;- NVSDK_NGX_Resource_VK* pInScreenSpaceRefractionGuide;- NVSDK_NGX_Resource_VK* pInColorBeforeScreenSpaceRefraction;- NVSDK_NGX_Resource_VK* pInColorAfterScreenSpaceRefraction;- NVSDK_NGX_Resource_VK* pInDepthOfFieldGuide;- NVSDK_NGX_Resource_VK* pInColorBeforeDepthOfField;- NVSDK_NGX_Resource_VK* pInColorAfterDepthOfField;- NVSDK_NGX_Resource_VK* pInDiffuseHitDistance;- NVSDK_NGX_Resource_VK* pInSpecularHitDistance;- NVSDK_NGX_Resource_VK* pInDiffuseRayDirection;- NVSDK_NGX_Resource_VK* pInSpecularRayDirection;- NVSDK_NGX_Resource_VK* pInDiffuseRayDirectionHitDistance;- NVSDK_NGX_Resource_VK* pInSpecularRayDirectionHitDistance;- NVSDK_NGX_Coordinates InReflectedAlbedoSubrectBase;- NVSDK_NGX_Coordinates InColorBeforeParticlesSubrectBase;- NVSDK_NGX_Coordinates InColorAfterParticlesSubrectBase;- NVSDK_NGX_Coordinates InColorBeforeTransparencySubrectBase;- NVSDK_NGX_Coordinates InColorAfterTransparencySubrectBase;- NVSDK_NGX_Coordinates InColorBeforeFogSubrectBase;- NVSDK_NGX_Coordinates InColorAfterFogSubrectBase;- NVSDK_NGX_Coordinates InScreenSpaceSubsurfaceScatteringGuideSubrectBase;- NVSDK_NGX_Coordinates InColorBeforeScreenSpaceSubsurfaceScatteringSubrectBase;- NVSDK_NGX_Coordinates InColorAfterScreenSpaceSubsurfaceScatteringSubrectBase;- NVSDK_NGX_Coordinates InScreenSpaceRefractionGuideSubrectBase;- NVSDK_NGX_Coordinates InColorBeforeScreenSpaceRefractionSubrectBase;- NVSDK_NGX_Coordinates InColorAfterScreenSpaceRefractionSubrectBase;- NVSDK_NGX_Coordinates InDepthOfFieldGuideSubrectBase;- NVSDK_NGX_Coordinates InColorBeforeDepthOfFieldSubrectBase;- NVSDK_NGX_Coordinates InColorAfterDepthOfFieldSubrectBase;- NVSDK_NGX_Coordinates InDiffuseHitDistanceSubrectBase;- NVSDK_NGX_Coordinates InSpecularHitDistanceSubrectBase;- NVSDK_NGX_Coordinates InDiffuseRayDirectionSubrectBase;- NVSDK_NGX_Coordinates InSpecularRayDirectionSubrectBase;- NVSDK_NGX_Coordinates InDiffuseRayDirectionHitDistanceSubrectBase;- NVSDK_NGX_Coordinates InSpecularRayDirectionHitDistanceSubrectBase;- float* pInWorldToViewMatrix;- float* pInViewToClipMatrix;-- NVSDK_NGX_VK_GBuffer GBufferSurface;- NVSDK_NGX_ToneMapperType InToneMapperType;- NVSDK_NGX_Resource_VK * pInMotionVectors3D;- NVSDK_NGX_Resource_VK * pInIsParticleMask; /* to identify which pixels contains particles, essentially that are not drawn as part of base pass */- NVSDK_NGX_Resource_VK * pInAnimatedTextureMask; /* a binary mask covering pixels occupied by animated textures */- NVSDK_NGX_Resource_VK * pInDepthHighRes;- NVSDK_NGX_Resource_VK * pInPositionViewSpace;- float InFrameTimeDeltaInMsec; /* helps in determining the amount to denoise or anti-alias based on the speed of the object from motion vector magnitudes and fps as determined by this delta */- NVSDK_NGX_Resource_VK * pInRayTracingHitDistance; /* for each effect - approximation to the amount of noise in a ray-traced color */- NVSDK_NGX_Resource_VK * pInMotionVectorsReflections; /* motion vectors of reflected objects like for mirrored surfaces */- NVSDK_NGX_Resource_VK* pInTransparencyLayer; /* optional input res particle layer */- NVSDK_NGX_Coordinates InTransparencyLayerSubrectBase;- NVSDK_NGX_Resource_VK* pInTransparencyLayerOpacity; /* optional input res particle opacity layer */- NVSDK_NGX_Coordinates InTransparencyLayerOpacitySubrectBase;- NVSDK_NGX_Resource_VK* pInTransparencyLayerMvecs; /* optional input res transparency layer mvecs */- NVSDK_NGX_Coordinates InTransparencyLayerMvecsSubrectBase;- NVSDK_NGX_Resource_VK* pInDisocclusionMask; /* optional input res disocclusion mask */- NVSDK_NGX_Coordinates InDisocclusionMaskSubrectBase;- NVSDK_NGX_Resource_VK* pInResponsivityMask; /* optional input res responsivity mask; one channel, R16F or R8 SNORM */- NVSDK_NGX_Coordinates InResponsivityMaskSubrectBase;-} NVSDK_NGX_VK_DLSSD_Eval_Params;--static inline NVSDK_NGX_Result NGX_VULKAN_CREATE_DLSSD_EXT1(- VkDevice InDevice,- VkCommandBuffer InCmdList,- unsigned int InCreationNodeMask,- unsigned int InVisibilityNodeMask,- NVSDK_NGX_Handle **ppOutHandle,- NVSDK_NGX_Parameter *pInParams,- NVSDK_NGX_DLSSD_Create_Params *pInDlssDCreateParams)-{- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_CreationNodeMask, InCreationNodeMask);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_VisibilityNodeMask, InVisibilityNodeMask);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_Width, pInDlssDCreateParams->InWidth);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_Height, pInDlssDCreateParams->InHeight);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_OutWidth, pInDlssDCreateParams->InTargetWidth);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_OutHeight, pInDlssDCreateParams->InTargetHeight);- NVSDK_NGX_Parameter_SetI(pInParams, NVSDK_NGX_Parameter_PerfQualityValue, pInDlssDCreateParams->InPerfQualityValue);- NVSDK_NGX_Parameter_SetI(pInParams, NVSDK_NGX_Parameter_DLSS_Feature_Create_Flags, pInDlssDCreateParams->InFeatureCreateFlags);- NVSDK_NGX_Parameter_SetI(pInParams, NVSDK_NGX_Parameter_DLSS_Enable_Output_Subrects, pInDlssDCreateParams->InEnableOutputSubrects ? 1 : 0);- NVSDK_NGX_Parameter_SetI(pInParams, NVSDK_NGX_Parameter_DLSS_Denoise_Mode, NVSDK_NGX_DLSS_Denoise_Mode_DLUnified);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Roughness_Mode, pInDlssDCreateParams->InRoughnessMode);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_Use_HW_Depth, pInDlssDCreateParams->InUseHWDepth);-- if (InDevice) return NVSDK_NGX_VULKAN_CreateFeature1(InDevice, InCmdList, NVSDK_NGX_Feature_RayReconstruction, pInParams, ppOutHandle);- else return NVSDK_NGX_VULKAN_CreateFeature(InCmdList, NVSDK_NGX_Feature_RayReconstruction, pInParams, ppOutHandle);-}--static inline NVSDK_NGX_Result NGX_VULKAN_EVALUATE_DLSSD_EXT(- VkCommandBuffer InCmdList,- NVSDK_NGX_Handle *pInHandle,- NVSDK_NGX_Parameter *pInParams,- NVSDK_NGX_VK_DLSSD_Eval_Params *pInDlssDEvalParams)-{- NVSDK_NGX_ENSURE_VK_IMAGEVIEW(pInDlssDEvalParams->pInColor);- NVSDK_NGX_ENSURE_VK_IMAGEVIEW(pInDlssDEvalParams->pInAlpha);- NVSDK_NGX_ENSURE_VK_IMAGEVIEW(pInDlssDEvalParams->pInMotionVectors);- NVSDK_NGX_ENSURE_VK_IMAGEVIEW(pInDlssDEvalParams->pInOutput);- NVSDK_NGX_ENSURE_VK_IMAGEVIEW(pInDlssDEvalParams->pInOutputAlpha);- NVSDK_NGX_ENSURE_VK_IMAGEVIEW(pInDlssDEvalParams->pInDepth);- NVSDK_NGX_ENSURE_VK_IMAGEVIEW(pInDlssDEvalParams->pInDiffuseAlbedo);- NVSDK_NGX_ENSURE_VK_IMAGEVIEW(pInDlssDEvalParams->pInSpecularAlbedo);- NVSDK_NGX_ENSURE_VK_IMAGEVIEW(pInDlssDEvalParams->pInTransparencyMask);- NVSDK_NGX_ENSURE_VK_IMAGEVIEW(pInDlssDEvalParams->pInExposureTexture);- NVSDK_NGX_ENSURE_VK_IMAGEVIEW(pInDlssDEvalParams->pInBiasCurrentColorMask);- for (size_t i = 0; i <= 15; i++)- {- NVSDK_NGX_ENSURE_VK_IMAGEVIEW(pInDlssDEvalParams->GBufferSurface.pInAttrib[i]);- }- NVSDK_NGX_ENSURE_VK_IMAGEVIEW(pInDlssDEvalParams->pInMotionVectors3D);- NVSDK_NGX_ENSURE_VK_IMAGEVIEW(pInDlssDEvalParams->pInIsParticleMask);- NVSDK_NGX_ENSURE_VK_IMAGEVIEW(pInDlssDEvalParams->pInAnimatedTextureMask);- NVSDK_NGX_ENSURE_VK_IMAGEVIEW(pInDlssDEvalParams->pInDepthHighRes);- NVSDK_NGX_ENSURE_VK_IMAGEVIEW(pInDlssDEvalParams->pInPositionViewSpace);- NVSDK_NGX_ENSURE_VK_IMAGEVIEW(pInDlssDEvalParams->pInRayTracingHitDistance);- NVSDK_NGX_ENSURE_VK_IMAGEVIEW(pInDlssDEvalParams->pInMotionVectorsReflections);- NVSDK_NGX_ENSURE_VK_IMAGEVIEW(pInDlssDEvalParams->pInReflectedAlbedo);- NVSDK_NGX_ENSURE_VK_IMAGEVIEW(pInDlssDEvalParams->pInColorBeforeParticles);- NVSDK_NGX_ENSURE_VK_IMAGEVIEW(pInDlssDEvalParams->pInColorAfterParticles);- NVSDK_NGX_ENSURE_VK_IMAGEVIEW(pInDlssDEvalParams->pInColorBeforeTransparency);- NVSDK_NGX_ENSURE_VK_IMAGEVIEW(pInDlssDEvalParams->pInColorAfterTransparency);- NVSDK_NGX_ENSURE_VK_IMAGEVIEW(pInDlssDEvalParams->pInColorBeforeFog);- NVSDK_NGX_ENSURE_VK_IMAGEVIEW(pInDlssDEvalParams->pInColorAfterFog);- NVSDK_NGX_ENSURE_VK_IMAGEVIEW(pInDlssDEvalParams->pInScreenSpaceSubsurfaceScatteringGuide);- NVSDK_NGX_ENSURE_VK_IMAGEVIEW(pInDlssDEvalParams->pInColorBeforeScreenSpaceSubsurfaceScattering);- NVSDK_NGX_ENSURE_VK_IMAGEVIEW(pInDlssDEvalParams->pInColorAfterScreenSpaceSubsurfaceScattering);- NVSDK_NGX_ENSURE_VK_IMAGEVIEW(pInDlssDEvalParams->pInScreenSpaceRefractionGuide);- NVSDK_NGX_ENSURE_VK_IMAGEVIEW(pInDlssDEvalParams->pInColorBeforeScreenSpaceRefraction);- NVSDK_NGX_ENSURE_VK_IMAGEVIEW(pInDlssDEvalParams->pInColorAfterScreenSpaceRefraction);- NVSDK_NGX_ENSURE_VK_IMAGEVIEW(pInDlssDEvalParams->pInDepthOfFieldGuide);- NVSDK_NGX_ENSURE_VK_IMAGEVIEW(pInDlssDEvalParams->pInColorBeforeDepthOfField);- NVSDK_NGX_ENSURE_VK_IMAGEVIEW(pInDlssDEvalParams->pInColorAfterDepthOfField);- NVSDK_NGX_ENSURE_VK_IMAGEVIEW(pInDlssDEvalParams->pInDiffuseHitDistance);- NVSDK_NGX_ENSURE_VK_IMAGEVIEW(pInDlssDEvalParams->pInSpecularHitDistance);- NVSDK_NGX_ENSURE_VK_IMAGEVIEW(pInDlssDEvalParams->pInDiffuseRayDirection);- NVSDK_NGX_ENSURE_VK_IMAGEVIEW(pInDlssDEvalParams->pInSpecularRayDirection);- NVSDK_NGX_ENSURE_VK_IMAGEVIEW(pInDlssDEvalParams->pInDiffuseRayDirectionHitDistance);- NVSDK_NGX_ENSURE_VK_IMAGEVIEW(pInDlssDEvalParams->pInSpecularRayDirectionHitDistance);- NVSDK_NGX_ENSURE_VK_IMAGEVIEW(pInDlssDEvalParams->pInTransparencyLayer);- NVSDK_NGX_ENSURE_VK_IMAGEVIEW(pInDlssDEvalParams->pInTransparencyLayerOpacity);- NVSDK_NGX_ENSURE_VK_IMAGEVIEW(pInDlssDEvalParams->pInTransparencyLayerMvecs);- NVSDK_NGX_ENSURE_VK_IMAGEVIEW(pInDlssDEvalParams->pInDisocclusionMask);- NVSDK_NGX_ENSURE_VK_IMAGEVIEW(pInDlssDEvalParams->pInResponsivityMask);-- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_Color, pInDlssDEvalParams->pInColor);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_Output, pInDlssDEvalParams->pInOutput);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_Depth, pInDlssDEvalParams->pInDepth);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_MotionVectors, pInDlssDEvalParams->pInMotionVectors);- NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_Parameter_Jitter_Offset_X, pInDlssDEvalParams->InJitterOffsetX);- NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_Parameter_Jitter_Offset_Y, pInDlssDEvalParams->InJitterOffsetY);- NVSDK_NGX_Parameter_SetI(pInParams, NVSDK_NGX_Parameter_Reset, pInDlssDEvalParams->InReset);- NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_Parameter_MV_Scale_X, pInDlssDEvalParams->InMVScaleX == 0.0f ? 1.0f : pInDlssDEvalParams->InMVScaleX);- NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_Parameter_MV_Scale_Y, pInDlssDEvalParams->InMVScaleY == 0.0f ? 1.0f : pInDlssDEvalParams->InMVScaleY);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_TransparencyMask, pInDlssDEvalParams->pInTransparencyMask);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_ExposureTexture, pInDlssDEvalParams->pInExposureTexture);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_DLSS_Input_Bias_Current_Color_Mask, pInDlssDEvalParams->pInBiasCurrentColorMask);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_GBuffer_Albedo, pInDlssDEvalParams->GBufferSurface.pInAttrib[NVSDK_NGX_GBUFFER_ALBEDO]);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_GBuffer_Roughness, pInDlssDEvalParams->GBufferSurface.pInAttrib[NVSDK_NGX_GBUFFER_ROUGHNESS]);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_GBuffer_Metallic, pInDlssDEvalParams->GBufferSurface.pInAttrib[NVSDK_NGX_GBUFFER_METALLIC]);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_GBuffer_Specular, pInDlssDEvalParams->GBufferSurface.pInAttrib[NVSDK_NGX_GBUFFER_SPECULAR]);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_GBuffer_Subsurface, pInDlssDEvalParams->GBufferSurface.pInAttrib[NVSDK_NGX_GBUFFER_SUBSURFACE]);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_GBuffer_Normals, pInDlssDEvalParams->GBufferSurface.pInAttrib[NVSDK_NGX_GBUFFER_NORMALS]);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_GBuffer_ShadingModelId, pInDlssDEvalParams->GBufferSurface.pInAttrib[NVSDK_NGX_GBUFFER_SHADINGMODELID]);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_GBuffer_MaterialId, pInDlssDEvalParams->GBufferSurface.pInAttrib[NVSDK_NGX_GBUFFER_MATERIALID]);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_GBuffer_Atrrib_8, pInDlssDEvalParams->GBufferSurface.pInAttrib[8]);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_GBuffer_Atrrib_9, pInDlssDEvalParams->GBufferSurface.pInAttrib[9]);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_GBuffer_SpecularMvec, pInDlssDEvalParams->pInMotionVectorsReflections);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_GBuffer_Atrrib_11, pInDlssDEvalParams->GBufferSurface.pInAttrib[11]);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_GBuffer_Atrrib_12, pInDlssDEvalParams->GBufferSurface.pInAttrib[12]);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_GBuffer_Atrrib_13, pInDlssDEvalParams->GBufferSurface.pInAttrib[13]);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_GBuffer_Atrrib_14, pInDlssDEvalParams->GBufferSurface.pInAttrib[14]);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_GBuffer_Atrrib_15, pInDlssDEvalParams->GBufferSurface.pInAttrib[15]);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_TonemapperType, pInDlssDEvalParams->InToneMapperType);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_MotionVectors3D, pInDlssDEvalParams->pInMotionVectors3D);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_IsParticleMask, pInDlssDEvalParams->pInIsParticleMask);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_AnimatedTextureMask, pInDlssDEvalParams->pInAnimatedTextureMask);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_DepthHighRes, pInDlssDEvalParams->pInDepthHighRes);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_Position_ViewSpace, pInDlssDEvalParams->pInPositionViewSpace);- NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_Parameter_FrameTimeDeltaInMsec, pInDlssDEvalParams->InFrameTimeDeltaInMsec);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_RayTracingHitDistance, pInDlssDEvalParams->pInRayTracingHitDistance);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Input_Color_Subrect_Base_X, pInDlssDEvalParams->InColorSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Input_Color_Subrect_Base_Y, pInDlssDEvalParams->InColorSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Input_Depth_Subrect_Base_X, pInDlssDEvalParams->InDepthSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Input_Depth_Subrect_Base_Y, pInDlssDEvalParams->InDepthSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Input_MV_SubrectBase_X, pInDlssDEvalParams->InMVSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Input_MV_SubrectBase_Y, pInDlssDEvalParams->InMVSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Input_Translucency_SubrectBase_X, pInDlssDEvalParams->InTranslucencySubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Input_Translucency_SubrectBase_Y, pInDlssDEvalParams->InTranslucencySubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Input_Bias_Current_Color_SubrectBase_X, pInDlssDEvalParams->InBiasCurrentColorSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Input_Bias_Current_Color_SubrectBase_Y, pInDlssDEvalParams->InBiasCurrentColorSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Output_Subrect_Base_X, pInDlssDEvalParams->InOutputSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Output_Subrect_Base_Y, pInDlssDEvalParams->InOutputSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Render_Subrect_Dimensions_Width , pInDlssDEvalParams->InRenderSubrectDimensions.Width);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Render_Subrect_Dimensions_Height, pInDlssDEvalParams->InRenderSubrectDimensions.Height);- NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_Parameter_DLSS_Pre_Exposure, pInDlssDEvalParams->InPreExposure == 0.0f ? 1.0f : pInDlssDEvalParams->InPreExposure);- NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_Parameter_DLSS_Exposure_Scale, pInDlssDEvalParams->InExposureScale == 0.0f ? 1.0f : pInDlssDEvalParams->InExposureScale);- NVSDK_NGX_Parameter_SetI(pInParams, NVSDK_NGX_Parameter_DLSS_Indicator_Invert_X_Axis, pInDlssDEvalParams->InIndicatorInvertXAxis);- NVSDK_NGX_Parameter_SetI(pInParams, NVSDK_NGX_Parameter_DLSS_Indicator_Invert_Y_Axis, pInDlssDEvalParams->InIndicatorInvertYAxis);-- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_GBuffer_Emissive, pInDlssDEvalParams->GBufferSurface.pInAttrib[NVSDK_NGX_GBUFFER_EMISSIVE]);-- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_DiffuseAlbedo, pInDlssDEvalParams->pInDiffuseAlbedo);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_SpecularAlbedo, pInDlssDEvalParams->pInSpecularAlbedo);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_GBuffer_Normals, pInDlssDEvalParams->pInNormals);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_GBuffer_Roughness, pInDlssDEvalParams->pInRoughness);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Input_DiffuseAlbedo_Subrect_Base_X, pInDlssDEvalParams->InDiffuseAlbedoSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Input_DiffuseAlbedo_Subrect_Base_Y, pInDlssDEvalParams->InDiffuseAlbedoSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Input_SpecularAlbedo_Subrect_Base_X, pInDlssDEvalParams->InSpecularAlbedoSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Input_SpecularAlbedo_Subrect_Base_Y, pInDlssDEvalParams->InSpecularAlbedoSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Input_Normals_Subrect_Base_X, pInDlssDEvalParams->InNormalsSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Input_Normals_Subrect_Base_Y, pInDlssDEvalParams->InNormalsSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Input_Roughness_Subrect_Base_X, pInDlssDEvalParams->InRoughnessSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Input_Roughness_Subrect_Base_Y, pInDlssDEvalParams->InRoughnessSubrectBase.Y);-- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_DLSSD_Alpha, pInDlssDEvalParams->pInAlpha);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_DLSSD_OutputAlpha, pInDlssDEvalParams->pInOutputAlpha);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_DLSSD_ReflectedAlbedo, pInDlssDEvalParams->pInReflectedAlbedo);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorBeforeParticles, pInDlssDEvalParams->pInColorBeforeParticles);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorAfterParticles, pInDlssDEvalParams->pInColorAfterParticles);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorBeforeTransparency, pInDlssDEvalParams->pInColorBeforeTransparency);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorAfterTransparency, pInDlssDEvalParams->pInColorAfterTransparency);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorBeforeFog, pInDlssDEvalParams->pInColorBeforeFog);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorAfterFog, pInDlssDEvalParams->pInColorAfterFog);-- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_DLSSD_ScreenSpaceSubsurfaceScatteringGuide, pInDlssDEvalParams->pInScreenSpaceSubsurfaceScatteringGuide);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorBeforeScreenSpaceSubsurfaceScattering, pInDlssDEvalParams->pInColorBeforeScreenSpaceSubsurfaceScattering);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorAfterScreenSpaceSubsurfaceScattering, pInDlssDEvalParams->pInColorAfterScreenSpaceSubsurfaceScattering);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_DLSSD_ScreenSpaceRefractionGuide, pInDlssDEvalParams->pInScreenSpaceRefractionGuide);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorBeforeScreenSpaceRefraction, pInDlssDEvalParams->pInColorBeforeScreenSpaceRefraction);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorAfterScreenSpaceRefraction, pInDlssDEvalParams->pInColorAfterScreenSpaceRefraction);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_DLSSD_DepthOfFieldGuide, pInDlssDEvalParams->pInDepthOfFieldGuide);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorBeforeDepthOfField, pInDlssDEvalParams->pInColorBeforeDepthOfField);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorAfterDepthOfField, pInDlssDEvalParams->pInColorAfterDepthOfField);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_DLSSD_DiffuseHitDistance, pInDlssDEvalParams->pInDiffuseHitDistance);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_DLSSD_SpecularHitDistance, pInDlssDEvalParams->pInSpecularHitDistance);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_DLSSD_DiffuseRayDirection, pInDlssDEvalParams->pInDiffuseRayDirection);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_DLSSD_SpecularRayDirection, pInDlssDEvalParams->pInSpecularRayDirection);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_DLSSD_DiffuseRayDirectionHitDistance, pInDlssDEvalParams->pInDiffuseRayDirectionHitDistance);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_DLSSD_SpecularRayDirectionHitDistance, pInDlssDEvalParams->pInSpecularRayDirectionHitDistance);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_Alpha_Subrect_Base_X, pInDlssDEvalParams->InAlphaSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_Alpha_Subrect_Base_Y, pInDlssDEvalParams->InAlphaSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_OutputAlpha_Subrect_Base_X, pInDlssDEvalParams->InOutputAlphaSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_OutputAlpha_Subrect_Base_Y, pInDlssDEvalParams->InOutputAlphaSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_ReflectedAlbedo_Subrect_Base_X, pInDlssDEvalParams->InReflectedAlbedoSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_ReflectedAlbedo_Subrect_Base_Y, pInDlssDEvalParams->InReflectedAlbedoSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorBeforeParticles_Subrect_Base_X, pInDlssDEvalParams->InColorBeforeParticlesSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorBeforeParticles_Subrect_Base_Y, pInDlssDEvalParams->InColorBeforeParticlesSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorAfterParticles_Subrect_Base_X, pInDlssDEvalParams->InColorAfterParticlesSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorAfterParticles_Subrect_Base_Y, pInDlssDEvalParams->InColorAfterParticlesSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorBeforeTransparency_Subrect_Base_X, pInDlssDEvalParams->InColorBeforeTransparencySubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorBeforeTransparency_Subrect_Base_Y, pInDlssDEvalParams->InColorBeforeTransparencySubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorAfterTransparency_Subrect_Base_X, pInDlssDEvalParams->InColorAfterTransparencySubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorAfterTransparency_Subrect_Base_Y, pInDlssDEvalParams->InColorAfterTransparencySubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorBeforeFog_Subrect_Base_X, pInDlssDEvalParams->InColorBeforeFogSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorBeforeFog_Subrect_Base_Y, pInDlssDEvalParams->InColorBeforeFogSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorAfterFog_Subrect_Base_X, pInDlssDEvalParams->InColorAfterFogSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorAfterFog_Subrect_Base_Y, pInDlssDEvalParams->InColorAfterFogSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_ScreenSpaceSubsurfaceScatteringGuide_Subrect_Base_X, pInDlssDEvalParams->InScreenSpaceSubsurfaceScatteringGuideSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_ScreenSpaceSubsurfaceScatteringGuide_Subrect_Base_Y, pInDlssDEvalParams->InScreenSpaceSubsurfaceScatteringGuideSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorBeforeScreenSpaceSubsurfaceScattering_Subrect_Base_X, pInDlssDEvalParams->InColorBeforeScreenSpaceSubsurfaceScatteringSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorBeforeScreenSpaceSubsurfaceScattering_Subrect_Base_Y, pInDlssDEvalParams->InColorBeforeScreenSpaceSubsurfaceScatteringSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorAfterScreenSpaceSubsurfaceScattering_Subrect_Base_X, pInDlssDEvalParams->InColorAfterScreenSpaceSubsurfaceScatteringSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorAfterScreenSpaceSubsurfaceScattering_Subrect_Base_Y, pInDlssDEvalParams->InColorAfterScreenSpaceSubsurfaceScatteringSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_ScreenSpaceRefractionGuide_Subrect_Base_X, pInDlssDEvalParams->InScreenSpaceRefractionGuideSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_ScreenSpaceRefractionGuide_Subrect_Base_Y, pInDlssDEvalParams->InScreenSpaceRefractionGuideSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorBeforeScreenSpaceRefraction_Subrect_Base_X, pInDlssDEvalParams->InColorBeforeScreenSpaceRefractionSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorBeforeScreenSpaceRefraction_Subrect_Base_Y, pInDlssDEvalParams->InColorBeforeScreenSpaceRefractionSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorAfterScreenSpaceRefraction_Subrect_Base_X, pInDlssDEvalParams->InColorAfterScreenSpaceRefractionSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorAfterScreenSpaceRefraction_Subrect_Base_Y, pInDlssDEvalParams->InColorAfterScreenSpaceRefractionSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_DepthOfFieldGuide_Subrect_Base_X, pInDlssDEvalParams->InDepthOfFieldGuideSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_DepthOfFieldGuide_Subrect_Base_Y, pInDlssDEvalParams->InDepthOfFieldGuideSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorBeforeDepthOfField_Subrect_Base_X, pInDlssDEvalParams->InColorBeforeDepthOfFieldSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorBeforeDepthOfField_Subrect_Base_Y, pInDlssDEvalParams->InColorBeforeDepthOfFieldSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorAfterDepthOfField_Subrect_Base_X, pInDlssDEvalParams->InColorAfterDepthOfFieldSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_ColorAfterDepthOfField_Subrect_Base_Y, pInDlssDEvalParams->InColorAfterDepthOfFieldSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_DiffuseHitDistance_Subrect_Base_X, pInDlssDEvalParams->InDiffuseHitDistanceSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_DiffuseHitDistance_Subrect_Base_Y, pInDlssDEvalParams->InDiffuseHitDistanceSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_SpecularHitDistance_Subrect_Base_X, pInDlssDEvalParams->InSpecularHitDistanceSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_SpecularHitDistance_Subrect_Base_Y, pInDlssDEvalParams->InSpecularHitDistanceSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_DiffuseRayDirection_Subrect_Base_X, pInDlssDEvalParams->InDiffuseRayDirectionSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_DiffuseRayDirection_Subrect_Base_Y, pInDlssDEvalParams->InDiffuseRayDirectionSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_SpecularRayDirection_Subrect_Base_X, pInDlssDEvalParams->InSpecularRayDirectionSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_SpecularRayDirection_Subrect_Base_Y, pInDlssDEvalParams->InSpecularRayDirectionSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_DiffuseRayDirectionHitDistance_Subrect_Base_X, pInDlssDEvalParams->InDiffuseRayDirectionHitDistanceSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_DiffuseRayDirectionHitDistance_Subrect_Base_Y, pInDlssDEvalParams->InDiffuseRayDirectionHitDistanceSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_SpecularRayDirectionHitDistance_Subrect_Base_X, pInDlssDEvalParams->InSpecularRayDirectionHitDistanceSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_SpecularRayDirectionHitDistance_Subrect_Base_Y, pInDlssDEvalParams->InSpecularRayDirectionHitDistanceSubrectBase.Y);-- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_DLSS_WORLD_TO_VIEW_MATRIX, pInDlssDEvalParams->pInWorldToViewMatrix);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_DLSS_VIEW_TO_CLIP_MATRIX, pInDlssDEvalParams->pInViewToClipMatrix);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_DLSS_TransparencyLayer, pInDlssDEvalParams->pInTransparencyLayer);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_DLSS_TransparencyLayerOpacity, pInDlssDEvalParams->pInTransparencyLayerOpacity);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_DLSS_TransparencyLayerMvecs, pInDlssDEvalParams->pInTransparencyLayerMvecs);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_DLSS_DisocclusionMask, pInDlssDEvalParams->pInDisocclusionMask);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_DLSSD_ResponsivityMask, pInDlssDEvalParams->pInResponsivityMask);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_TransparencyLayer_Subrect_Base_X, pInDlssDEvalParams->InTransparencyLayerSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_TransparencyLayer_Subrect_Base_Y, pInDlssDEvalParams->InTransparencyLayerSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_TransparencyLayerOpacity_Subrect_Base_X, pInDlssDEvalParams->InTransparencyLayerOpacitySubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_TransparencyLayerOpacity_Subrect_Base_Y, pInDlssDEvalParams->InTransparencyLayerOpacitySubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_TransparencyLayerMvecs_Subrect_Base_X, pInDlssDEvalParams->InTransparencyLayerMvecsSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_TransparencyLayerMvecs_Subrect_Base_Y, pInDlssDEvalParams->InTransparencyLayerMvecsSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_DisocclusionMask_Subrect_Base_X, pInDlssDEvalParams->InDisocclusionMaskSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_DisocclusionMask_Subrect_Base_Y, pInDlssDEvalParams->InDisocclusionMaskSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_ResponsivityMask_Subrect_Base_X, pInDlssDEvalParams->InResponsivityMaskSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSSD_ResponsivityMask_Subrect_Base_Y, pInDlssDEvalParams->InResponsivityMaskSubrectBase.Y);--- return NVSDK_NGX_VULKAN_EvaluateFeature_C(InCmdList, pInHandle, pInParams, NULL);-}--#endif // NVSDK_NGX_HELPERS_DLSSD_VK_Hdiff --git a/native/NVIDIA-DLSS/include/nvsdk_ngx_helpers_dlssg.h b/native/NVIDIA-DLSS/include/nvsdk_ngx_helpers_dlssg.hdeleted file mode 100644index 023828e..0000000--- a/native/NVIDIA-DLSS/include/nvsdk_ngx_helpers_dlssg.h+++ /dev/null@@ -1,229 +0,0 @@-/*-* Copyright (c) 2021-2025 NVIDIA CORPORATION. All rights reserved.-*-* NVIDIA Corporation and its licensors retain all intellectual property and proprietary-* rights in and to this software, related documentation and any modifications thereto.-* Any use, reproduction, disclosure or distribution of this software and related-* documentation without an express license agreement from NVIDIA Corporation is strictly-* prohibited.-*-* TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THIS SOFTWARE IS PROVIDED *AS IS*-* AND NVIDIA AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES, EITHER EXPRESS OR IMPLIED,-* INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A-* PARTICULAR PURPOSE. IN NO EVENT SHALL NVIDIA OR ITS SUPPLIERS BE LIABLE FOR ANY-* SPECIAL, INCIDENTAL, INDIRECT, OR CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT-* LIMITATION, DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF-* BUSINESS INFORMATION, OR ANY OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR-* INABILITY TO USE THIS SOFTWARE, EVEN IF NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF-* SUCH DAMAGES.-*/--#pragma once--#ifndef NVSDK_NGX_HELPERS_DLSSG_H-#define NVSDK_NGX_HELPERS_DLSSG_H--#include <stdint.h> // for uint64_t--#include "nvsdk_ngx.h" // DX11/12 here-#include "nvsdk_ngx_defs_dlssg.h"-#include "nvsdk_ngx_params_dlssg.h"--typedef struct NVSDK_NGX_D3D12_DLSSG_Eval_Params-{- ID3D12Resource* pBackbuffer;- ID3D12Resource* pDepth;- ID3D12Resource* pMVecs;- ID3D12Resource* pHudless; // Optional- ID3D12Resource* pUI; // Optional- ID3D12Resource* pUIAlpha; // Optional- ID3D12Resource* pBidirectionalDistortionField; // Optional- ID3D12Resource* pOutputInterpFrame;- ID3D12Resource* pOutputRealFrame; // Optional. In some cases, the feature may modify this frame (e.g. debugging)- ID3D12Resource* pOutputDisableInterpolation; // Optional-} NVSDK_NGX_D3D12_DLSSG_Eval_Params;--static inline NVSDK_NGX_Result NGX_D3D12_CREATE_DLSSG(- ID3D12GraphicsCommandList* pInCmdList,- unsigned int InCreationNodeMask,- unsigned int InVisibilityNodeMask,- NVSDK_NGX_Handle** ppOutHandle,- NVSDK_NGX_Parameter* pInParams,- NVSDK_NGX_DLSSG_Create_Params* pInDlssgCreateParams)-{- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_CreationNodeMask, InCreationNodeMask);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_VisibilityNodeMask, InVisibilityNodeMask);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_Width, pInDlssgCreateParams->Width);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_Height, pInDlssgCreateParams->Height);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_DLSSG_Parameter_BackbufferFormat, pInDlssgCreateParams->NativeBackbufferFormat);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_DLSSG_Parameter_InternalWidth, pInDlssgCreateParams->RenderWidth);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_DLSSG_Parameter_InternalHeight, pInDlssgCreateParams->RenderHeight);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_DLSSG_Parameter_DynamicResolution, pInDlssgCreateParams->DynamicResolutionScaling);-- return NVSDK_NGX_D3D12_CreateFeature(pInCmdList, NVSDK_NGX_Feature_FrameGeneration, pInParams, ppOutHandle);-}--static inline NVSDK_NGX_Result NGX_D3D12_EVALUATE_DLSSG(- ID3D12GraphicsCommandList* pInCmdList,- NVSDK_NGX_Handle* pInHandle,- NVSDK_NGX_Parameter* pInParams,- NVSDK_NGX_D3D12_DLSSG_Eval_Params* pInDlssgEvalParams,- NVSDK_NGX_DLSSG_Opt_Eval_Params* pInDlssgOptEvalParams)-{- NVSDK_NGX_Parameter_SetD3d12Resource(pInParams, NVSDK_NGX_DLSSG_Parameter_Backbuffer, pInDlssgEvalParams->pBackbuffer);- NVSDK_NGX_Parameter_SetD3d12Resource(pInParams, NVSDK_NGX_DLSSG_Parameter_MVecs, pInDlssgEvalParams->pMVecs);- NVSDK_NGX_Parameter_SetD3d12Resource(pInParams, NVSDK_NGX_DLSSG_Parameter_Depth, pInDlssgEvalParams->pDepth);- NVSDK_NGX_Parameter_SetD3d12Resource(pInParams, NVSDK_NGX_DLSSG_Parameter_HUDLess, pInDlssgEvalParams->pHudless);- NVSDK_NGX_Parameter_SetD3d12Resource(pInParams, NVSDK_NGX_DLSSG_Parameter_UI, pInDlssgEvalParams->pUI);- NVSDK_NGX_Parameter_SetD3d12Resource(pInParams, NVSDK_NGX_DLSSG_Parameter_UIAlpha, pInDlssgEvalParams->pUIAlpha);- NVSDK_NGX_Parameter_SetD3d12Resource(pInParams, NVSDK_NGX_DLSSG_Parameter_BidirectionalDistortionField, pInDlssgEvalParams->pBidirectionalDistortionField);- NVSDK_NGX_Parameter_SetD3d12Resource(pInParams, NVSDK_NGX_DLSSG_Parameter_OutputInterpolated, pInDlssgEvalParams->pOutputInterpFrame);- NVSDK_NGX_Parameter_SetD3d12Resource(pInParams, NVSDK_NGX_DLSSG_Parameter_OutputReal, pInDlssgEvalParams->pOutputRealFrame);- NVSDK_NGX_Parameter_SetD3d12Resource(pInParams, NVSDK_NGX_DLSSG_Parameter_OutputDisableInterpolation, pInDlssgEvalParams->pOutputDisableInterpolation);-- if (pInDlssgOptEvalParams)- {- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_DLSSG_Parameter_MultiFrameCount, pInDlssgOptEvalParams->multiFrameCount);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_DLSSG_Parameter_MultiFrameIndex, pInDlssgOptEvalParams->multiFrameIndex);-- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_DLSSG_Parameter_CameraViewToClip, pInDlssgOptEvalParams->cameraViewToClip);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_DLSSG_Parameter_ClipToCameraView, pInDlssgOptEvalParams->clipToCameraView);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_DLSSG_Parameter_ClipToLensClip, pInDlssgOptEvalParams->clipToLensClip);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_DLSSG_Parameter_ClipToPrevClip, pInDlssgOptEvalParams->clipToPrevClip);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_DLSSG_Parameter_PrevClipToClip, pInDlssgOptEvalParams->prevClipToClip);-- NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_DLSSG_Parameter_JitterOffsetX, pInDlssgOptEvalParams->jitterOffset[0]);- NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_DLSSG_Parameter_JitterOffsetY, pInDlssgOptEvalParams->jitterOffset[1]);-- NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_DLSSG_Parameter_MvecScaleX, pInDlssgOptEvalParams->mvecScale[0]);- NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_DLSSG_Parameter_MvecScaleY, pInDlssgOptEvalParams->mvecScale[1]);-- NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_DLSSG_Parameter_CameraPinholeOffsetX, pInDlssgOptEvalParams->cameraPinholeOffset[0]);- NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_DLSSG_Parameter_CameraPinholeOffsetY, pInDlssgOptEvalParams->cameraPinholeOffset[1]);-- NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_DLSSG_Parameter_CameraPosX, pInDlssgOptEvalParams->cameraPos[0]);- NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_DLSSG_Parameter_CameraPosY, pInDlssgOptEvalParams->cameraPos[1]);- NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_DLSSG_Parameter_CameraPosZ, pInDlssgOptEvalParams->cameraPos[2]);-- NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_DLSSG_Parameter_CameraUpX, pInDlssgOptEvalParams->cameraUp[0]);- NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_DLSSG_Parameter_CameraUpY, pInDlssgOptEvalParams->cameraUp[1]);- NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_DLSSG_Parameter_CameraUpZ, pInDlssgOptEvalParams->cameraUp[2]);-- NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_DLSSG_Parameter_CameraRightX, pInDlssgOptEvalParams->cameraRight[0]);- NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_DLSSG_Parameter_CameraRightY, pInDlssgOptEvalParams->cameraRight[1]);- NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_DLSSG_Parameter_CameraRightZ, pInDlssgOptEvalParams->cameraRight[2]);-- NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_DLSSG_Parameter_CameraFwdX, pInDlssgOptEvalParams->cameraFwd[0]);- NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_DLSSG_Parameter_CameraFwdY, pInDlssgOptEvalParams->cameraFwd[1]);- NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_DLSSG_Parameter_CameraFwdZ, pInDlssgOptEvalParams->cameraFwd[2]);-- NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_DLSSG_Parameter_CameraNear, pInDlssgOptEvalParams->cameraNear);- NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_DLSSG_Parameter_CameraFar, pInDlssgOptEvalParams->cameraFar);- NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_DLSSG_Parameter_CameraFOV, pInDlssgOptEvalParams->cameraFOV);- NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_DLSSG_Parameter_CameraAspectRatio, pInDlssgOptEvalParams->cameraAspectRatio);-- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_DLSSG_Parameter_ColorBuffersHDR, pInDlssgOptEvalParams->colorBuffersHDR);-- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_DLSSG_Parameter_DepthInverted, pInDlssgOptEvalParams->depthInverted);-- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_DLSSG_Parameter_CameraMotionIncluded, pInDlssgOptEvalParams->cameraMotionIncluded);-- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_DLSSG_Parameter_Reset, pInDlssgOptEvalParams->reset);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_DLSSG_Parameter_AutomodeOverrideReset, pInDlssgOptEvalParams->automodeOverrideReset);-- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_DLSSG_Parameter_NotRenderingGameFrames, pInDlssgOptEvalParams->notRenderingGameFrames);-- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_DLSSG_Parameter_OrthoProjection, pInDlssgOptEvalParams->orthoProjection);-- NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_DLSSG_Parameter_MvecInvalidValue, pInDlssgOptEvalParams->motionVectorsInvalidValue);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_DLSSG_Parameter_MvecDilated, pInDlssgOptEvalParams->motionVectorsDilated);-- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_DLSSG_Parameter_MenuDetectionEnabled, pInDlssgOptEvalParams->menuDetectionEnabled);-- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_DLSSG_Parameter_MVecsSubrectBaseX, pInDlssgOptEvalParams->mvecsSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_DLSSG_Parameter_MVecsSubrectBaseY, pInDlssgOptEvalParams->mvecsSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_DLSSG_Parameter_MVecsSubrectWidth, pInDlssgOptEvalParams->mvecsSubrectSize.Width);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_DLSSG_Parameter_MVecsSubrectHeight, pInDlssgOptEvalParams->mvecsSubrectSize.Height);-- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_DLSSG_Parameter_DepthSubrectBaseX, pInDlssgOptEvalParams->depthSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_DLSSG_Parameter_DepthSubrectBaseY, pInDlssgOptEvalParams->depthSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_DLSSG_Parameter_DepthSubrectWidth, pInDlssgOptEvalParams->depthSubrectSize.Width);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_DLSSG_Parameter_DepthSubrectHeight, pInDlssgOptEvalParams->depthSubrectSize.Height);-- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_DLSSG_Parameter_HUDLessSubrectBaseX, pInDlssgOptEvalParams->hudLessSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_DLSSG_Parameter_HUDLessSubrectBaseY, pInDlssgOptEvalParams->hudLessSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_DLSSG_Parameter_HUDLessSubrectWidth, pInDlssgOptEvalParams->hudLessSubrectSize.Width);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_DLSSG_Parameter_HUDLessSubrectHeight, pInDlssgOptEvalParams->hudLessSubrectSize.Height);-- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_DLSSG_Parameter_UISubrectBaseX, pInDlssgOptEvalParams->uiSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_DLSSG_Parameter_UISubrectBaseY, pInDlssgOptEvalParams->uiSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_DLSSG_Parameter_UISubrectWidth, pInDlssgOptEvalParams->uiSubrectSize.Width);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_DLSSG_Parameter_UISubrectHeight, pInDlssgOptEvalParams->uiSubrectSize.Height);-- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_DLSSG_Parameter_UIAlphaSubrectBaseX, pInDlssgOptEvalParams->uiAlphaSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_DLSSG_Parameter_UIAlphaSubrectBaseY, pInDlssgOptEvalParams->uiAlphaSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_DLSSG_Parameter_UIAlphaSubrectWidth, pInDlssgOptEvalParams->uiAlphaSubrectSize.Width);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_DLSSG_Parameter_UIAlphaSubrectHeight, pInDlssgOptEvalParams->uiAlphaSubrectSize.Height);-- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_DLSSG_Parameter_BidirectionalDistortionFieldSubrectBaseX, pInDlssgOptEvalParams->bidirectionalDistFieldSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_DLSSG_Parameter_BidirectionalDistortionFieldSubrectBaseY, pInDlssgOptEvalParams->bidirectionalDistFieldSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_DLSSG_Parameter_BidirectionalDistortionFieldSubrectWidth, pInDlssgOptEvalParams->bidirectionalDistFieldSubrectSize.Width);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_DLSSG_Parameter_BidirectionalDistortionFieldSubrectHeight, pInDlssgOptEvalParams->bidirectionalDistFieldSubrectSize.Height);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_DLSSG_Parameter_BidirectionalDistortionField_LowPrecision_IsLowPrecision, pInDlssgOptEvalParams->bidirectionalDistFieldPrecisionInfo.IsLowPrecision);- NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_DLSSG_Parameter_BidirectionalDistortionField_LowPrecision_Bias, pInDlssgOptEvalParams->bidirectionalDistFieldPrecisionInfo.Bias);- NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_DLSSG_Parameter_BidirectionalDistortionField_LowPrecision_Scale, pInDlssgOptEvalParams->bidirectionalDistFieldPrecisionInfo.Scale);-- NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_DLSSG_Parameter_MinRelativeLinearDepthObjectSeparation, pInDlssgOptEvalParams->minRelativeLinearDepthObjectSeparation);-- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_DLSSG_Parameter_InputBackbufferSubrectBaseX, pInDlssgOptEvalParams->backbufferSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_DLSSG_Parameter_InputBackbufferSubrectBaseY, pInDlssgOptEvalParams->backbufferSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_DLSSG_Parameter_InputBackbufferSubrectWidth, pInDlssgOptEvalParams->backbufferSubrectSize.Width);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_DLSSG_Parameter_InputBackbufferSubrectHeight, pInDlssgOptEvalParams->backbufferSubrectSize.Height);-- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_DLSSG_Parameter_OutputInterpolatedSubrectBaseX, pInDlssgOptEvalParams->outputInterpSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_DLSSG_Parameter_OutputInterpolatedSubrectBaseY, pInDlssgOptEvalParams->outputInterpSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_DLSSG_Parameter_OutputInterpolatedSubrectWidth, pInDlssgOptEvalParams->outputInterpSubrectSize.Width);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_DLSSG_Parameter_OutputInterpolatedSubrectHeight, pInDlssgOptEvalParams->outputInterpSubrectSize.Height);-- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_DLSSG_Parameter_OutputRealSubrectBaseX, pInDlssgOptEvalParams->outputRealSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_DLSSG_Parameter_OutputRealSubrectBaseY, pInDlssgOptEvalParams->outputRealSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_DLSSG_Parameter_OutputRealSubrectWidth, pInDlssgOptEvalParams->outputRealSubrectSize.Width);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_DLSSG_Parameter_OutputRealSubrectHeight, pInDlssgOptEvalParams->outputRealSubrectSize.Height);- }-- return NVSDK_NGX_D3D12_EvaluateFeature_C(pInCmdList, pInHandle, pInParams, NULL);-}--static inline NVSDK_NGX_Result NGX_D3D12_ESTIMATE_VRAM_DLSSG(- NVSDK_NGX_Parameter* InParams,- uint32_t mvecDepthWidth, uint32_t mvecDepthHeight,- uint32_t colorWidth, uint32_t colorHeight,- uint32_t colorBufferFormat,- uint32_t mvecBufferFormat, uint32_t depthBufferFormat,- uint32_t hudLessBufferFormat, uint32_t uiBufferFormat,- size_t* estimatedVRAMInBytes-)-{- void* Callback = NULL;- NVSDK_NGX_Parameter_GetVoidPointer(InParams, NVSDK_NGX_Parameter_DLSSGEstimateVRAMCallback, &Callback);- if (!Callback)- {- // Possible reasons for this:- // - Installed feature is out of date and does not support the feature we need- // - You used NVSDK_NGX_AllocateParameters() for creating InParams. Try using NVSDK_NGX_GetCapabilityParameters() instead- return NVSDK_NGX_Result_FAIL_OutOfDate;- }-- NVSDK_NGX_Result Res = NVSDK_NGX_Result_Success;- PFN_NVSDK_NGX_DLSSG_EstimateVRAMCallback PFNCallback = (PFN_NVSDK_NGX_DLSSG_EstimateVRAMCallback)Callback;- Res = PFNCallback(mvecDepthWidth, mvecDepthHeight, colorWidth, colorHeight,- colorBufferFormat, mvecBufferFormat, depthBufferFormat, hudLessBufferFormat, uiBufferFormat, estimatedVRAMInBytes);- if (NVSDK_NGX_FAILED(Res))- {- return Res;- }-- return NVSDK_NGX_Result_Success;-}--#endif // NVSDK_NGX_HELPERS_DLSSG_Hdiff --git a/native/NVIDIA-DLSS/include/nvsdk_ngx_helpers_dlssg_vk.h b/native/NVIDIA-DLSS/include/nvsdk_ngx_helpers_dlssg_vk.hdeleted file mode 100644index 47ca4dd..0000000--- a/native/NVIDIA-DLSS/include/nvsdk_ngx_helpers_dlssg_vk.h+++ /dev/null@@ -1,227 +0,0 @@-#pragma once-/*-* Copyright (c) 2021-2024 NVIDIA CORPORATION. All rights reserved.-*-* NVIDIA Corporation and its licensors retain all intellectual property and proprietary-* rights in and to this software, related documentation and any modifications thereto.-* Any use, reproduction, disclosure or distribution of this software and related-* documentation without an express license agreement from NVIDIA Corporation is strictly-* prohibited.-*-* TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THIS SOFTWARE IS PROVIDED *AS IS*-* AND NVIDIA AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES, EITHER EXPRESS OR IMPLIED,-* INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A-* PARTICULAR PURPOSE. IN NO EVENT SHALL NVIDIA OR ITS SUPPLIERS BE LIABLE FOR ANY-* SPECIAL, INCIDENTAL, INDIRECT, OR CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT-* LIMITATION, DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF-* BUSINESS INFORMATION, OR ANY OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR-* INABILITY TO USE THIS SOFTWARE, EVEN IF NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF-* SUCH DAMAGES.-*/---#ifndef NVSDK_NGX_HELPERS_DLSSG_VK_H-#define NVSDK_NGX_HELPERS_DLSSG_VK_H--#include <vulkan/vulkan.h>-#include "nvsdk_ngx_defs_dlssg.h"-#include "nvsdk_ngx_params_dlssg.h"-#include "nvsdk_ngx_vk.h" // VK here--typedef struct NVSDK_NGX_VK_DLSSG_Eval_Params-{- NVSDK_NGX_Resource_VK* pBackbuffer;- NVSDK_NGX_Resource_VK* pDepth;- NVSDK_NGX_Resource_VK* pMVecs;- NVSDK_NGX_Resource_VK* pHudless; // Optional- NVSDK_NGX_Resource_VK* pUI; // Optional- NVSDK_NGX_Resource_VK* pUIAlpha; // Optional- NVSDK_NGX_Resource_VK* pBidirectionalDistortionField; // Optional- NVSDK_NGX_Resource_VK* pOutputInterpFrame;- NVSDK_NGX_Resource_VK* pOutputRealFrame; // Optional. In some cases, the feature may modify this frame (e.g. debugging)- NVSDK_NGX_Resource_VK* pOutputDisableInterpolation; // Optional-} NVSDK_NGX_VK_DLSSG_Eval_Params;--static inline NVSDK_NGX_Result NGX_VK_CREATE_DLSSG(- VkCommandBuffer pInCmdBuf,- unsigned int InCreationNodeMask,- unsigned int InVisibilityNodeMask,- NVSDK_NGX_Handle** ppOutHandle,- NVSDK_NGX_Parameter* pInParams,- NVSDK_NGX_DLSSG_Create_Params* pInDlssgCreateParams)-{- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_CreationNodeMask, InCreationNodeMask);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_VisibilityNodeMask, InVisibilityNodeMask);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_Width, pInDlssgCreateParams->Width);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_Height, pInDlssgCreateParams->Height);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_DLSSG_Parameter_BackbufferFormat, pInDlssgCreateParams->NativeBackbufferFormat);-- return NVSDK_NGX_VULKAN_CreateFeature(pInCmdBuf, NVSDK_NGX_Feature_FrameGeneration, pInParams, ppOutHandle);-}--static inline NVSDK_NGX_Result NGX_VK_EVALUATE_DLSSG(- VkCommandBuffer pInCmdBuf,- NVSDK_NGX_Handle* pInHandle,- NVSDK_NGX_Parameter* pInParams,- NVSDK_NGX_VK_DLSSG_Eval_Params* pInDlssgEvalParams,- NVSDK_NGX_DLSSG_Opt_Eval_Params* pInDlssgOptEvalParams)-{- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_DLSSG_Parameter_Backbuffer, pInDlssgEvalParams->pBackbuffer);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_DLSSG_Parameter_MVecs, pInDlssgEvalParams->pMVecs);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_DLSSG_Parameter_Depth, pInDlssgEvalParams->pDepth);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_DLSSG_Parameter_HUDLess, pInDlssgEvalParams->pHudless);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_DLSSG_Parameter_UI, pInDlssgEvalParams->pUI);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_DLSSG_Parameter_UIAlpha, pInDlssgEvalParams->pUIAlpha);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_DLSSG_Parameter_BidirectionalDistortionField, pInDlssgEvalParams->pBidirectionalDistortionField);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_DLSSG_Parameter_OutputInterpolated, pInDlssgEvalParams->pOutputInterpFrame);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_DLSSG_Parameter_OutputReal, pInDlssgEvalParams->pOutputRealFrame);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_DLSSG_Parameter_OutputDisableInterpolation, pInDlssgEvalParams->pOutputDisableInterpolation);-- if (pInDlssgOptEvalParams)- {- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_DLSSG_Parameter_MultiFrameCount, pInDlssgOptEvalParams->multiFrameCount);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_DLSSG_Parameter_MultiFrameIndex, pInDlssgOptEvalParams->multiFrameIndex);-- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_DLSSG_Parameter_CameraViewToClip, pInDlssgOptEvalParams->cameraViewToClip);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_DLSSG_Parameter_ClipToCameraView, pInDlssgOptEvalParams->clipToCameraView);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_DLSSG_Parameter_ClipToLensClip, pInDlssgOptEvalParams->clipToLensClip);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_DLSSG_Parameter_ClipToPrevClip, pInDlssgOptEvalParams->clipToPrevClip);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_DLSSG_Parameter_PrevClipToClip, pInDlssgOptEvalParams->prevClipToClip);-- NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_DLSSG_Parameter_JitterOffsetX, pInDlssgOptEvalParams->jitterOffset[0]);- NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_DLSSG_Parameter_JitterOffsetY, pInDlssgOptEvalParams->jitterOffset[1]);-- NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_DLSSG_Parameter_MvecScaleX, pInDlssgOptEvalParams->mvecScale[0]);- NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_DLSSG_Parameter_MvecScaleY, pInDlssgOptEvalParams->mvecScale[1]);-- NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_DLSSG_Parameter_CameraPinholeOffsetX, pInDlssgOptEvalParams->cameraPinholeOffset[0]);- NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_DLSSG_Parameter_CameraPinholeOffsetY, pInDlssgOptEvalParams->cameraPinholeOffset[1]);-- NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_DLSSG_Parameter_CameraPosX, pInDlssgOptEvalParams->cameraPos[0]);- NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_DLSSG_Parameter_CameraPosY, pInDlssgOptEvalParams->cameraPos[1]);- NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_DLSSG_Parameter_CameraPosZ, pInDlssgOptEvalParams->cameraPos[2]);-- NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_DLSSG_Parameter_CameraUpX, pInDlssgOptEvalParams->cameraUp[0]);- NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_DLSSG_Parameter_CameraUpY, pInDlssgOptEvalParams->cameraUp[1]);- NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_DLSSG_Parameter_CameraUpZ, pInDlssgOptEvalParams->cameraUp[2]);-- NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_DLSSG_Parameter_CameraRightX, pInDlssgOptEvalParams->cameraRight[0]);- NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_DLSSG_Parameter_CameraRightY, pInDlssgOptEvalParams->cameraRight[1]);- NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_DLSSG_Parameter_CameraRightZ, pInDlssgOptEvalParams->cameraRight[2]);-- NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_DLSSG_Parameter_CameraFwdX, pInDlssgOptEvalParams->cameraFwd[0]);- NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_DLSSG_Parameter_CameraFwdY, pInDlssgOptEvalParams->cameraFwd[1]);- NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_DLSSG_Parameter_CameraFwdZ, pInDlssgOptEvalParams->cameraFwd[2]);-- NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_DLSSG_Parameter_CameraNear, pInDlssgOptEvalParams->cameraNear);- NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_DLSSG_Parameter_CameraFar, pInDlssgOptEvalParams->cameraFar);- NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_DLSSG_Parameter_CameraFOV, pInDlssgOptEvalParams->cameraFOV);- NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_DLSSG_Parameter_CameraAspectRatio, pInDlssgOptEvalParams->cameraAspectRatio);-- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_DLSSG_Parameter_ColorBuffersHDR, pInDlssgOptEvalParams->colorBuffersHDR);-- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_DLSSG_Parameter_DepthInverted, pInDlssgOptEvalParams->depthInverted);-- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_DLSSG_Parameter_CameraMotionIncluded, pInDlssgOptEvalParams->cameraMotionIncluded);-- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_DLSSG_Parameter_Reset, pInDlssgOptEvalParams->reset);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_DLSSG_Parameter_AutomodeOverrideReset, pInDlssgOptEvalParams->automodeOverrideReset);-- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_DLSSG_Parameter_NotRenderingGameFrames, pInDlssgOptEvalParams->notRenderingGameFrames);-- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_DLSSG_Parameter_OrthoProjection, pInDlssgOptEvalParams->orthoProjection);-- NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_DLSSG_Parameter_MvecInvalidValue, pInDlssgOptEvalParams->motionVectorsInvalidValue);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_DLSSG_Parameter_MvecDilated, pInDlssgOptEvalParams->motionVectorsDilated);-- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_DLSSG_Parameter_MenuDetectionEnabled, pInDlssgOptEvalParams->menuDetectionEnabled);-- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_DLSSG_Parameter_MVecsSubrectBaseX, pInDlssgOptEvalParams->mvecsSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_DLSSG_Parameter_MVecsSubrectBaseY, pInDlssgOptEvalParams->mvecsSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_DLSSG_Parameter_MVecsSubrectWidth, pInDlssgOptEvalParams->mvecsSubrectSize.Width);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_DLSSG_Parameter_MVecsSubrectHeight, pInDlssgOptEvalParams->mvecsSubrectSize.Height);-- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_DLSSG_Parameter_DepthSubrectBaseX, pInDlssgOptEvalParams->depthSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_DLSSG_Parameter_DepthSubrectBaseY, pInDlssgOptEvalParams->depthSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_DLSSG_Parameter_DepthSubrectWidth, pInDlssgOptEvalParams->depthSubrectSize.Width);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_DLSSG_Parameter_DepthSubrectHeight, pInDlssgOptEvalParams->depthSubrectSize.Height);-- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_DLSSG_Parameter_HUDLessSubrectBaseX, pInDlssgOptEvalParams->hudLessSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_DLSSG_Parameter_HUDLessSubrectBaseY, pInDlssgOptEvalParams->hudLessSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_DLSSG_Parameter_HUDLessSubrectWidth, pInDlssgOptEvalParams->hudLessSubrectSize.Width);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_DLSSG_Parameter_HUDLessSubrectHeight, pInDlssgOptEvalParams->hudLessSubrectSize.Height);-- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_DLSSG_Parameter_UISubrectBaseX, pInDlssgOptEvalParams->uiSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_DLSSG_Parameter_UISubrectBaseY, pInDlssgOptEvalParams->uiSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_DLSSG_Parameter_UISubrectWidth, pInDlssgOptEvalParams->uiSubrectSize.Width);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_DLSSG_Parameter_UISubrectHeight, pInDlssgOptEvalParams->uiSubrectSize.Height);-- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_DLSSG_Parameter_UIAlphaSubrectBaseX, pInDlssgOptEvalParams->uiAlphaSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_DLSSG_Parameter_UIAlphaSubrectBaseY, pInDlssgOptEvalParams->uiAlphaSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_DLSSG_Parameter_UIAlphaSubrectWidth, pInDlssgOptEvalParams->uiAlphaSubrectSize.Width);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_DLSSG_Parameter_UIAlphaSubrectHeight, pInDlssgOptEvalParams->uiAlphaSubrectSize.Height);-- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_DLSSG_Parameter_BidirectionalDistortionFieldSubrectBaseX, pInDlssgOptEvalParams->bidirectionalDistFieldSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_DLSSG_Parameter_BidirectionalDistortionFieldSubrectBaseY, pInDlssgOptEvalParams->bidirectionalDistFieldSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_DLSSG_Parameter_BidirectionalDistortionFieldSubrectWidth, pInDlssgOptEvalParams->bidirectionalDistFieldSubrectSize.Width);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_DLSSG_Parameter_BidirectionalDistortionFieldSubrectHeight, pInDlssgOptEvalParams->bidirectionalDistFieldSubrectSize.Height);-- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_DLSSG_Parameter_BidirectionalDistortionField_LowPrecision_IsLowPrecision, pInDlssgOptEvalParams->bidirectionalDistFieldPrecisionInfo.IsLowPrecision);- NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_DLSSG_Parameter_BidirectionalDistortionField_LowPrecision_Bias, pInDlssgOptEvalParams->bidirectionalDistFieldPrecisionInfo.Bias);- NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_DLSSG_Parameter_BidirectionalDistortionField_LowPrecision_Scale, pInDlssgOptEvalParams->bidirectionalDistFieldPrecisionInfo.Scale);-- NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_DLSSG_Parameter_MinRelativeLinearDepthObjectSeparation, pInDlssgOptEvalParams->minRelativeLinearDepthObjectSeparation);-- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_DLSSG_Parameter_InputBackbufferSubrectBaseX, pInDlssgOptEvalParams->backbufferSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_DLSSG_Parameter_InputBackbufferSubrectBaseY, pInDlssgOptEvalParams->backbufferSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_DLSSG_Parameter_InputBackbufferSubrectWidth, pInDlssgOptEvalParams->backbufferSubrectSize.Width);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_DLSSG_Parameter_InputBackbufferSubrectHeight, pInDlssgOptEvalParams->backbufferSubrectSize.Height);-- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_DLSSG_Parameter_OutputInterpolatedSubrectBaseX, pInDlssgOptEvalParams->outputInterpSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_DLSSG_Parameter_OutputInterpolatedSubrectBaseY, pInDlssgOptEvalParams->outputInterpSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_DLSSG_Parameter_OutputInterpolatedSubrectWidth, pInDlssgOptEvalParams->outputInterpSubrectSize.Width);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_DLSSG_Parameter_OutputInterpolatedSubrectHeight, pInDlssgOptEvalParams->outputInterpSubrectSize.Height);-- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_DLSSG_Parameter_OutputRealSubrectBaseX, pInDlssgOptEvalParams->outputRealSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_DLSSG_Parameter_OutputRealSubrectBaseY, pInDlssgOptEvalParams->outputRealSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_DLSSG_Parameter_OutputRealSubrectWidth, pInDlssgOptEvalParams->outputRealSubrectSize.Width);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_DLSSG_Parameter_OutputRealSubrectHeight, pInDlssgOptEvalParams->outputRealSubrectSize.Height);- }-- // C version or cpp?- return NVSDK_NGX_VULKAN_EvaluateFeature_C(pInCmdBuf, pInHandle, pInParams, NULL);-}--static inline NVSDK_NGX_Result NGX_VK_ESTIMATE_VRAM_DLSSG(- NVSDK_NGX_Parameter* InParams,- uint32_t mvecDepthWidth, uint32_t mvecDepthHeight,- uint32_t colorWidth, uint32_t colorHeight,- uint32_t colorBufferFormat,- uint32_t mvecBufferFormat, uint32_t depthBufferFormat,- uint32_t hudLessBufferFormat, uint32_t uiBufferFormat,- size_t* estimatedVRAMInBytes-)-{- void* Callback = NULL;- NVSDK_NGX_Parameter_GetVoidPointer(InParams, NVSDK_NGX_Parameter_DLSSGEstimateVRAMCallback, &Callback);- if (!Callback)- {- // Possible reasons for this:- // - Installed feature is out of date and does not support the feature we need- // - You used NVSDK_NGX_AllocateParameters() for creating InParams. Try using NVSDK_NGX_GetCapabilityParameters() instead- return NVSDK_NGX_Result_FAIL_OutOfDate;- }-- NVSDK_NGX_Result Res = NVSDK_NGX_Result_Success;- PFN_NVSDK_NGX_DLSSG_EstimateVRAMCallback PFNCallback = (PFN_NVSDK_NGX_DLSSG_EstimateVRAMCallback)Callback;- Res = PFNCallback(mvecDepthWidth, mvecDepthHeight, colorWidth, colorHeight,- colorBufferFormat, mvecBufferFormat, depthBufferFormat, hudLessBufferFormat, uiBufferFormat, estimatedVRAMInBytes);- if (NVSDK_NGX_FAILED(Res))- {- return Res;- }-- return NVSDK_NGX_Result_Success;-}--#endifdiff --git a/native/NVIDIA-DLSS/include/nvsdk_ngx_helpers_vk.h b/native/NVIDIA-DLSS/include/nvsdk_ngx_helpers_vk.hdeleted file mode 100644index c46d4d1..0000000--- a/native/NVIDIA-DLSS/include/nvsdk_ngx_helpers_vk.h+++ /dev/null@@ -1,275 +0,0 @@-/*- * SPDX-FileCopyrightText: Copyright (c) 2019-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.- * SPDX-License-Identifier: LicenseRef-NvidiaProprietary- *- * NVIDIA CORPORATION, its affiliates and licensors retain all intellectual- * property and proprietary rights in and to this material, related- * documentation and any modifications thereto. Any use, reproduction,- * disclosure or distribution of this material and related documentation- * without an express license agreement from NVIDIA CORPORATION or- * its affiliates is strictly prohibited.- */--#ifndef NVSDK_NGX_HELPERS_VK_H-#define NVSDK_NGX_HELPERS_VK_H-#pragma once--#include "nvsdk_ngx_vk.h"--#define NVSDK_NGX_ENSURE_VK_IMAGEVIEW(InResource) if ((InResource) && (InResource)->Type != NVSDK_NGX_RESOURCE_VK_TYPE_VK_IMAGEVIEW) { return NVSDK_NGX_Result_FAIL_InvalidParameter; }--static inline NVSDK_NGX_Resource_VK NVSDK_NGX_Create_ImageView_Resource_VK(VkImageView imageView, VkImage image, VkImageSubresourceRange subresourceRange, VkFormat format, unsigned int width, unsigned int height, bool readWrite)-{- NVSDK_NGX_Resource_VK resourceVK = {0};- resourceVK.Type = NVSDK_NGX_RESOURCE_VK_TYPE_VK_IMAGEVIEW;- resourceVK.Resource.ImageViewInfo.ImageView = imageView;- resourceVK.Resource.ImageViewInfo.Image = image;- resourceVK.Resource.ImageViewInfo.SubresourceRange = subresourceRange;- resourceVK.Resource.ImageViewInfo.Height = height;- resourceVK.Resource.ImageViewInfo.Width = width;- resourceVK.Resource.ImageViewInfo.Format = format;- resourceVK.ReadWrite = readWrite;- return resourceVK;-}--static inline NVSDK_NGX_Resource_VK NVSDK_NGX_Create_Buffer_Resource_VK(VkBuffer buffer, unsigned int sizeInBytes, bool readWrite)-{- NVSDK_NGX_Resource_VK resourceVK = {0};- resourceVK.Type = NVSDK_NGX_RESOURCE_VK_TYPE_VK_BUFFER;- resourceVK.Resource.BufferInfo.Buffer = buffer;- resourceVK.Resource.BufferInfo.SizeInBytes = sizeInBytes;- resourceVK.ReadWrite = readWrite;- return resourceVK;-}--typedef struct NVSDK_NGX_VK_Feature_Eval_Params-{- NVSDK_NGX_Resource_VK *pInColor;- NVSDK_NGX_Resource_VK *pInOutput;- /*** OPTIONAL for DLSS ***/- float InSharpness;-} NVSDK_NGX_VK_Feature_Eval_Params;--typedef struct NVSDK_NGX_VK_GBuffer-{- NVSDK_NGX_Resource_VK *pInAttrib[NVSDK_NGX_GBUFFERTYPE_NUM];-} NVSDK_NGX_VK_GBuffer;--typedef struct NVSDK_NGX_Coordinates_VK-{- unsigned int X;- unsigned int Y;-} NVSDK_NGX_Coordinates_VK;--typedef struct NVSDK_NGX_VK_DLSS_Eval_Params-{- NVSDK_NGX_VK_Feature_Eval_Params Feature;- NVSDK_NGX_Resource_VK * pInDepth;- NVSDK_NGX_Resource_VK * pInMotionVectors;- float InJitterOffsetX; /* Jitter offset must be in input/render pixel space */- float InJitterOffsetY;- NVSDK_NGX_Dimensions InRenderSubrectDimensions;- /*** OPTIONAL - leave to 0/0.0f if unused ***/- int InReset; /* Set to 1 when scene changes completely (new level etc) */- float InMVScaleX; /* If MVs need custom scaling to convert to pixel space */- float InMVScaleY;- NVSDK_NGX_Resource_VK * pInTransparencyMask; /* Unused/Reserved for future use */- NVSDK_NGX_Resource_VK * pInExposureTexture;- NVSDK_NGX_Resource_VK * pInBiasCurrentColorMask;- NVSDK_NGX_Coordinates InColorSubrectBase;- NVSDK_NGX_Coordinates InDepthSubrectBase;- NVSDK_NGX_Coordinates InMVSubrectBase;- NVSDK_NGX_Coordinates InTranslucencySubrectBase;- NVSDK_NGX_Coordinates InBiasCurrentColorSubrectBase;- NVSDK_NGX_Coordinates InOutputSubrectBase;- float InPreExposure;- float InExposureScale;- int InIndicatorInvertXAxis;- int InIndicatorInvertYAxis;- /*** OPTIONAL - only for research purposes ***/- NVSDK_NGX_VK_GBuffer GBufferSurface;- NVSDK_NGX_ToneMapperType InToneMapperType;- NVSDK_NGX_Resource_VK * pInMotionVectors3D;- NVSDK_NGX_Resource_VK * pInIsParticleMask; /* to identify which pixels contains particles, essentially that are not drawn as part of base pass */- NVSDK_NGX_Resource_VK * pInAnimatedTextureMask; /* a binary mask covering pixels occupied by animated textures */- NVSDK_NGX_Resource_VK * pInDepthHighRes;- NVSDK_NGX_Resource_VK * pInPositionViewSpace;- float InFrameTimeDeltaInMsec; /* helps in determining the amount to denoise or anti-alias based on the speed of the object from motion vector magnitudes and fps as determined by this delta */- NVSDK_NGX_Resource_VK * pInRayTracingHitDistance; /* for each effect - approximation to the amount of noise in a ray-traced color */- NVSDK_NGX_Resource_VK * pInMotionVectorsReflections; /* motion vectors of reflected objects like for mirrored surfaces */-} NVSDK_NGX_VK_DLSS_Eval_Params;--typedef struct NVSDK_NGX_VK_DLISP_Eval_Params-{- NVSDK_NGX_VK_Feature_Eval_Params Feature;- /*** OPTIONAL - leave to 0/0.0f if unused ***/- unsigned int InRectX;- unsigned int InRectY;- unsigned int InRectW;- unsigned int InRectH;- float InDenoise;-} NVSDK_NGX_VK_DLISP_Eval_Params;--static inline NVSDK_NGX_Result NGX_VULKAN_CREATE_DLSS_EXT1(- VkDevice InDevice,- VkCommandBuffer InCmdList,- unsigned int InCreationNodeMask,- unsigned int InVisibilityNodeMask,- NVSDK_NGX_Handle **ppOutHandle,- NVSDK_NGX_Parameter *pInParams,- NVSDK_NGX_DLSS_Create_Params *pInDlssCreateParams)-{- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_CreationNodeMask, InCreationNodeMask);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_VisibilityNodeMask, InVisibilityNodeMask);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_Width, pInDlssCreateParams->Feature.InWidth);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_Height, pInDlssCreateParams->Feature.InHeight);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_OutWidth, pInDlssCreateParams->Feature.InTargetWidth);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_OutHeight, pInDlssCreateParams->Feature.InTargetHeight);- NVSDK_NGX_Parameter_SetI(pInParams, NVSDK_NGX_Parameter_PerfQualityValue, pInDlssCreateParams->Feature.InPerfQualityValue);- NVSDK_NGX_Parameter_SetI(pInParams, NVSDK_NGX_Parameter_DLSS_Feature_Create_Flags, pInDlssCreateParams->InFeatureCreateFlags);- NVSDK_NGX_Parameter_SetI(pInParams, NVSDK_NGX_Parameter_DLSS_Enable_Output_Subrects, pInDlssCreateParams->InEnableOutputSubrects ? 1 : 0);-- if (InDevice) return NVSDK_NGX_VULKAN_CreateFeature1(InDevice, InCmdList, NVSDK_NGX_Feature_SuperSampling, pInParams, ppOutHandle);- else return NVSDK_NGX_VULKAN_CreateFeature(InCmdList, NVSDK_NGX_Feature_SuperSampling, pInParams, ppOutHandle);-}--static inline NVSDK_NGX_Result NGX_VULKAN_CREATE_DLSS_EXT(- VkCommandBuffer InCmdList,- unsigned int InCreationNodeMask,- unsigned int InVisibilityNodeMask,- NVSDK_NGX_Handle **ppOutHandle,- NVSDK_NGX_Parameter *pInParams,- NVSDK_NGX_DLSS_Create_Params *pInDlssCreateParams)-{- return NGX_VULKAN_CREATE_DLSS_EXT1(NULL, InCmdList, InCreationNodeMask, InVisibilityNodeMask, ppOutHandle, pInParams, pInDlssCreateParams);-}--static inline NVSDK_NGX_Result NGX_VULKAN_EVALUATE_DLSS_EXT(- VkCommandBuffer InCmdList,- NVSDK_NGX_Handle *pInHandle,- NVSDK_NGX_Parameter *pInParams,- NVSDK_NGX_VK_DLSS_Eval_Params *pInDlssEvalParams)-{- NVSDK_NGX_ENSURE_VK_IMAGEVIEW(pInDlssEvalParams->Feature.pInColor);- NVSDK_NGX_ENSURE_VK_IMAGEVIEW(pInDlssEvalParams->pInMotionVectors);- NVSDK_NGX_ENSURE_VK_IMAGEVIEW(pInDlssEvalParams->Feature.pInOutput);- NVSDK_NGX_ENSURE_VK_IMAGEVIEW(pInDlssEvalParams->pInDepth);- NVSDK_NGX_ENSURE_VK_IMAGEVIEW(pInDlssEvalParams->pInTransparencyMask);- NVSDK_NGX_ENSURE_VK_IMAGEVIEW(pInDlssEvalParams->pInExposureTexture);- NVSDK_NGX_ENSURE_VK_IMAGEVIEW(pInDlssEvalParams->pInBiasCurrentColorMask);- for (size_t i = 0; i <= 15; i++)- {- NVSDK_NGX_ENSURE_VK_IMAGEVIEW(pInDlssEvalParams->GBufferSurface.pInAttrib[i]);- }- NVSDK_NGX_ENSURE_VK_IMAGEVIEW(pInDlssEvalParams->pInMotionVectors3D);- NVSDK_NGX_ENSURE_VK_IMAGEVIEW(pInDlssEvalParams->pInIsParticleMask);- NVSDK_NGX_ENSURE_VK_IMAGEVIEW(pInDlssEvalParams->pInAnimatedTextureMask);- NVSDK_NGX_ENSURE_VK_IMAGEVIEW(pInDlssEvalParams->pInDepthHighRes);- NVSDK_NGX_ENSURE_VK_IMAGEVIEW(pInDlssEvalParams->pInPositionViewSpace);- NVSDK_NGX_ENSURE_VK_IMAGEVIEW(pInDlssEvalParams->pInRayTracingHitDistance);- NVSDK_NGX_ENSURE_VK_IMAGEVIEW(pInDlssEvalParams->pInMotionVectorsReflections);-- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_Color, pInDlssEvalParams->Feature.pInColor);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_Output, pInDlssEvalParams->Feature.pInOutput);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_Depth, pInDlssEvalParams->pInDepth);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_MotionVectors, pInDlssEvalParams->pInMotionVectors);- NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_Parameter_Jitter_Offset_X, pInDlssEvalParams->InJitterOffsetX);- NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_Parameter_Jitter_Offset_Y, pInDlssEvalParams->InJitterOffsetY);- NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_Parameter_Sharpness, pInDlssEvalParams->Feature.InSharpness);- NVSDK_NGX_Parameter_SetI(pInParams, NVSDK_NGX_Parameter_Reset, pInDlssEvalParams->InReset);- NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_Parameter_MV_Scale_X, pInDlssEvalParams->InMVScaleX == 0.0f ? 1.0f : pInDlssEvalParams->InMVScaleX);- NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_Parameter_MV_Scale_Y, pInDlssEvalParams->InMVScaleY == 0.0f ? 1.0f : pInDlssEvalParams->InMVScaleY);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_TransparencyMask, pInDlssEvalParams->pInTransparencyMask);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_ExposureTexture, pInDlssEvalParams->pInExposureTexture);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_DLSS_Input_Bias_Current_Color_Mask, pInDlssEvalParams->pInBiasCurrentColorMask);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_GBuffer_Albedo, pInDlssEvalParams->GBufferSurface.pInAttrib[NVSDK_NGX_GBUFFER_ALBEDO]);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_GBuffer_Roughness, pInDlssEvalParams->GBufferSurface.pInAttrib[NVSDK_NGX_GBUFFER_ROUGHNESS]);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_GBuffer_Metallic, pInDlssEvalParams->GBufferSurface.pInAttrib[NVSDK_NGX_GBUFFER_METALLIC]);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_GBuffer_Specular, pInDlssEvalParams->GBufferSurface.pInAttrib[NVSDK_NGX_GBUFFER_SPECULAR]);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_GBuffer_Subsurface, pInDlssEvalParams->GBufferSurface.pInAttrib[NVSDK_NGX_GBUFFER_SUBSURFACE]);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_GBuffer_Normals, pInDlssEvalParams->GBufferSurface.pInAttrib[NVSDK_NGX_GBUFFER_NORMALS]);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_GBuffer_ShadingModelId, pInDlssEvalParams->GBufferSurface.pInAttrib[NVSDK_NGX_GBUFFER_SHADINGMODELID]);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_GBuffer_MaterialId, pInDlssEvalParams->GBufferSurface.pInAttrib[NVSDK_NGX_GBUFFER_MATERIALID]);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_GBuffer_Atrrib_8, pInDlssEvalParams->GBufferSurface.pInAttrib[8]);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_GBuffer_Atrrib_9, pInDlssEvalParams->GBufferSurface.pInAttrib[9]);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_GBuffer_Atrrib_10, pInDlssEvalParams->GBufferSurface.pInAttrib[10]);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_GBuffer_Atrrib_11, pInDlssEvalParams->GBufferSurface.pInAttrib[11]);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_GBuffer_Atrrib_12, pInDlssEvalParams->GBufferSurface.pInAttrib[12]);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_GBuffer_Atrrib_13, pInDlssEvalParams->GBufferSurface.pInAttrib[13]);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_GBuffer_Atrrib_14, pInDlssEvalParams->GBufferSurface.pInAttrib[14]);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_GBuffer_Atrrib_15, pInDlssEvalParams->GBufferSurface.pInAttrib[15]);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_TonemapperType, pInDlssEvalParams->InToneMapperType);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_MotionVectors3D, pInDlssEvalParams->pInMotionVectors3D);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_IsParticleMask, pInDlssEvalParams->pInIsParticleMask);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_AnimatedTextureMask, pInDlssEvalParams->pInAnimatedTextureMask);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_DepthHighRes, pInDlssEvalParams->pInDepthHighRes);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_Position_ViewSpace, pInDlssEvalParams->pInPositionViewSpace);- NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_Parameter_FrameTimeDeltaInMsec, pInDlssEvalParams->InFrameTimeDeltaInMsec);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_RayTracingHitDistance, pInDlssEvalParams->pInRayTracingHitDistance);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_MotionVectorsReflection, pInDlssEvalParams->pInMotionVectorsReflections);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Input_Color_Subrect_Base_X, pInDlssEvalParams->InColorSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Input_Color_Subrect_Base_Y, pInDlssEvalParams->InColorSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Input_Depth_Subrect_Base_X, pInDlssEvalParams->InDepthSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Input_Depth_Subrect_Base_Y, pInDlssEvalParams->InDepthSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Input_MV_SubrectBase_X, pInDlssEvalParams->InMVSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Input_MV_SubrectBase_Y, pInDlssEvalParams->InMVSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Input_Translucency_SubrectBase_X, pInDlssEvalParams->InTranslucencySubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Input_Translucency_SubrectBase_Y, pInDlssEvalParams->InTranslucencySubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Input_Bias_Current_Color_SubrectBase_X, pInDlssEvalParams->InBiasCurrentColorSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Input_Bias_Current_Color_SubrectBase_Y, pInDlssEvalParams->InBiasCurrentColorSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Output_Subrect_Base_X, pInDlssEvalParams->InOutputSubrectBase.X);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Output_Subrect_Base_Y, pInDlssEvalParams->InOutputSubrectBase.Y);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Render_Subrect_Dimensions_Width , pInDlssEvalParams->InRenderSubrectDimensions.Width);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_DLSS_Render_Subrect_Dimensions_Height, pInDlssEvalParams->InRenderSubrectDimensions.Height);- NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_Parameter_DLSS_Pre_Exposure, pInDlssEvalParams->InPreExposure == 0.0f ? 1.0f : pInDlssEvalParams->InPreExposure);- NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_Parameter_DLSS_Exposure_Scale, pInDlssEvalParams->InExposureScale == 0.0f ? 1.0f : pInDlssEvalParams->InExposureScale);- NVSDK_NGX_Parameter_SetI(pInParams, NVSDK_NGX_Parameter_DLSS_Indicator_Invert_X_Axis, pInDlssEvalParams->InIndicatorInvertXAxis);- NVSDK_NGX_Parameter_SetI(pInParams, NVSDK_NGX_Parameter_DLSS_Indicator_Invert_Y_Axis, pInDlssEvalParams->InIndicatorInvertYAxis);-- return NVSDK_NGX_VULKAN_EvaluateFeature_C(InCmdList, pInHandle, pInParams, NULL);-}--static inline NVSDK_NGX_Result NGX_VULKAN_CREATE_DLISP_EXT(- VkCommandBuffer InCmdList,- unsigned int InCreationNodeMask,- unsigned int InVisibilityNodeMask,- NVSDK_NGX_Handle **ppOutHandle,- NVSDK_NGX_Parameter *pInParams,- NVSDK_NGX_Feature_Create_Params *pInDlispCreateParams)-{- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_CreationNodeMask, InCreationNodeMask);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_VisibilityNodeMask, InVisibilityNodeMask);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_Width, pInDlispCreateParams->InWidth);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_Height, pInDlispCreateParams->InHeight);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_OutWidth, pInDlispCreateParams->InTargetWidth);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_OutHeight, pInDlispCreateParams->InTargetHeight);- NVSDK_NGX_Parameter_SetI(pInParams, NVSDK_NGX_Parameter_PerfQualityValue, pInDlispCreateParams->InPerfQualityValue);-- return NVSDK_NGX_VULKAN_CreateFeature(InCmdList, NVSDK_NGX_Feature_ImageSignalProcessing, pInParams, ppOutHandle);-}--static inline NVSDK_NGX_Result NGX_VULKAN_EVALUATE_DLISP_EXT(- VkCommandBuffer InCmdList,- NVSDK_NGX_Handle *InHandle,- NVSDK_NGX_Parameter *pInParams,- NVSDK_NGX_VK_DLISP_Eval_Params *pInDlispEvalParams)-{- NVSDK_NGX_ENSURE_VK_IMAGEVIEW(pInDlispEvalParams->Feature.pInColor);- NVSDK_NGX_ENSURE_VK_IMAGEVIEW(pInDlispEvalParams->Feature.pInOutput);-- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_Color, pInDlispEvalParams->Feature.pInColor);- NVSDK_NGX_Parameter_SetVoidPointer(pInParams, NVSDK_NGX_Parameter_Output, pInDlispEvalParams->Feature.pInOutput);- NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_Parameter_Sharpness, pInDlispEvalParams->Feature.InSharpness);- NVSDK_NGX_Parameter_SetF(pInParams, NVSDK_NGX_Parameter_Denoise, pInDlispEvalParams->InDenoise);- // If input is atlas - use RECT to upscale only the required area- if (pInDlispEvalParams->InRectW)- {- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_Rect_X, pInDlispEvalParams->InRectX);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_Rect_Y, pInDlispEvalParams->InRectY);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_Rect_W, pInDlispEvalParams->InRectW);- NVSDK_NGX_Parameter_SetUI(pInParams, NVSDK_NGX_Parameter_Rect_H, pInDlispEvalParams->InRectH);- }-- return NVSDK_NGX_VULKAN_EvaluateFeature_C(InCmdList, InHandle, pInParams, NULL);-}-#endif // NVSDK_NGX_HELPERS_VK_Hdiff --git a/native/NVIDIA-DLSS/include/nvsdk_ngx_params.h b/native/NVIDIA-DLSS/include/nvsdk_ngx_params.hdeleted file mode 100644index bb5af60..0000000--- a/native/NVIDIA-DLSS/include/nvsdk_ngx_params.h+++ /dev/null@@ -1,116 +0,0 @@-/*- * SPDX-FileCopyrightText: Copyright (c) 2019-2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved.- * SPDX-License-Identifier: LicenseRef-NvidiaProprietary- *- * NVIDIA CORPORATION, its affiliates and licensors retain all intellectual- * property and proprietary rights in and to this material, related- * documentation and any modifications thereto. Any use, reproduction,- * disclosure or distribution of this material and related documentation- * without an express license agreement from NVIDIA CORPORATION or- * its affiliates is strictly prohibited.- */---#ifndef NVSDK_NGX_PARAMS_H-#define NVSDK_NGX_PARAMS_H--#include "nvsdk_ngx_defs.h"--#ifdef __cplusplus-extern "C"-{-#endif--typedef struct ID3D11Resource ID3D11Resource;-typedef struct ID3D12Resource ID3D12Resource;--typedef struct NVSDK_NGX_Feature_Create_Params-{- unsigned int InWidth;- unsigned int InHeight;- unsigned int InTargetWidth;- unsigned int InTargetHeight;- /*** OPTIONAL ***/- NVSDK_NGX_PerfQuality_Value InPerfQualityValue;-} NVSDK_NGX_Feature_Create_Params;--typedef struct NVSDK_NGX_DLSS_Create_Params-{- NVSDK_NGX_Feature_Create_Params Feature;- /*** OPTIONAL ***/- int InFeatureCreateFlags;- bool InEnableOutputSubrects;-} NVSDK_NGX_DLSS_Create_Params;--typedef struct NVSDK_NGX_DLDenoise_Create_Params-{- NVSDK_NGX_Feature_Create_Params Feature;- /*** OPTIONAL ***/- int InFeatureCreateFlags;-} NVSDK_NGX_DLDenoise_Create_Params;--#ifdef __cplusplus-typedef struct NVSDK_NGX_Parameter-{- virtual void Set(const char * InName, unsigned long long InValue) = 0;- virtual void Set(const char * InName, float InValue) = 0;- virtual void Set(const char * InName, double InValue) = 0;- virtual void Set(const char * InName, unsigned int InValue) = 0;- virtual void Set(const char * InName, int InValue) = 0;- virtual void Set(const char * InName, ID3D11Resource *InValue) = 0;- virtual void Set(const char * InName, ID3D12Resource *InValue) = 0;- virtual void Set(const char * InName, void *InValue) = 0;-- virtual NVSDK_NGX_Result Get(const char * InName, unsigned long long *OutValue) const = 0;- virtual NVSDK_NGX_Result Get(const char * InName, float *OutValue) const = 0;- virtual NVSDK_NGX_Result Get(const char * InName, double *OutValue) const = 0;- virtual NVSDK_NGX_Result Get(const char * InName, unsigned int *OutValue) const = 0;- virtual NVSDK_NGX_Result Get(const char * InName, int *OutValue) const = 0;- virtual NVSDK_NGX_Result Get(const char * InName, ID3D11Resource **OutValue) const = 0;- virtual NVSDK_NGX_Result Get(const char * InName, ID3D12Resource **OutValue) const = 0;- virtual NVSDK_NGX_Result Get(const char * InName, void **OutValue) const = 0;-- virtual void Reset() = 0;-} NVSDK_NGX_Parameter;-#else-typedef struct NVSDK_NGX_Parameter NVSDK_NGX_Parameter;-#endif // _cplusplus--typedef void (NVSDK_CONV *PFN_NVSDK_NGX_Parameter_SetULL)(NVSDK_NGX_Parameter *InParameter, const char * InName, unsigned long long InValue);-NVSDK_NGX_API void NVSDK_CONV NVSDK_NGX_Parameter_SetULL(NVSDK_NGX_Parameter *InParameter, const char * InName, unsigned long long InValue);-typedef void (NVSDK_CONV *PFN_NVSDK_NGX_Parameter_SetF)(NVSDK_NGX_Parameter *InParameter, const char * InName, float InValue);-NVSDK_NGX_API void NVSDK_CONV NVSDK_NGX_Parameter_SetF(NVSDK_NGX_Parameter *InParameter, const char * InName, float InValue);-typedef void (NVSDK_CONV *PFN_NVSDK_NGX_Parameter_SetD)(NVSDK_NGX_Parameter *InParameter, const char * InName, double InValue);-NVSDK_NGX_API void NVSDK_CONV NVSDK_NGX_Parameter_SetD(NVSDK_NGX_Parameter *InParameter, const char * InName, double InValue);-typedef void (NVSDK_CONV *PFN_NVSDK_NGX_Parameter_SetUI)(NVSDK_NGX_Parameter *InParameter, const char * InName, unsigned int InValue);-NVSDK_NGX_API void NVSDK_CONV NVSDK_NGX_Parameter_SetUI(NVSDK_NGX_Parameter *InParameter, const char * InName, unsigned int InValue);-typedef void (NVSDK_CONV *PFN_NVSDK_NGX_Parameter_SetI)(NVSDK_NGX_Parameter *InParameter, const char * InName, int InValue);-NVSDK_NGX_API void NVSDK_CONV NVSDK_NGX_Parameter_SetI(NVSDK_NGX_Parameter *InParameter, const char * InName, int InValue);-typedef void (NVSDK_CONV *PFN_NVSDK_NGX_Parameter_SetD3d11Resource)(NVSDK_NGX_Parameter *InParameter, const char * InName, ID3D11Resource *InValue);-NVSDK_NGX_API void NVSDK_CONV NVSDK_NGX_Parameter_SetD3d11Resource(NVSDK_NGX_Parameter *InParameter, const char * InName, ID3D11Resource *InValue);-typedef void (NVSDK_CONV *PFN_NVSDK_NGX_Parameter_SetD3d12Resource)(NVSDK_NGX_Parameter *InParameter, const char * InName, ID3D12Resource *InValue);-NVSDK_NGX_API void NVSDK_CONV NVSDK_NGX_Parameter_SetD3d12Resource(NVSDK_NGX_Parameter *InParameter, const char * InName, ID3D12Resource *InValue);-typedef void (NVSDK_CONV *PFN_NVSDK_NGX_Parameter_SetVoidPointer)(NVSDK_NGX_Parameter *InParameter, const char * InName, void *InValue);-NVSDK_NGX_API void NVSDK_CONV NVSDK_NGX_Parameter_SetVoidPointer(NVSDK_NGX_Parameter *InParameter, const char * InName, void *InValue);-typedef NVSDK_NGX_Result (NVSDK_CONV *PFN_NVSDK_NGX_Parameter_GetULL)(NVSDK_NGX_Parameter *InParameter, const char * InName, unsigned long long *OutValue);-NVSDK_NGX_API NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_Parameter_GetULL(NVSDK_NGX_Parameter *InParameter, const char * InName, unsigned long long *OutValue);-typedef NVSDK_NGX_Result (NVSDK_CONV *PFN_NVSDK_NGX_Parameter_GetF)(NVSDK_NGX_Parameter *InParameter, const char * InName, float *OutValue);-NVSDK_NGX_API NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_Parameter_GetF(NVSDK_NGX_Parameter *InParameter, const char * InName, float *OutValue);-typedef NVSDK_NGX_Result (NVSDK_CONV *PFN_NVSDK_NGX_Parameter_GetD)(NVSDK_NGX_Parameter *InParameter, const char * InName, double *OutValue);-NVSDK_NGX_API NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_Parameter_GetD(NVSDK_NGX_Parameter *InParameter, const char * InName, double *OutValue);-typedef NVSDK_NGX_Result (NVSDK_CONV *PFN_NVSDK_NGX_Parameter_GetUI)(NVSDK_NGX_Parameter *InParameter, const char * InName, unsigned int *OutValue);-NVSDK_NGX_API NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_Parameter_GetUI(NVSDK_NGX_Parameter *InParameter, const char * InName, unsigned int *OutValue);-typedef NVSDK_NGX_Result (NVSDK_CONV *PFN_NVSDK_NGX_Parameter_GetI)(NVSDK_NGX_Parameter *InParameter, const char * InName, int *OutValue);-NVSDK_NGX_API NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_Parameter_GetI(NVSDK_NGX_Parameter *InParameter, const char * InName, int *OutValue);-typedef NVSDK_NGX_Result (NVSDK_CONV *PFN_NVSDK_NGX_Parameter_GetD3d11Resource)(NVSDK_NGX_Parameter *InParameter, const char * InName, ID3D11Resource **OutValue);-NVSDK_NGX_API NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_Parameter_GetD3d11Resource(NVSDK_NGX_Parameter *InParameter, const char * InName, ID3D11Resource **OutValue);-typedef NVSDK_NGX_Result (NVSDK_CONV *PFN_NVSDK_NGX_Parameter_GetD3d12Resource)(NVSDK_NGX_Parameter *InParameter, const char * InName, ID3D12Resource **OutValue);-NVSDK_NGX_API NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_Parameter_GetD3d12Resource(NVSDK_NGX_Parameter *InParameter, const char * InName, ID3D12Resource **OutValue);-typedef NVSDK_NGX_Result (NVSDK_CONV *PFN_NVSDK_NGX_Parameter_GetVoidPointer)(NVSDK_NGX_Parameter *InParameter, const char * InName, void **OutValue);-NVSDK_NGX_API NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_Parameter_GetVoidPointer(NVSDK_NGX_Parameter *InParameter, const char * InName, void **OutValue);--#ifdef __cplusplus-} // extern "C"-#endif--#endif // #define NVSDK_NGX_PARAMS_Hdiff --git a/native/NVIDIA-DLSS/include/nvsdk_ngx_params_dlssd.h b/native/NVIDIA-DLSS/include/nvsdk_ngx_params_dlssd.hdeleted file mode 100644index f52ab7a..0000000--- a/native/NVIDIA-DLSS/include/nvsdk_ngx_params_dlssd.h+++ /dev/null@@ -1,36 +0,0 @@-/*- * SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.- * SPDX-License-Identifier: LicenseRef-NvidiaProprietary- *- * NVIDIA CORPORATION, its affiliates and licensors retain all intellectual- * property and proprietary rights in and to this material, related- * documentation and any modifications thereto. Any use, reproduction,- * disclosure or distribution of this material and related documentation- * without an express license agreement from NVIDIA CORPORATION or- * its affiliates is strictly prohibited.- */---#ifndef NVSDK_NGX_PARAMS_DLSSD_H-#define NVSDK_NGX_PARAMS_DLSSD_H--#include "nvsdk_ngx_defs_dlssd.h"--typedef struct NVSDK_NGX_DLSSD_Create_Params-{- NVSDK_NGX_DLSS_Denoise_Mode InDenoiseMode;- NVSDK_NGX_DLSS_Roughness_Mode InRoughnessMode;- NVSDK_NGX_DLSS_Depth_Type InUseHWDepth;-- unsigned int InWidth;- unsigned int InHeight;- unsigned int InTargetWidth;- unsigned int InTargetHeight;- /*** OPTIONAL ***/- NVSDK_NGX_PerfQuality_Value InPerfQualityValue;- int InFeatureCreateFlags;- bool InEnableOutputSubrects;-} NVSDK_NGX_DLSSD_Create_Params;---#endif // #define NVSDK_NGX_PARAMS_DLSSD_Hdiff --git a/native/NVIDIA-DLSS/include/nvsdk_ngx_params_dlssg.h b/native/NVIDIA-DLSS/include/nvsdk_ngx_params_dlssg.hdeleted file mode 100644index f4dfa2b..0000000--- a/native/NVIDIA-DLSS/include/nvsdk_ngx_params_dlssg.h+++ /dev/null@@ -1,138 +0,0 @@-#pragma once-/*-* Copyright (c) 2021-2024 NVIDIA CORPORATION. All rights reserved.-*-* NVIDIA Corporation and its licensors retain all intellectual property and proprietary-* rights in and to this software, related documentation and any modifications thereto.-* Any use, reproduction, disclosure or distribution of this software and related-* documentation without an express license agreement from NVIDIA Corporation is strictly-* prohibited.-*-* TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THIS SOFTWARE IS PROVIDED *AS IS*-* AND NVIDIA AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES, EITHER EXPRESS OR IMPLIED,-* INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A-* PARTICULAR PURPOSE. IN NO EVENT SHALL NVIDIA OR ITS SUPPLIERS BE LIABLE FOR ANY-* SPECIAL, INCIDENTAL, INDIRECT, OR CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT-* LIMITATION, DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF-* BUSINESS INFORMATION, OR ANY OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR-* INABILITY TO USE THIS SOFTWARE, EVEN IF NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF-* SUCH DAMAGES.-*/---#ifndef NVSDK_NGX_PARAMS_DLSSG_H-#define NVSDK_NGX_PARAMS_DLSSG_H--#include <stdint.h> // for uint64_t--#include "nvsdk_ngx.h" // DX11/12 here-#include "nvsdk_ngx_defs.h"--typedef struct NVSDK_NGX_DLSSG_Create_Params-{- unsigned int Width;- unsigned int Height;- unsigned int NativeBackbufferFormat;- unsigned int RenderWidth;- unsigned int RenderHeight;- bool DynamicResolutionScaling;-} NVSDK_NGX_DLSSG_Create_Params;--typedef struct NVSDK_NGX_DLSSG_Opt_Eval_Params-{- //! Number of intermediate frames to generate between rendered frames- //! (1 = 2x, 2 = 3x, etc.)- unsigned int multiFrameCount = 1;- //! The index (starting at 1) of the intermediate frame being generated, up- //! to multiFrameCount (inclusive)- unsigned int multiFrameIndex = 1;-- //! IMPORTANT: All matrices should NOT contain temporal AA jitter offset- //! Specifies matrix transformation from the camera view to the clip space.- float cameraViewToClip[4][4];- //! Specifies matrix transformation from the clip space to the camera view space.- float clipToCameraView[4][4];- //! Specifies matrix transformation describing lens distortion in clip space.- float clipToLensClip[4][4];- //! Specifies matrix transformation from the current clip to the previous clip space.- float clipToPrevClip[4][4];- //! Specifies matrix transformation from the previous clip to the current clip space.- float prevClipToClip[4][4];-- //! Specifies clip space jitter offset- float jitterOffset[2];- //! Specifies scale factors used to normalize motion vectors (so the values are in [-1,1] range)- float mvecScale[2];- //! Specifies camera pinhole offset.- float cameraPinholeOffset[2];- //! Specifies camera position in world space.- float cameraPos[3];- //! Specifies camera up vector in world space.- float cameraUp[3];- //! Specifies camera right vector in world space.- float cameraRight[3];- //! Specifies camera forward vector in world space.- float cameraFwd[3];-- //! Specifies camera near view plane distance.- float cameraNear;- //! Specifies camera far view plane distance.- float cameraFar;- //! Specifies camera field of view in radians.- float cameraFOV;- //! Specifies camera aspect ratio defined as view space width divided by height.- float cameraAspectRatio;-- //! Specifies if tagged color buffers are full HDR (rendering to an HDR monitor) or not- bool colorBuffersHDR;- //! Specifies if depth values are inverted (value closer to the camera is higher) or not.- bool depthInverted;- //! Specifies if camera motion is included in the MVec buffer.- bool cameraMotionIncluded;- //! Specifies if previous frame has no connection to the current one (motion vectors are invalid)- bool reset;- //! Specifies if Automode overrode the input Reset flag to true.- bool automodeOverrideReset;- //! Specifies if application is not currently rendering game frames (paused in menu, playing video cut-scenes)- bool notRenderingGameFrames;- //! Specifies if orthographic projection is used or not.- bool orthoProjection;-- //! Specifies which value represents an invalid (un-initialized) value in the motion vectors buffer- float motionVectorsInvalidValue;- //! Specifies if motion vectors are already dilated or not.- bool motionVectorsDilated;-- //! Specifies whether or not fullscreen menu detection should be run- bool menuDetectionEnabled;-- NVSDK_NGX_Coordinates mvecsSubrectBase = { 0, 0 };- NVSDK_NGX_Dimensions mvecsSubrectSize = { 0, 0 };- NVSDK_NGX_Coordinates depthSubrectBase = { 0, 0 };- NVSDK_NGX_Dimensions depthSubrectSize = { 0, 0 };-- NVSDK_NGX_Coordinates hudLessSubrectBase = { 0, 0 };- NVSDK_NGX_Dimensions hudLessSubrectSize = { 0, 0 };- NVSDK_NGX_Coordinates uiSubrectBase = { 0, 0 };- NVSDK_NGX_Dimensions uiSubrectSize = { 0, 0 };- NVSDK_NGX_Coordinates uiAlphaSubrectBase = { 0, 0 };- NVSDK_NGX_Dimensions uiAlphaSubrectSize = { 0, 0 };-- NVSDK_NGX_Coordinates bidirectionalDistFieldSubrectBase = { 0, 0 };- NVSDK_NGX_Dimensions bidirectionalDistFieldSubrectSize = { 0, 0 };- NVSDK_NGX_PrecisionInfo bidirectionalDistFieldPrecisionInfo = { 0, 0.0f, 0.0f };-- //! Optional heuristic that specifies the minimum depth difference between two objects in screen-space.- //! See comment above NVSDK_NGX_DLSSG_Parameter_MinRelativeLinearDepthObjectSeparation for details.- float minRelativeLinearDepthObjectSeparation = 40.0f;-- NVSDK_NGX_Coordinates backbufferSubrectBase = { 0, 0 };- NVSDK_NGX_Dimensions backbufferSubrectSize = { 0, 0 };-- NVSDK_NGX_Coordinates outputInterpSubrectBase = { 0, 0 };- NVSDK_NGX_Dimensions outputInterpSubrectSize = { 0, 0 };- NVSDK_NGX_Coordinates outputRealSubrectBase = { 0, 0 };- NVSDK_NGX_Dimensions outputRealSubrectSize = { 0, 0 };-} NVSDK_NGX_DLSSG_Opt_Eval_Params;--#endif // NVSDK_NGX_PARAMS_DLSSG_Hdiff --git a/native/NVIDIA-DLSS/include/nvsdk_ngx_vk.h b/native/NVIDIA-DLSS/include/nvsdk_ngx_vk.hdeleted file mode 100644index 09eb3f8..0000000--- a/native/NVIDIA-DLSS/include/nvsdk_ngx_vk.h+++ /dev/null@@ -1,768 +0,0 @@-/*- * SPDX-FileCopyrightText: Copyright (c) 2019-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.- * SPDX-License-Identifier: LicenseRef-NvidiaProprietary- *- * NVIDIA CORPORATION, its affiliates and licensors retain all intellectual- * property and proprietary rights in and to this material, related- * documentation and any modifications thereto. Any use, reproduction,- * disclosure or distribution of this material and related documentation- * without an express license agreement from NVIDIA CORPORATION or- * its affiliates is strictly prohibited.- */--/*-* HOW TO USE:-*-* IMPORTANT: Methods in this library are NOT thread safe. It is up to the-* client to ensure that thread safety is enforced as needed.-*-* 1) Call NVSDK_CONV NVSDK_NGX_D3D11/D3D12/CUDA_Init and pass your app Id-* and other parameters. This will initialize SDK or return an error code-* if SDK cannot run on target machine. Depending on error user might-* need to update drivers. Please note that application Id is provided-* by NVIDIA so if you do not have one please contact us.-*-* 2) Call NVSDK_NGX_D3D11/D3D12/CUDA_GetParameters to obtain pointer to-* interface used to pass parameters to SDK. Interface instance is-* allocated and released by SDK so there is no need to do any memory-* management on client side.-*-* 3) Set key parameters for the feature you want to use. For example,-* width and height are required for all features and they can be-* set like this:-* Params->Set(NVSDK_NGX_Parameter_Width,MY_WIDTH);-* Params->Set(NVSDK_NGX_Parameter_Height,MY_HEIGHT);-*-* Please refer to samples since different features need different-* parameters and hints.-*-* 4) Call NVSDK_NGX_D3D11/D3D12/CUDA_GetScratchBufferSize to obtain size of-* the scratch buffer needed by specific feature. This D3D or CUDA buffer-* should be allocated by client and passed as:-* Params->Set(NVSDK_NGX_Parameter_Scratch,MY_SCRATCH_POINTER)-* Params->Set(NVSDK_NGX_Parameter_Scratch_SizeInBytes,MY_SCRATCH_SIZE_IN_BYTES)-* NOTE: Returned size can be 0 if feature does not use any scratch buffer.-* It is OK to use bigger buffer or reuse buffers across features as long-* as minimum size requirement is met.-*-* 5) Call NVSDK_NGX_D3D11/D3D12/CUDA_CreateFeature to create feature you need.-* On success SDK will return a handle which must be used in any successive-* calls to SDK which require feature handle. SDK will use all parameters-* and hints provided by client to generate feature. If feature with the same-* parameters already exists and error code will be returned.-*-* 6) Call NVSDK_NGX_D3D11/D3D12/CUDA_EvaluateFeature to invoke execution of-* specific feature. Before feature can be evaluated input parameters must-* be specified (like for example color/albedo buffer, motion vectors etc)-*-* 6) Call NVSDK_NGX_D3D11/D3D12/CUDA_ReleaseFeature when feature is no longer-* needed. After this call feature handle becomes invalid and cannot be used.-*-* 7) Call NVSDK_NGX_D3D11/D3D12/CUDA_Shutdown when SDK is no longer needed to-* release all resources.--* Contact: [email protected]-*/---#ifndef NVSDK_NGX_VK_H-#define NVSDK_NGX_VK_H--#include "nvsdk_ngx_defs.h"-#include "nvsdk_ngx_defs_vk.h"-#include "nvsdk_ngx_params.h"-#ifndef __cplusplus-#include <stdbool.h>-#include <wchar.h>-#endif--#ifdef __cplusplus-extern "C"-{-#endif--////////////////////////////////////////////////////////////////////////////////-// NVSDK_NGX_VULKAN_RequiredExtensions [Vulkan only]-// --------------------------------------// DEPRECATED: Use NVSDK_NGX_VULKAN_GetFeatureInstanceExtensionRequirements() and-// NVSDK_NGX_VULKAN_GetFeatureRequirements() instead.-//-// Retrieves the instance and device extensions required by NGX.-//-// DESCRIPTION:-// This function returns the instance and device extensions required by-// NGX. It is deprecated and should be replaced with-// NVSDK_NGX_VULKAN_GetFeatureInstanceExtensionRequirements() and-// NVSDK_NGX_VULKAN_GetFeatureRequirements().-//-// PARAMETERS:-// OutInstanceExtCount:-// Returns the number of instance extensions NGX requires.-//-// OutInstanceExts:-// Returns a pointer to *OutInstanceExtCount strings of instance extensions.-//-// OutDeviceExtCount:-// Returns the number of device extensions NGX requires.-//-// OutDeviceExts:-// Returns a pointer to *OutDeviceExtCount strings of device extensions.-//-// RETURNS:-// NVSDK_NGX_Result indicating success or failure.-//-NVSDK_NGX_API NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_VULKAN_RequiredExtensions(unsigned int *OutInstanceExtCount, const char ***OutInstanceExts, unsigned int *OutDeviceExtCount, const char ***OutDeviceExts);--// NOTE: Functions under the same name and different function signatures exist-// between the NGX SDK, NGX Core (driver), and NGX Snippets. To discern the-// different signatures here we check if NGX_SNIPPET_BUILD is defined. When that-// is the case we know that the function signature in-use should be that of-// between NGX Core and the Snippet. Otherwise the signature should be between-// NGX SDK and NGX Core.-////////////////////////////////////////////////////////////////////////////////-// NVSDK_NGX_Init-// ------------------------------------------------------------------------------// Initializes a new SDK instance.-//-// DESCRIPTION:-// Initializes a new SDK instance. Most NGX SDK functions require the NGX-// SDK to be initialized for the corresponding graphics API and device to-// function properly.-//-// NVSDK_NGX_Init requires an application ID provided by NVIDIA. If an-// application ID is not available, use NVSDK_NGX_Init_with_ProjectID to-// supply your own identifier.-//-// Be sure to call NVSDK_NGX_Shutdown to shut down the SDK when it is no-// longer needed.-//-// PARAMETERS:-// InApplicationId:-// Unique ID provided by NVIDIA.-//-// InApplicationDataPath:-// Directory to store logs and other temporary files. Write access is-// required. Typically, this would be next to the application executable,-// or in a location like Documents or ProgramData.-//-// InInstance/InPD/InDevice:-// Vulkan Instance, PhysicalDevice, and Device to use.-//-// InGIPA/InGDPA:-// Optional Vulkan function pointers to vkGetInstanceProcAddr and-// vkGetDeviceProcAddr.-//-// InFeatureInfo:-// Contains information common to all features, including a list of paths-// where feature DLLs can be located, other than the default path (application directory).-//-// InSDKVersion:-// Version of the SDK currently in use. Typically, this should be left as-// the default value, NVSDK_NGX_Version_API.-//-// RETURNS:-// NVSDK_NGX_Result indicating success or failure. Common values include:-// - NVSDK_NGX_Result_Success if the function executed successfully-// - NVSDK_NGX_Result_FAIL_FeatureNotSupported if the NGX SDK is not-// supported on the current system-// Check the NGX logs for additional information about any failures.-//-#if defined(NGX_SNIPPET_BUILD)-#ifdef __cplusplus-NVSDK_NGX_API NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_VULKAN_Init(unsigned long long InApplicationId, const wchar_t *InApplicationDataPath, VkInstance InInstance, VkPhysicalDevice InPD, VkDevice InDevice, NVSDK_NGX_Version InSDKVersion = NVSDK_NGX_Version_API);-NVSDK_NGX_API NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_VULKAN_Init_Ext(unsigned long long InApplicationId, const wchar_t *InApplicationDataPath, VkInstance InInstance, VkPhysicalDevice InPD, VkDevice InDevice, NVSDK_NGX_Version InSDKVersion = NVSDK_NGX_Version_API, const NVSDK_NGX_Parameter *InParameters = nullptr);-NVSDK_NGX_API NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_VULKAN_Init_Ext2(unsigned long long InApplicationId, const wchar_t *InApplicationDataPath, VkInstance InInstance, VkPhysicalDevice InPD, VkDevice InDevice, PFN_vkGetInstanceProcAddr InGIPA = nullptr, PFN_vkGetDeviceProcAddr InGDPA = nullptr, NVSDK_NGX_Version InSDKVersion = NVSDK_NGX_Version_API, const NVSDK_NGX_Parameter *InParameters = nullptr);-#else-NVSDK_NGX_API NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_VULKAN_Init(unsigned long long InApplicationId, const wchar_t *InApplicationDataPath, VkInstance InInstance, VkPhysicalDevice InPD, VkDevice InDevice, NVSDK_NGX_Version InSDKVersion);-NVSDK_NGX_API NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_VULKAN_Init_Ext(unsigned long long InApplicationId, const wchar_t *InApplicationDataPath, VkInstance InInstance, VkPhysicalDevice InPD, VkDevice InDevice, NVSDK_NGX_Version InSDKVersion, const NVSDK_NGX_Parameter *InParameters);-NVSDK_NGX_API NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_VULKAN_Init_Ext2(unsigned long long InApplicationId, const wchar_t *InApplicationDataPath, VkInstance InInstance, VkPhysicalDevice InPD, VkDevice InDevice, PFN_vkGetInstanceProcAddr InGIPA, PFN_vkGetDeviceProcAddr InGDPA, NVSDK_NGX_Version InSDKVersion, const NVSDK_NGX_Parameter *InParameters);-#endif-#else-#ifdef __cplusplus-NVSDK_NGX_API NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_VULKAN_Init(unsigned long long InApplicationId, const wchar_t *InApplicationDataPath, VkInstance InInstance, VkPhysicalDevice InPD, VkDevice InDevice, PFN_vkGetInstanceProcAddr InGIPA = nullptr, PFN_vkGetDeviceProcAddr InGDPA = nullptr, const NVSDK_NGX_FeatureCommonInfo *InFeatureInfo = nullptr, NVSDK_NGX_Version InSDKVersion = NVSDK_NGX_Version_API);-#else-NVSDK_NGX_API NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_VULKAN_Init(unsigned long long InApplicationId, const wchar_t *InApplicationDataPath, VkInstance InInstance, VkPhysicalDevice InPD, VkDevice InDevice, PFN_vkGetInstanceProcAddr InGIPA, PFN_vkGetDeviceProcAddr InGDPA, const NVSDK_NGX_FeatureCommonInfo *InFeatureInfo, NVSDK_NGX_Version InSDKVersion);-#endif-#endif // defined(NGX_SNIPPET_BUILD)--////////////////////////////////////////////////////////////////////////////////-// NVSDK_NGX_Init_with_ProjectID-// ------------------------------------------------------------------------------// Initializes a new SDK instance using a project ID.-//-// DESCRIPTION:-// Initializes a new SDK instance. Most NGX SDK functions require the NGX-// SDK to be initialized for the corresponding graphics API and device to-// function properly.-//-// Applications must provide a unique identifier to initialize the NGX SDK.-// If an identifier was provided by NVIDIA, use NVSDK_NGX_Init instead.-//-// For projects using third-party engines such as Unreal Engine or-// Omniverse, the integration for those engines should handle providing the-// correct Project ID to NGX. Ensure that the project ID is set in the-// engine's editor.-//-// For other engines, use NVSDK_NGX_EngineType CUSTOM. The driver will-// validate that the Project ID is GUID-like, for example,-// "a0f57b54-1daf-4934-90ae-c4035c19df04". Ensure your project ID matches-// this format.-//-// Be sure to call NVSDK_NGX_Shutdown to shut down the SDK when it is no-// longer needed.-//-// PARAMETERS:-// InProjectId:-// Unique ID provided by the rendering engine used. Must be a GUID-like-// string.-//-// InEngineType:-// Rendering engine used by the application/plugin. Use NVSDK_NGX_EngineType-// CUSTOM if the specific engine type is not explicitly supported.-//-// InEngineVersion:-// Version number of the rendering engine used by the application/plugin.-//-// InApplicationDataPath:-// Directory to store logs and other temporary files (write access required).-//-// InInstance/InPD/InDevice:-// Vulkan Instance, PhysicalDevice, and Device to use.-//-// InGIPA/InGDPA:-// Optional Vulkan function pointers to vkGetInstanceProcAddr and-// vkGetDeviceProcAddr.-//-// InFeatureInfo:-// Contains information common to all features, including a list of paths-// where feature DLLs can be located in addition to the default path-// (the application directory).-//-// InSDKVersion:-// Version of the SDK currently in use. Typically, this should be left as-// the default value, NVSDK_NGX_Version_API.-//-// RETURNS:-// NVSDK_NGX_Result indicating success or failure. Common values include:-// - NVSDK_NGX_Result_Success if the function executed successfully-// - NVSDK_NGX_Result_InvalidParameter if the provided project ID is in-// an invalid format-// - NVSDK_NGX_Result_FAIL_FeatureNotSupported if the NGX SDK is not-// supported on the current system-// Check the NGX logs for additional information about any failures.-//-#if defined(NGX_SNIPPET_BUILD)-// No NGX Core <---> Snippet interfaces-#else-#ifdef __cplusplus-NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_VULKAN_Init_with_ProjectID(const char *InProjectId, NVSDK_NGX_EngineType InEngineType, const char *InEngineVersion, const wchar_t *InApplicationDataPath, VkInstance InInstance, VkPhysicalDevice InPD, VkDevice InDevice, PFN_vkGetInstanceProcAddr InGIPA = nullptr, PFN_vkGetDeviceProcAddr InGDPA = nullptr, const NVSDK_NGX_FeatureCommonInfo *InFeatureInfo = nullptr, NVSDK_NGX_Version InSDKVersion = NVSDK_NGX_Version_API);-#else-NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_VULKAN_Init_with_ProjectID(const char *InProjectId, NVSDK_NGX_EngineType InEngineType, const char *InEngineVersion, const wchar_t *InApplicationDataPath, VkInstance InInstance, VkPhysicalDevice InPD, VkDevice InDevice, PFN_vkGetInstanceProcAddr InGIPA, PFN_vkGetDeviceProcAddr InGDPA, const NVSDK_NGX_FeatureCommonInfo *InFeatureInfo, NVSDK_NGX_Version InSDKVersion);-#endif-#endif // defined(NGX_SNIPPET_BUILD)--////////////////////////////////////////////////////////////////////////////////-// NVSDK_NGX_Shutdown-// ------------------------------------------------------------------------------// Shuts down the current SDK instance and releases all resources.-//-// DESCRIPTION:-// Shuts down the current SDK instance and releases all resources. If a-// device is provided, NVSDK_NGX_Shutdown1 shuts down the instance-// corresponding to the specified device. If nullptr is provided, all-// instances are shut down.-//-// Deprecation Notice: The use of Shutdown() is deprecated. Please use-// Shutdown1(nullptr) instead.-//-// PARAMETERS:-// InDevice:-// Device to shut down. If nullptr, the SDK is shut down for all devices.-//-// RETURNS:-// NVSDK_NGX_Result indicating success or failure.-//-#ifdef NGX_ENABLE_DEPRECATED_SHUTDOWN-NVSDK_NGX_API NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_VULKAN_Shutdown(void);-#endif-NVSDK_NGX_API NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_VULKAN_Shutdown1(VkDevice InDevice);--#ifdef NGX_ENABLE_DEPRECATED_GET_PARAMETERS-////////////////////////////////////////////////////////////////////////////////-// NVSDK_NGX_GetParameters-// ------------------------------------------------------------------------------// Retrieves a parameter map used to set parameters needed by the SDK.-//-// DEPRECATED: Use NVSDK_NGX_AllocateParameters or-// NVSDK_NGX_GetCapabilityParameters instead.-//-// DESCRIPTION:-// Retrieves the common NVSDK_NGX_Parameter map for providing parameters to-// the SDK. The NVSDK_NGX_Parameter interface allows simple parameter setup-// using named fields. For example, set the width by calling-// Parameters->Set(NVSDK_NGX_Parameter_Width, 100) or provide a resource-// pointer by calling Parameters->Set(NVSDK_NGX_Parameter_Color, resource).-// For more details, see the sample code.-//-// Parameter maps returned by NVSDK_NGX_GetParameters are pre-populated-// with NGX capabilities and available features. Unlike-// NVSDK_NGX_AllocateParameters, parameter maps returned by-// NVSDK_NGX_GetParameters have their lifetimes managed by NGX and must not-// be destroyed by the application using NVSDK_NGX_DestroyParameters.-//-// This function may only be called after a successful call to-// NVSDK_NGX_Init.-//-// Note: Allocated memory will be freed by NGX, so do not use the-// free/delete operator.-//-// Deprecation Notice: NVSDK_NGX_GetParameters is deprecated. Applications-// should use NVSDK_NGX_AllocateParameters and-// NVSDK_NGX_GetCapabilityParameters when possible. However, if there is a-// possibility that the user may be using an older driver version (driver-// version 445 or older), NVSDK_NGX_GetParameters may still be used as a-// fallback if NVSDK_NGX_AllocateParameters or-// NVSDK_NGX_GetCapabilityParameters return-// NVSDK_NGX_Result_FAIL_OutOfDate.-//-// PARAMETERS:-// OutParameters:-// Output pointer that will be populated with an NVSDK_NGX_Parameter-// interface.-//-// RETURNS:-// NVSDK_NGX_Result indicating success or failure.-//-NVSDK_NGX_API NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_VULKAN_GetParameters(NVSDK_NGX_Parameter **OutParameters);-#endif // NGX_ENABLE_DEPRECATED_GET_PARAMETERS--////////////////////////////////////////////////////////////////////////////////-// NVSDK_NGX_AllocateParameters-// ------------------------------------------------------------------------------// Allocates a parameter map used to set parameters needed by the SDK.-//-// DESCRIPTION:-// Allocates a new NVSDK_NGX_Parameter map for providing parameters to the-// SDK. The lifetime of this parameter map must be managed by the-// application. The NVSDK_NGX_Parameter interface allows simple parameter-// setup using named fields. For example, set the width by calling-// Parameters->Set(NVSDK_NGX_Parameter_Width, 100) or provide a resource-// pointer by calling Parameters->Set(NVSDK_NGX_Parameter_Color, resource).-// For more details, see the sample code.-//-// Use NVSDK_NGX_DestroyParameters to free a parameter map created by-// NVSDK_NGX_AllocateParameters. Parameter maps created by-// NVSDK_NGX_AllocateParameters must NOT be freed using the free/delete-// operator.-//-// Parameter maps created by NVSDK_NGX_AllocateParameters do not come-// pre-populated with NGX capabilities and available features. To create a-// new parameter map pre-populated with such information, use-// NVSDK_NGX_GetCapabilityParameters instead.-//-// This function may return NVSDK_NGX_Result_FAIL_OutOfDate if using an-// older driver that does not support this API call. In such a case,-// NVSDK_NGX_GetParameters may be used as a fallback.-//-// This function may only be called after a successful call to-// NVSDK_NGX_Init.-//-// PARAMETERS:-// OutParameters:-// Output pointer that will be populated with the newly-allocated-// NVSDK_NGX_Parameter interface.-//-// RETURNS:-// NVSDK_NGX_Result indicating success or failure. Common values include:-// - NVSDK_NGX_Result_Success if the function executed successfully-// - NVSDK_NGX_Result_FAIL_OutOfDate if this function is not supported by-// the current display driver-// Check the NGX logs for additional information about any failures.-//-NVSDK_NGX_API NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_VULKAN_AllocateParameters(NVSDK_NGX_Parameter** OutParameters);--////////////////////////////////////////////////////////////////////////////////-// NVSDK_NGX_GetCapabilityParameters-// ------------------------------------------------------------------------------// Allocates a parameter map populated with NGX and feature capabilities.-//-// DESCRIPTION:-// Allocates a new NVSDK_NGX_Parameter map pre-populated with NGX-// capabilities and information about available features. The output-// parameter map can also be used in the same ways as a parameter map-// allocated with NVSDK_NGX_AllocateParameters. However, it is not-// recommended to use NVSDK_NGX_GetCapabilityParameters unless querying NGX-// capabilities due to the overhead associated with pre-populating the-// parameter map.-//-// Use NVSDK_NGX_DestroyParameters to free a parameter map created by-// NVSDK_NGX_GetCapabilityParameters. Parameter maps created by-// NVSDK_NGX_GetCapabilityParameters must NOT be freed using the-// free/delete operator.-//-// This function may return NVSDK_NGX_Result_FAIL_OutOfDate if using an-// older driver that does not support this API call. In such a case,-// NVSDK_NGX_GetParameters may be used as a fallback.-//-// This function may only be called after a successful call to-// NVSDK_NGX_Init.-//-// PARAMETERS:-// OutParameters:-// Output pointer that will be populated with the newly-allocated-// NVSDK_NGX_Parameter interface.-//-// RETURNS:-// NVSDK_NGX_Result indicating success or failure. Common values include:-// - NVSDK_NGX_Result_Success if the function executed successfully-// - NVSDK_NGX_Result_FAIL_OutOfDate if this function is not supported by-// the current display driver-// Check the NGX logs for additional information about any failures.-//-NVSDK_NGX_API NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_VULKAN_GetCapabilityParameters(NVSDK_NGX_Parameter** OutParameters);--////////////////////////////////////////////////////////////////////////////////-// NVSDK_NGX_DestroyParameters-// ------------------------------------------------------------------------------// Destroys the specified parameter map.-//-// DESCRIPTION:-// Destroys the input parameter map. Once NVSDK_NGX_DestroyParameters is-// called on a parameter map, it must not be used again.-//-// NVSDK_NGX_DestroyParameters must not be called on any parameter map-// returned by NVSDK_NGX_GetParameters; NGX will manage the lifetime of-// those parameter maps.-//-// This function may only be called after a successful call to-// NVSDK_NGX_Init.-//-// PARAMETERS:-// InParameters:-// The parameter map to be destroyed.-//-// RETURNS:-// NVSDK_NGX_Result indicating success or failure.-//-NVSDK_NGX_API NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_VULKAN_DestroyParameters(NVSDK_NGX_Parameter* InParameters);--////////////////////////////////////////////////////////////////////////////////-// NVSDK_NGX_GetScratchBufferSize-// ------------------------------------------------------------------------------// Retrieves the size of the scratch buffer needed for the specified feature.-//-// DESCRIPTION:-// The SDK requires a buffer of a certain size provided by the client to-// initialize some NGX features. Once the feature is no longer needed, the-// buffer can be released. It is safe to reuse the same scratch buffer for-// different features as long as the minimum size requirement is met for-// all features. Some features might not need a scratch buffer, so a return-// size of 0 is completely valid.-//-// Note: Most current NGX features do not use scratch buffers. Please check-// the documentation for the particular feature in use to determine whether-// a scratch buffer needs to be created.-//-// PARAMETERS:-// InFeatureId:-// Identifier of the feature to query.-//-// InParameters:-// Parameters used by the feature to determine scratch buffer size.-//-// OutSizeInBytes:-// Number of bytes needed for the scratch buffer for the specified feature.-//-// RETURNS:-// NVSDK_NGX_Result indicating success or failure.-//-NVSDK_NGX_API NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_VULKAN_GetScratchBufferSize(NVSDK_NGX_Feature InFeatureId, const NVSDK_NGX_Parameter *InParameters, size_t *OutSizeInBytes);--////////////////////////////////////////////////////////////////////////////////-// NVSDK_NGX_CreateFeature-// ------------------------------------------------------------------------------// Creates and initializes an instance of the specified NGX feature.-//-// DESCRIPTION:-// Each feature needs to be created before it can be used. The parameters-// required to create the feature vary. Refer to the feature's-// documentation and/or sample code to find out which input parameters are-// needed to create a specific feature.-//-// NVSDK_NGX_CreateFeature creates an NVSDK_NGX_Handle to the feature, which-// is needed to reference the feature in later calls to-// NVSDK_NGX_EvaluateFeature. Multiple instances of the same feature may be-// created, and evaluating one instance of a feature should not change the-// state of other instances.-//-// When a feature instance is no longer needed, it should be freed using-// NVSDK_NGX_ReleaseFeature.-//-// If multiple devices are in use, the device to create the-// feature on must be specified using CreateFeature1().-//-// PARAMETERS:-// InCmdBuffer:-// Command buffer to use to execute GPU commands. Must be open and-// recording.-//-// InDevice:-// Vulkan device on which to create the feature.-//-// InFeatureID:-// Identifier of the feature to initialize.-//-// InParameters:-// Parameters used to create the feature.-//-// OutHandle:-// Handle which uniquely identifies the feature.-//-// RETURNS:-// NVSDK_NGX_Result indicating success or failure. Common values include:-// - NVSDK_NGX_Result_Success if the function executed successfully-// - NVSDK_NGX_Result_FAIL_UnableToInitializeFeature if the feature-// cannot be created, for example, because the feature is not supported-// on the current hardware, or because the DLL could not be found-// - NVSDK_NGX_Result_FAIL_InvalidParameter if any of the input-// parameters are invalid-// - NVSDK_NGX_Result_FAIL_FeatureAlreadyExists if a feature instance-// with the same parameters has already been created, and the feature-// doesn't allow multiple instances to be created with the same-// parameters.-// Check the NGX logs for additional information about any failures.-//-#if defined(NGX_SNIPPET_BUILD)-NVSDK_NGX_API NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_VULKAN_CreateFeature(VkCommandBuffer InCmdList, NVSDK_NGX_Feature InFeatureID, const NVSDK_NGX_Parameter *InParameters, NVSDK_NGX_Handle **OutHandle);-NVSDK_NGX_API NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_VULKAN_CreateFeature1(VkDevice InDevice, VkCommandBuffer InCmdList, NVSDK_NGX_Feature InFeatureID, const NVSDK_NGX_Parameter *InParameters, NVSDK_NGX_Handle **OutHandle);-#else-NVSDK_NGX_API NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_VULKAN_CreateFeature(VkCommandBuffer InCmdBuffer, NVSDK_NGX_Feature InFeatureID, NVSDK_NGX_Parameter *InParameters, NVSDK_NGX_Handle **OutHandle);-NVSDK_NGX_API NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_VULKAN_CreateFeature1(VkDevice InDevice, VkCommandBuffer InCmdList, NVSDK_NGX_Feature InFeatureID, NVSDK_NGX_Parameter *InParameters, NVSDK_NGX_Handle **OutHandle);-#endif // defined(NGX_SNIPPET_BUILD)--////////////////////////////////////////////////////////////////////////////////-// NVSDK_NGX_ReleaseFeature-// ------------------------------------------------------------------------------// Releases the specified NGX feature.-//-// DESCRIPTION:-// Releases the feature associated with the given handle and frees its-// memory. Handles are not reference counted, so after this call, it is-// invalid to use the provided handle.-//-// PARAMETERS:-// InHandle:-// Handle to the feature to be released.-//-// RETURNS:-// NVSDK_NGX_Result indicating success or failure.-//-NVSDK_NGX_API NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_VULKAN_ReleaseFeature(NVSDK_NGX_Handle *InHandle);--////////////////////////////////////////////////////////////////////////////////-// NVSDK_NGX_GetFeatureRequirements-// ------------------------------------------------------------------------------// Identifies system requirements to support a given NGX feature.-//-// DESCRIPTION:-// Utility function used to identify system requirements to support a given-// NGX feature on a system, given its display device subsystem adapter-// information that will be subsequently used for creating the graphics-// device. The output parameter OutSupported will be populated with-// requirements and is valid if and only if the function returns-// NVSDK_NGX_Result_Success. The result includes:-// - FeatureSupported: Bitfield of reasons why the feature is-// unsupported, as specified in NVSDK_NGX_Feature_Support_Result. 0 if-// the feature is supported-// - MinHWArchitecture: The hardware architecture version corresponding-// to an NV_GPU_ARCHITECTURE_ID value defined in the NvAPI GPU-// Framework-// - MinOSVersion: The minimum OS version required for the provided-// feature-//-// NVSDK_NGX_Init does NOT need to be called before calling this function.-// Applications may wish to use this function to determine whether a-// desired feature is supported before initializing the complete SDK.-//-// PARAMETERS:-// Instance:-// VkInstance in use by the application.-//-// InPhysicalDevice:-// VkPhysicalDevice in use by the application.-//-// FeatureDiscoveryInfo:-// Struct containing information about the feature to query and how it is-// expected to be initialized, including the feature ID and information-// that would be provided to NVSDK_NGX_Init.-//-// OutSupported:-// Populated with the requirements for the specified feature.-//-// RETURNS:-// NVSDK_NGX_Result indicating success or failure.-//-NVSDK_NGX_API NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_VULKAN_GetFeatureRequirements(const VkInstance Instance,- const VkPhysicalDevice PhysicalDevice,- const NVSDK_NGX_FeatureDiscoveryInfo *FeatureDiscoveryInfo,- NVSDK_NGX_FeatureRequirement *OutSupported);---////////////////////////////////////////////////////////////////////////////////-// NVSDK_NGX_VULKAN_GetFeatureInstanceExtensionRequirements-// ------------------------------------------------------------------------------// Identifies Vulkan instance extensions required for NGX feature support.-//-// DESCRIPTION:-// This utility function identifies the Vulkan instance extensions required-// for a specific NGX feature, specified by its feature ID. The function-// populates OutExtensionCount with the number of extensions required for-// the NGX feature. It also populates OutExtensionProperties with a pointer-// to an array of VkExtensionProperties structures, which contains details-// about each required extension. The size of this array is equal to-// OutExtensionCount.-//-// NVSDK_NGX_Init does NOT need to be called before calling this function.-// This function should be called before the VkInstance for the application-// is created so that the correct extensions can be enabled.-//-// PARAMETERS:-// FeatureDiscoveryInfo:-// Struct containing information about the feature to query and how it is-// expected to be initialized, including the feature ID and information-// that would be provided to NVSDK_NGX_Init.-//-// OutExtensionCount:-// Output pointer that will be populated with the number of required-// instance extensions.-//-// OutExtensionProperties:-// Output pointer that will be populated with an array of-// VkExtensionProperties structures required by the given feature.-//-// RETURNS:-// NVSDK_NGX_Result indicating success or failure.-//-NVSDK_NGX_API NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_VULKAN_GetFeatureInstanceExtensionRequirements(const NVSDK_NGX_FeatureDiscoveryInfo *FeatureDiscoveryInfo,- uint32_t *OutExtensionCount,- VkExtensionProperties **OutExtensionProperties);--////////////////////////////////////////////////////////////////////////////////-// NVSDK_NGX_VULKAN_GetFeatureDeviceExtensionRequirements-// ------------------------------------------------------------------------------// Identifies Vulkan device extensions required for NGX feature support.-//-// DESCRIPTION:-// This utility function identifies the Vulkan device extensions required-// for a specific NGX feature, specified by its feature ID, and a given-// VkInstance and VkPhysicalDevice. The function populates-// OutExtensionCount with the number of extensions required for the NGX-// feature. It also populates OutExtensionProperties with a pointer to an-// array of VkExtensionProperties structures, which contains details about-// each required extension. The size of this array is equal to-// OutExtensionCount.-//-// NVSDK_NGX_Init does NOT need to be called before calling this function.-// This function should be called before the VkDevice for the application-// is created so that the correct extensions can be enabled.-//-// PARAMETERS:-// Instance:-// VkInstance in use by the application.-//-// InPhysicalDevice:-// VkPhysicalDevice in use by the application.-//-// FeatureDiscoveryInfo:-// Struct containing information about the feature to query and how it is-// expected to be initialized, including the feature ID and information-// that would be provided to NVSDK_NGX_Init.-//-// OutExtensionCount:-// Output pointer that will be populated with the number of required-// device extensions.-//-// OutExtensionProperties:-// Output pointer that will be populated with an array of-// VkExtensionProperties structures required by the given feature.-//-// RETURNS:-// NVSDK_NGX_Result indicating success or failure.-//-#if defined(NGX_SNIPPET_BUILD)-NVSDK_NGX_API NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_VULKAN_GetFeatureDeviceExtensionRequirements(const VkInstance Instance,- const VkPhysicalDevice PhysicalDevice,- const NVSDK_NGX_FeatureDiscoveryInfo *FeatureDiscoveryInfo,- uint32_t *OutExtensionCount,- VkExtensionProperties **OutExtensionProperties);-#else-NVSDK_NGX_API NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_VULKAN_GetFeatureDeviceExtensionRequirements(VkInstance Instance,- VkPhysicalDevice PhysicalDevice,- const NVSDK_NGX_FeatureDiscoveryInfo *FeatureDiscoveryInfo,- uint32_t *OutExtensionCount,- VkExtensionProperties **OutExtensionProperties);-#endif // defined(NGX_SNIPPET_BUILD)--////////////////////////////////////////////////////////////////////////////////-// NVSDK_NGX_EvaluateFeature-// ------------------------------------------------------------------------------// Evaluates the specified NGX feature using the provided parameters.-//-// DESCRIPTION:-// Evaluates the given feature using the provided parameters. The-// parameters required to evaluate a feature vary. Refer to the feature's-// documentation and sample code to determine which input parameters are-// needed.-//-// To evaluate a feature, an NVSDK_NGX_Handle to an instance of that-// feature, created with NVSDK_NGX_CreateFeature, must be provided.-//-// For most features, it is beneficial to pass as many input buffers and-// parameters as possible (e.g., provide all render targets like color,-// albedo, normals, depth, etc.). This will ensure maximum future-// compatibility with new updates.-//-// PARAMETERS:-// InCmdBuffer:-// Command buffer to use to execute GPU commands. Must be open and-// recording.-//-// InFeatureHandle:-// Handle representing the feature to be evaluated.-//-// InParameters:-// List of parameters required to evaluate the feature.-//-// InCallback:-// Optional callback for features that might take longer to execute. If-// specified, the SDK will call it with progress values in the range 0.0f --// 1.0f. Not all features support progress callbacks. Refer to the-// documentation for the specific feature to determine whether or not-// progress callbacks are supported.-//-// RETURNS:-// NVSDK_NGX_Result indicating success or failure. Common values include:-// - NVSDK_NGX_Result_Success if the function executed successfully.-// - NVSDK_NGX_Result_FAIL_InvalidParameter if any of the input-// parameters are missing or invalid.-// - NVSDK_NGX_Result_FAIL_FeatureNotFound if a feature with the provided-// handle could not be found.-// Check the NGX logs for additional information about any failures.-//-#ifdef __cplusplus-NVSDK_NGX_API NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_VULKAN_EvaluateFeature(VkCommandBuffer InCmdList, const NVSDK_NGX_Handle *InFeatureHandle, const NVSDK_NGX_Parameter *InParameters, PFN_NVSDK_NGX_ProgressCallback InCallback = NULL);-#endif-NVSDK_NGX_API NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_VULKAN_EvaluateFeature_C(VkCommandBuffer InCmdList, const NVSDK_NGX_Handle *InFeatureHandle, const NVSDK_NGX_Parameter *InParameters, PFN_NVSDK_NGX_ProgressCallback_C InCallback);--#if defined(NGX_SNIPPET_BUILD)-// No NGX Core <---> Snippet interfaces-#else-// NGX return-code conversion-to-string utility only as a helper for debugging/logging - not for official use.-const wchar_t* NVSDK_CONV GetNGXResultAsString(NVSDK_NGX_Result InNGXResult);-#endif--#ifdef __cplusplus-} // extern "C"-#endif--#endif // #define NVSDK_NGX_VK_Hdiff --git a/native/NVIDIA-DLSS/lib/Windows_x86_64/x64/nvsdk_ngx_d.lib b/native/NVIDIA-DLSS/lib/Windows_x86_64/x64/nvsdk_ngx_d.libdeleted file mode 100644index 6887933..0000000Binary files a/native/NVIDIA-DLSS/lib/Windows_x86_64/x64/nvsdk_ngx_d.lib and /dev/null differdiff --git a/native/build_native.bat b/native/build_native.batdeleted file mode 100644index 2df2fc6..0000000--- a/native/build_native.bat+++ /dev/null@@ -1,12 +0,0 @@-@echo off-setlocal-cd /d "%~dp0\.."-call "C:\Program Files\Microsoft Visual Studio\18\Community\VC\Auxiliary\Build\vcvars64.bat" >nul-if errorlevel 1 exit /b 1-if not exist "native\build" mkdir "native\build"-cl /nologo /O2 /EHsc /W3 /MD /Fo:"native\build\\" /I"native\NVIDIA-DLSS\include" ^- "native\DLSS5-Feeder\host\dlss5-feed-host64.cpp" ^- /Fe:"bin\runtime\nvngx.dll" ^- /link "native\NVIDIA-DLSS\lib\Windows_x86_64\x64\nvsdk_ngx_d.lib" ^- version.lib kernel32.lib user32.lib gdi32.lib advapi32.lib ole32.lib-exit /b %errorlevel%diff --git a/others/THIRD_PARTY.md b/others/THIRD_PARTY.mddeleted file mode 100644index f3b0022..0000000--- a/others/THIRD_PARTY.md+++ /dev/null@@ -1,12 +0,0 @@-# Third-party components--The application is distributed as an experimental local build. Refer to each upstream project for its full license and redistribution terms.--| Component | Version/source | SHA-256 of staged runtime |-| --- | --- | --- |-| User-provided modified DLSSNR model | 310.8.0 approximate FP16 | `DCC0DC2414AEDEC4A8E084647070383BE068554042587180C20C784D4772D36F` |-| Standalone direct feature-18 worker (`nvngx.dll`) | Adapted from MIT DLSS5-Feeder host | `99EF1F2976D9CD16B7FC269ADB6C6450FB64C81A522C9B9E6EDC6A28201DC904` |--DLSS5-Feeder's MIT license is in `native/DLSS5-Feeder/LICENSE`. NVIDIA's SDK license is in `native/NVIDIA-DLSS/LICENSE.txt`. FFmpeg licensing information is in `bin/ffmpeg/LICENSE`.--The model hash is informational only. Its modified signature is intentionally not used as a runtime rejection condition. ReShade, RenoDX, DLSS Super Resolution carrier binaries, test media, and generated outputs are not included.diff --git a/requirements-lock.txt b/requirements-lock.txtdeleted file mode 100644index 257b212..0000000--- a/requirements-lock.txt+++ /dev/null@@ -1,54 +0,0 @@-annotated-doc==0.0.5-annotated-types==0.8.0-anyio==4.14.2-audioop-lts==0.2.2-av==18.1.0-brotli==1.2.0-certifi==2026.7.22-click==8.5.0-colorama==0.4.6-fastapi==0.141.1-filelock==3.32.4-fsspec==2026.7.0-gradio==6.26.0-gradio_client==2.6.1-groovy==0.1.2-h11==0.16.0-hf-gradio==0.4.1-hf-xet==1.6.0-httpcore==1.0.9-httpx==0.28.1-huggingface_hub==1.29.0-idna==3.19-Jinja2==3.1.6-markdown-it-py==4.2.0-MarkupSafe==3.0.3-mdurl==0.1.2-numpy==2.5.2-opencv-python-headless==5.0.0.93-orjson==3.12.0-packaging==26.3-pandas==3.0.5-pillow==12.3.0-psutil==7.2.2-pydantic==2.13.5-pydantic_core==2.46.5-pydub==0.25.1-Pygments==2.21.0-python-dateutil==2.9.0.post0-python-multipart==0.0.32-pytz==2026.3.post1-PyYAML==6.0.3-rich==15.0.0-safehttpx==0.1.7-semantic-version==2.10.0-shellingham==1.5.4-six==1.17.0-starlette==1.6.0-tomlkit==0.14.0-tqdm==4.70.0-typer==0.27.2-typing-inspection==0.4.4-typing_extensions==4.16.0-tzdata==2026.3-uvicorn==0.52.4diff --git a/src/__init__.py b/src/__init__.pynew file mode 100644index 0000000..5558673--- /dev/null+++ b/src/__init__.py@@ -0,0 +1,27 @@+"""Portable DLSS 5 Visual Enhancer for images and video."""++from .ffmpeg import probe_video+from .images import (+ ImageBatchResult,+ ImageConversionOptions,+ ImageConversionResult,+ ImageConversionFailure,+ convert_image,+ convert_images,+ probe_image,+)+from .video import ConversionOptions, ConversionResult, convert_video++__all__ = [+ "ConversionOptions",+ "ConversionResult",+ "ImageBatchResult",+ "ImageConversionOptions",+ "ImageConversionResult",+ "ImageConversionFailure",+ "convert_image",+ "convert_images",+ "convert_video",+ "probe_image",+ "probe_video",+]diff --git a/src/ffmpeg.py b/src/ffmpeg.pynew file mode 100644index 0000000..9481ce4--- /dev/null+++ b/src/ffmpeg.py@@ -0,0 +1,369 @@+from __future__ import annotations++import json+import math+import os+import subprocess+import threading+from fractions import Fraction+from pathlib import Path++import av++from .runtime import FFMPEG, FFPROBE, JobController, drain_text+++ENCODING_QUALITIES = ("Auto (Default)", "Max", "Best", "Good")+AUTO_BITRATE_DIVISORS = {+ "H.264": 165_888,+ "HEVC": 331_776,+ "AV1": 414_720,+}+++def validate_codec_container(codec: str, container: str) -> None:+ if codec == "ProRes Proxy" and container == "MP4":+ raise ValueError("ProRes Proxy is not supported in MP4. Choose the MOV or MKV container.")+++def calculate_auto_bitrate_kbps(+ width: int,+ height: int,+ fps: float,+ codec: str,+ bit_depth: int = 8,+) -> int:+ try:+ divisor = AUTO_BITRATE_DIVISORS[codec]+ except KeyError as exc:+ raise ValueError(f"Automatic bitrate is unavailable for codec {codec!r}.") from exc+ if width <= 0 or height <= 0 or not math.isfinite(fps) or fps <= 0 or bit_depth <= 0:+ raise ValueError("Automatic bitrate requires positive dimensions, frame rate, and bit depth.")+ value = width * height * fps * bit_depth * 2 / divisor+ return max(1, int(math.floor(value + 0.5)))+++def resolve_encoding_quality(+ quality_name: str,+ codec: str,+ width: int,+ height: int,+ fps: float,+) -> dict:+ if quality_name not in ENCODING_QUALITIES:+ raise ValueError(f"Unknown encoding quality: {quality_name!r}.")+ if codec == "ProRes Proxy":+ return {+ "selection": quality_name,+ "mode": "fixed-prores-proxy-profile",+ "target_bitrate_kbps": None,+ "cq": None,+ }+ if quality_name == "Max":+ return {+ "selection": quality_name,+ "mode": "constant-quality",+ "target_bitrate_kbps": None,+ "cq": 0,+ }+ multiplier = {"Auto (Default)": 1, "Good": 2, "Best": 4}[quality_name]+ auto = calculate_auto_bitrate_kbps(width, height, fps, codec)+ return {+ "selection": quality_name,+ "mode": "target-bitrate",+ "auto_bitrate_kbps": auto,+ "multiplier": multiplier,+ "target_bitrate_kbps": auto * multiplier,+ "cq": None,+ }+++def _run_json(command: list[str]) -> dict:+ result = subprocess.run(+ command,+ capture_output=True,+ text=True,+ encoding="utf-8",+ errors="replace",+ )+ if result.returncode:+ raise RuntimeError(result.stderr.strip() or "Media probe failed")+ return json.loads(result.stdout)+++def probe_video(path: str | os.PathLike[str]) -> dict:+ data = _run_json(+ [+ str(FFPROBE),+ "-v",+ "error",+ "-count_frames",+ "-select_streams",+ "v:0",+ "-show_entries",+ "stream=index,codec_name,width,height,avg_frame_rate,r_frame_rate,time_base,duration,nb_frames,nb_read_frames,color_primaries,color_transfer,color_space:stream_tags=rotate:stream_side_data=rotation",+ "-show_entries",+ "format=duration,format_name",+ "-of",+ "json",+ str(path),+ ]+ )+ streams = data.get("streams") or []+ if not streams:+ raise ValueError("The selected file contains no decodable video stream.")+ stream = streams[0]+ rotation = int((stream.get("tags") or {}).get("rotate", 0) or 0)+ for side in stream.get("side_data_list") or []:+ if "rotation" in side:+ rotation = int(side["rotation"] or 0)+ rotation %= 360+ width, height = int(stream["width"]), int(stream["height"])+ if rotation in (90, 270):+ width, height = height, width+ frames = int(stream.get("nb_read_frames") or stream.get("nb_frames") or 0)+ if frames <= 0:+ raise ValueError("Could not determine an exact frame count for this video.")+ rate_text = stream.get("avg_frame_rate") or stream.get("r_frame_rate") or "30/1"+ rate = Fraction(rate_text) if rate_text != "0/0" else Fraction(30, 1)+ transfer = stream.get("color_transfer") or "unknown"+ return {+ "width": width,+ "height": height,+ "coded_width": int(stream["width"]),+ "coded_height": int(stream["height"]),+ "rotation": rotation,+ "frames": frames,+ "fps": float(rate),+ "rate": rate,+ "time_base": Fraction(stream.get("time_base") or "1/1000"),+ "duration": float(+ (data.get("format") or {}).get("duration") or stream.get("duration") or 0+ ),+ "codec": stream.get("codec_name") or "unknown",+ "format": (data.get("format") or {}).get("format_name") or "unknown",+ "color_transfer": transfer,+ "hdr": transfer in {"smpte2084", "arib-std-b67"},+ }+++def _encoder_probe(codec: str, width: int, height: int) -> bool:+ command = [+ str(FFMPEG),+ "-v",+ "error",+ "-f",+ "lavfi",+ "-i",+ f"color=size={width}x{height}:rate=1",+ "-frames:v",+ "1",+ "-c:v",+ codec,+ "-f",+ "null",+ "-",+ ]+ return (+ subprocess.run(+ command,+ stdout=subprocess.DEVNULL,+ stderr=subprocess.DEVNULL,+ ).returncode+ == 0+ )+++def _codec_command(+ codec: str,+ quality_name: str,+ width: int,+ height: int,+ fps: float,+) -> tuple[list[str], str, dict]:+ quality = resolve_encoding_quality(quality_name, codec, width, height, fps)+ if codec == "ProRes Proxy":+ return (+ ["-c:v", "prores_ks", "-profile:v", "0", "-pix_fmt", "yuv422p10le"],+ "prores_ks (Proxy)",+ quality,+ )+ if quality["mode"] == "constant-quality":+ nvenc_quality = ["-rc", "vbr", "-cq", "0", "-b:v", "0"]+ software_quality = ["-crf", "0"]+ else:+ bitrate = f"{quality['target_bitrate_kbps']}k"+ nvenc_quality = ["-rc", "vbr", "-b:v", bitrate]+ software_quality = ["-b:v", bitrate]+ if codec == "H.264":+ if _encoder_probe("h264_nvenc", width, height):+ return (+ [+ "-c:v",+ "h264_nvenc",+ "-preset",+ "p6",+ "-tune",+ "hq",+ *nvenc_quality,+ "-pix_fmt",+ "yuv420p",+ ],+ "h264_nvenc",+ quality,+ )+ return (+ ["-c:v", "libx264", "-preset", "slow", *software_quality, "-pix_fmt", "yuv420p"],+ "libx264",+ quality,+ )+ if codec == "HEVC":+ if _encoder_probe("hevc_nvenc", width, height):+ return (+ [+ "-c:v",+ "hevc_nvenc",+ "-preset",+ "p6",+ "-tune",+ "hq",+ *nvenc_quality,+ "-pix_fmt",+ "yuv420p",+ ],+ "hevc_nvenc",+ quality,+ )+ return (+ ["-c:v", "libx265", "-preset", "slow", *software_quality, "-pix_fmt", "yuv420p"],+ "libx265",+ quality,+ )+ if codec != "AV1":+ raise ValueError(f"Unknown video codec: {codec!r}.")+ if not _encoder_probe("av1_nvenc", width, height):+ raise RuntimeError(+ f"AV1 NVENC cannot encode the requested {width}×{height} output on this GPU/driver. "+ "Choose H.264/HEVC or a lower upscaling factor."+ )+ return (+ ["-c:v", "av1_nvenc", "-preset", "p6", *nvenc_quality, "-pix_fmt", "yuv420p"],+ "av1_nvenc",+ quality,+ )+++def start_encoder(+ temp_video: Path,+ codec: str,+ quality_name: str,+ controller: JobController,+ width: int,+ height: int,+ fps: float,+):+ codec_args, selected, quality = _codec_command(+ codec, quality_name, width, height, fps+ )+ command = [+ str(FFMPEG),+ "-hide_banner",+ "-loglevel",+ "warning",+ "-y",+ "-f",+ "nut",+ "-i",+ "pipe:0",+ "-map",+ "0:v:0",+ "-an",+ *codec_args,+ "-fps_mode",+ "passthrough",+ str(temp_video),+ ]+ process = subprocess.Popen(+ command,+ stdin=subprocess.PIPE,+ stdout=subprocess.DEVNULL,+ stderr=subprocess.PIPE,+ )+ controller.register(process)+ logs: list[str] = []+ assert process.stderr is not None+ thread = threading.Thread(target=drain_text, args=(process.stderr, logs), daemon=True)+ thread.start()+ return process, thread, logs, selected, quality+++def final_mux(temp_video: Path, source: Path, output: Path, container: str) -> None:+ if container == "MKV":+ maps = ["-map", "0:v:0", "-map", "1:a?", "-map", "1:s?"]+ streams = ["-c:v", "copy", "-c:a", "copy", "-c:s", "copy"]+ else:+ maps = ["-map", "0:v:0", "-map", "1:a?"]+ streams = [+ "-c:v",+ "copy",+ "-c:a",+ "aac",+ "-b:a",+ "192k",+ "-movflags",+ "+faststart",+ ]+ command = [+ str(FFMPEG),+ "-hide_banner",+ "-loglevel",+ "warning",+ "-y",+ "-i",+ str(temp_video),+ "-i",+ str(source),+ *maps,+ "-map_metadata",+ "1",+ "-map_chapters",+ "1",+ *streams,+ "-shortest",+ str(output),+ ]+ result = subprocess.run(+ command,+ capture_output=True,+ text=True,+ encoding="utf-8",+ errors="replace",+ )+ if result.returncode:+ raise RuntimeError("Final audio/metadata mux failed:\n" + result.stderr[-4000:])+++def preview_frame_count(source: Path, seconds: float) -> int:+ """Count frames whose presentation times fall within the opening interval."""+ container = av.open(str(source))+ try:+ stream = container.streams.video[0]+ rate = float(stream.average_rate or 30)+ first_time: float | None = None+ count = 0+ for frame in container.decode(stream):+ timestamp = (+ float(frame.pts * stream.time_base)+ if frame.pts is not None and stream.time_base is not None+ else count / rate+ )+ if first_time is None:+ first_time = timestamp+ if count and timestamp - first_time >= seconds:+ break+ count += 1+ if count == 0:+ raise RuntimeError("The input video contains no decodable preview frames.")+ return count+ finally:+ container.close()diff --git a/src/images.py b/src/images.pynew file mode 100644index 0000000..b0f6c61--- /dev/null+++ b/src/images.py@@ -0,0 +1,595 @@+from __future__ import annotations++import hashlib+import io+import json+import os+import time+import zipfile+from dataclasses import asdict, dataclass, field+from pathlib import Path+from typing import Callable, Iterable++import cv2+import numpy as np+import pillow_heif+import rawpy+import resvg_py+from PIL import Image, ImageCms, ImageOps++from .runtime import (+ LOGS,+ OUTPUTS,+ RUNTIME,+ WORKER,+ Cancelled,+ DLSSFrameSession,+ active_job,+ detect_gpu,+ resize_fit,+ validate_runtime_files,+ verify_feature_18,+)+from .video import (+ ConversionOptions,+ resolve_native_settings,+ resolve_output_size,+ resolve_upscaling_mode,+)+++pillow_heif.register_heif_opener()+Image.MAX_IMAGE_PIXELS = 100_000_000++IMAGE_FORMATS = ("PNG", "JPEG", "WebP", "AVIF", "TIFF")+IMAGE_EXTENSIONS = {"PNG": ".png", "JPEG": ".jpg", "WebP": ".webp", "AVIF": ".avif", "TIFF": ".tiff"}+RAW_EXTENSIONS = {+ ".3fr", ".arw", ".bay", ".cap", ".cr2", ".cr3", ".dcr", ".dcs", ".dng",+ ".drf", ".eip", ".erf", ".fff", ".gpr", ".iiq", ".k25", ".kdc", ".mdc",+ ".mef", ".mos", ".mrw", ".nef", ".nrw", ".obm", ".orf", ".pef", ".ptx",+ ".pxn", ".r3d", ".raf", ".raw", ".rw2", ".rwl", ".rwz", ".sr2", ".srf",+ ".srw", ".x3f",+}+++@dataclass(slots=True)+class ImageConversionOptions:+ nr_style: str = "Default"+ nr_intensity: float = 1.0+ local_tone_strength: float = 1.0+ local_structure_strength: float = 1.0+ skin_structure_strength: float = -1.0+ upscaling_factor: float = 1.0+ output_format: str = "PNG"+ quality: int = 95+ preserve_metadata: bool = True+ warmup_frames: int = 120+ nr_preset: str = "Default"++ def neural_options(self) -> ConversionOptions:+ return ConversionOptions(+ nr_preset=self.nr_preset,+ nr_style=self.nr_style,+ nr_intensity=self.nr_intensity,+ local_tone_strength=self.local_tone_strength,+ local_structure_strength=self.local_structure_strength,+ skin_structure_strength=self.skin_structure_strength,+ upscaling_factor=self.upscaling_factor,+ warmup_frames=self.warmup_frames,+ )+++@dataclass(slots=True)+class ImageConversionResult:+ input_path: str+ output_path: str+ report_path: str+ elapsed_seconds: float+ gpu: str+ input_width: int+ input_height: int+ render_width: int+ render_height: int+ output_width: int+ output_height: int+ upscaling_factor: float+ dlss_mode: str+ output_format: str+ warnings: list[str] = field(default_factory=list)+++@dataclass(slots=True)+class ImageConversionFailure:+ input_path: str+ error: str+++@dataclass(slots=True)+class ImageBatchResult:+ successes: list[ImageConversionResult]+ failures: list[ImageConversionFailure]+ cancelled: bool+ manifest_path: str+ zip_path: str | None+++@dataclass(slots=True)+class _ImageProbe:+ index: int+ path: Path+ width: int+ height: int+ output_width: int+ output_height: int+++@dataclass(slots=True)+class _DecodedImage:+ rgba: np.ndarray+ alpha: np.ndarray+ decoder: str+ metadata: dict[str, object]+ warnings: list[str]+++def _validate_options(options: ImageConversionOptions) -> ConversionOptions:+ if options.output_format not in IMAGE_FORMATS:+ raise ValueError(f"Unknown image output format: {options.output_format!r}.")+ if isinstance(options.quality, bool):+ raise ValueError("Image quality must be an integer from 1 to 100.")+ try:+ quality = int(options.quality)+ except (TypeError, ValueError) as exc:+ raise ValueError("Image quality must be an integer from 1 to 100.") from exc+ if quality != options.quality or not 1 <= quality <= 100:+ raise ValueError("Image quality must be an integer from 1 to 100.")+ neural = options.neural_options()+ resolve_native_settings(neural)+ resolve_upscaling_mode(neural.upscaling_factor)+ return neural+++def _orientation_swaps_dimensions(image: Image.Image) -> bool:+ try:+ return int(image.getexif().get(274, 1)) in {5, 6, 7, 8}+ except (TypeError, ValueError):+ return False+++def _open_pillow_source(path: Path) -> tuple[Image.Image, str]:+ suffix = path.suffix.lower()+ if suffix in RAW_EXTENSIONS:+ with rawpy.imread(str(path)) as raw:+ array = raw.postprocess(+ use_camera_wb=True,+ output_color=rawpy.ColorSpace.sRGB,+ output_bps=8,+ )+ return Image.fromarray(array, mode="RGB"), "LibRaw"+ if suffix == ".svg":+ png = resvg_py.svg_to_bytes(svg_path=str(path), resources_dir=str(path.parent))+ return Image.open(io.BytesIO(png)), "resvg"+ return Image.open(path), "Pillow"+++def probe_image(path: str | os.PathLike[str]) -> tuple[int, int]:+ source = Path(path).resolve()+ if not source.is_file():+ raise FileNotFoundError(source)+ image, _decoder = _open_pillow_source(source)+ try:+ width, height = image.size+ if _orientation_swaps_dimensions(image):+ width, height = height, width+ finally:+ image.close()+ if width < 64 or height < 64:+ raise ValueError(+ f"{source.name} is {width}×{height}; DLSS requires both input dimensions to be at least 64 pixels."+ )+ return width, height+++def _srgb_profile_bytes() -> bytes:+ return ImageCms.ImageCmsProfile(ImageCms.createProfile("sRGB")).tobytes()+++def decode_image(path: str | os.PathLike[str]) -> _DecodedImage:+ source = Path(path).resolve()+ image, decoder = _open_pillow_source(source)+ opened_image = image+ warnings: list[str] = []+ try:+ frame_count = int(getattr(image, "n_frames", 1) or 1)+ if frame_count > 1:+ warnings.append(f"Used the first frame/page of {frame_count}.")+ image.seek(0)+ original_mode = image.mode+ info = dict(image.info)+ image = ImageOps.exif_transpose(image)+ image.load()+ if original_mode not in {"1", "L", "LA", "P", "RGB", "RGBA", "CMYK"}:+ warnings.append(f"Converted {original_mode} source data to 8-bit SDR sRGB.")++ rgba_image = image.convert("RGBA")+ alpha_image = rgba_image.getchannel("A")+ rgb_image = rgba_image.convert("RGB")+ icc_profile = info.get("icc_profile")+ if isinstance(icc_profile, bytes) and icc_profile:+ try:+ source_profile = ImageCms.ImageCmsProfile(io.BytesIO(icc_profile))+ rgb_image = ImageCms.profileToProfile(+ rgb_image,+ source_profile,+ ImageCms.createProfile("sRGB"),+ outputMode="RGB",+ )+ except (ImageCms.PyCMSError, OSError, ValueError) as exc:+ warnings.append(f"Embedded color profile could not be applied ({exc}); assumed sRGB.")++ rgb = np.asarray(rgb_image, dtype=np.uint8)+ alpha = np.asarray(alpha_image, dtype=np.uint8)+ rgba = np.dstack((rgb, alpha))+ exif = image.getexif()+ if exif:+ exif[274] = 1+ metadata: dict[str, object] = {+ "icc_profile": _srgb_profile_bytes(),+ "exif": exif.tobytes() if exif else None,+ "dpi": info.get("dpi"),+ "xmp": info.get("xmp"),+ "source_mode": original_mode,+ "source_format": image.format or source.suffix.lstrip(".").upper(),+ "frame_count": frame_count,+ }+ return _DecodedImage(+ np.ascontiguousarray(rgba),+ np.ascontiguousarray(alpha),+ decoder,+ metadata,+ warnings,+ )+ finally:+ image.close()+ if opened_image is not image:+ opened_image.close()+++def _metadata_save_args(metadata: dict[str, object], output_format: str) -> dict[str, object]:+ args: dict[str, object] = {}+ if metadata.get("icc_profile"):+ args["icc_profile"] = metadata["icc_profile"]+ if metadata.get("dpi"):+ args["dpi"] = metadata["dpi"]+ if metadata.get("exif") and output_format in {"JPEG", "WebP", "AVIF", "TIFF", "PNG"}:+ args["exif"] = metadata["exif"]+ if metadata.get("xmp") and output_format in {"WebP", "AVIF"}:+ args["xmp"] = metadata["xmp"]+ return args+++def save_image(+ output: Path,+ rgba: np.ndarray,+ options: ImageConversionOptions,+ metadata: dict[str, object],+) -> list[str]:+ output_format = options.output_format+ image = Image.fromarray(rgba, mode="RGBA")+ warnings: list[str] = []+ args = _metadata_save_args(metadata, output_format) if options.preserve_metadata else {}+ if output_format == "PNG":+ args.update(optimize=True, compress_level=9)+ elif output_format == "TIFF":+ args.update(compression="tiff_deflate")+ elif output_format == "JPEG":+ background = Image.new("RGBA", image.size, (255, 255, 255, 255))+ background.alpha_composite(image)+ image = background.convert("RGB")+ args.update(quality=int(options.quality), subsampling=0, optimize=True, progressive=True)+ if np.any(rgba[..., 3] != 255):+ warnings.append("Transparency was composited over white for JPEG output.")+ elif output_format == "WebP":+ args.update(quality=int(options.quality), method=6)+ elif output_format == "AVIF":+ args.update(quality=int(options.quality), speed=4)++ temporary = output.with_name(f".{output.stem}.{time.time_ns()}{output.suffix}")+ try:+ image.save(temporary, format=output_format, **args)+ os.replace(temporary, output)+ finally:+ image.close()+ if temporary.exists():+ temporary.unlink()+ return warnings+++def _output_path(source: Path, output_format: str, stamp: str, index: int) -> Path:+ suffix = IMAGE_EXTENSIONS[output_format]+ safe_stem = source.stem.strip().rstrip(".") or "image"+ return OUTPUTS / f"{safe_stem}_DLSS5_IMAGE_{stamp}-{index + 1:04d}{suffix}"+++def _write_report(+ result: ImageConversionResult,+ options: ImageConversionOptions,+ decoded: _DecodedImage,+ gpu: dict,+ session: DLSSFrameSession,+ evidence: dict[str, object],+) -> str:+ report = {+ "status": "success",+ "input": result.input_path,+ "output": result.output_path,+ "options": asdict(options),+ "gpu": gpu,+ "decoder": decoded.decoder,+ "source_metadata": {+ key: value+ for key, value in decoded.metadata.items()+ if key not in {"icc_profile", "exif", "xmp"}+ },+ "warnings": result.warnings,+ "input_dimensions": {"width": result.input_width, "height": result.input_height},+ "negotiated_render_dimensions": {"width": result.render_width, "height": result.render_height},+ "negotiated_render_range": {+ "minimum": {"width": session.minimum_width, "height": session.minimum_height},+ "maximum": {"width": session.maximum_width, "height": session.maximum_height},+ },+ "output_dimensions": {"width": result.output_width, "height": result.output_height},+ "dlss_mode": result.dlss_mode,+ "requested_upscaling_factor": result.upscaling_factor,+ "pipeline": "renodx-dlssnr-feature18-image",+ "feature_id": 18,+ "feature_18_confirmed": True,+ "ngx_setup_result": f"0x{session.setup_result:08X}",+ "carrier_create_result": evidence["carrier_create_result"],+ "native_settings": session.native_settings,+ "model_sha256": hashlib.sha256((RUNTIME / "nvngx_dlssnr.dll").read_bytes()).hexdigest(),+ "worker_sha256": hashlib.sha256(WORKER.read_bytes()).hexdigest(),+ "worker_log": session.worker_logs,+ "dlssnr_evidence": evidence["evidence"],+ "elapsed_seconds": result.elapsed_seconds,+ }+ report_path = LOGS / f"{Path(result.output_path).name}.report.json"+ report_path.write_text(json.dumps(report, indent=2), encoding="utf-8")+ return str(report_path)+++def _build_manifest_and_zip(+ stamp: str,+ options: ImageConversionOptions,+ successes: list[ImageConversionResult],+ failures: list[ImageConversionFailure],+ cancelled: bool,+) -> tuple[str, str | None]:+ manifest = {+ "status": "cancelled" if cancelled else ("partial" if failures else "success"),+ "options": asdict(options),+ "successes": [asdict(item) for item in successes],+ "failures": [asdict(item) for item in failures],+ }+ manifest_path = LOGS / f"DLSS5_IMAGE_BATCH_{stamp}.manifest.json"+ manifest_path.write_text(json.dumps(manifest, indent=2), encoding="utf-8")+ if not successes:+ return str(manifest_path), None+ zip_path = OUTPUTS / f"DLSS5_IMAGE_BATCH_{stamp}.zip"+ temporary = zip_path.with_name(f".{zip_path.stem}.{time.time_ns()}.zip")+ try:+ with zipfile.ZipFile(temporary, "w", compression=zipfile.ZIP_DEFLATED, compresslevel=6) as archive:+ for item in successes:+ archive.write(item.output_path, arcname=Path(item.output_path).name)+ os.replace(temporary, zip_path)+ finally:+ if temporary.exists():+ temporary.unlink()+ return str(manifest_path), str(zip_path)+++def convert_images(+ input_paths: Iterable[str | os.PathLike[str]],+ options: ImageConversionOptions | None = None,+ progress: Callable[[float, str], None] | None = None,+) -> ImageBatchResult:+ options = options or ImageConversionOptions()+ neural = _validate_options(options)+ paths = [Path(path).resolve() for path in input_paths]+ if not paths:+ raise ValueError("Choose at least one image.")+ validate_runtime_files()+ OUTPUTS.mkdir(exist_ok=True)+ LOGS.mkdir(exist_ok=True)+ stamp = time.strftime("%Y%m%d-%H%M%S") + f"-{time.time_ns() % 1_000_000:06d}"+ failures_by_index: dict[int, ImageConversionFailure] = {}+ probes: list[_ImageProbe] = []+ for index, path in enumerate(paths):+ try:+ width, height = probe_image(path)+ output_width, output_height = resolve_output_size(+ width, height, options.upscaling_factor+ )+ probes.append(_ImageProbe(index, path, width, height, output_width, output_height))+ except Exception as exc:+ failures_by_index[index] = ImageConversionFailure(str(path), str(exc))++ if not probes:+ manifest_path, zip_path = _build_manifest_and_zip(+ stamp, options, [], list(failures_by_index.values()), False+ )+ return ImageBatchResult([], list(failures_by_index.values()), False, manifest_path, zip_path)++ groups: dict[tuple[int, int], list[_ImageProbe]] = {}+ for probe in probes:+ groups.setdefault((probe.output_width, probe.output_height), []).append(probe)++ successes_by_index: dict[int, ImageConversionResult] = {}+ cancelled = False+ gpu: dict | None = None+ processed_total = 0+ with active_job() as controller:+ gpu = detect_gpu()+ total = len(probes)+ for (output_width, output_height), group in groups.items():+ cursor = 0+ while cursor < len(group):+ if controller.cancel.is_set():+ cancelled = True+ break+ remaining = group[cursor:]+ first = remaining[0]+ try:+ factor, mode = resolve_upscaling_mode(neural.upscaling_factor)+ session = DLSSFrameSession(+ input_width=first.width,+ input_height=first.height,+ output_width=output_width,+ output_height=output_height,+ frame_count=len(remaining),+ warmup_frames=neural.warmup_frames,+ factor=factor,+ mode=mode,+ native_settings=resolve_native_settings(neural),+ controller=controller,+ )+ except Exception as exc:+ controller.terminate_processes()+ for item in remaining:+ failures_by_index[item.index] = ImageConversionFailure(str(item.path), str(exc))+ break++ segment: list[tuple[_ImageProbe, ImageConversionResult, _DecodedImage]] = []+ sent = 0+ interrupted = False+ close_error: Exception | None = None+ while cursor < len(group):+ item = group[cursor]+ started = time.perf_counter()+ if controller.cancel.is_set():+ cancelled = True+ interrupted = True+ session.abort()+ break+ if progress:+ progress(processed_total / max(1, total), f"Preparing {item.path.name}")+ try:+ decoded = decode_image(item.path)+ except Exception as exc:+ failures_by_index[item.index] = ImageConversionFailure(str(item.path), str(exc))+ cursor += 1+ processed_total += 1+ session.abort()+ interrupted = True+ break+ try:+ render_rgba = resize_fit(+ decoded.rgba, session.render_width, session.render_height+ )+ motion = np.zeros(+ (session.render_height, session.render_width, 2), dtype=np.float16+ )+ processed, _pts = session.process(+ index=sent,+ rgba=render_rgba,+ motion=motion,+ reset=True,+ pts=sent,+ )+ alpha = cv2.resize(+ decoded.alpha,+ (output_width, output_height),+ interpolation=cv2.INTER_LANCZOS4,+ )+ processed[..., 3] = alpha+ output = _output_path(item.path, options.output_format, stamp, item.index)+ encoding_warnings = save_image(output, processed, options, decoded.metadata)+ result = ImageConversionResult(+ str(item.path),+ str(output),+ "",+ time.perf_counter() - started,+ str(gpu["name"]),+ item.width,+ item.height,+ session.render_width,+ session.render_height,+ output_width,+ output_height,+ float(options.upscaling_factor),+ str(session.mode["name"]),+ options.output_format,+ [*decoded.warnings, *encoding_warnings],+ )+ segment.append((item, result, decoded))+ sent += 1+ except Cancelled:+ cancelled = True+ session.abort()+ interrupted = True+ break+ except Exception as exc:+ failures_by_index[item.index] = ImageConversionFailure(str(item.path), str(exc))+ session.abort()+ interrupted = True+ cursor += 1+ processed_total += 1+ break+ cursor += 1+ processed_total += 1+ if progress:+ progress(processed_total / total, f"Rendered {item.path.name}")++ if not interrupted:+ try:+ session.close()+ except Exception as exc:+ close_error = exc+ try:+ if close_error:+ raise close_error+ evidence = verify_feature_18(session.worker_logs)+ assert gpu is not None+ for item, result, decoded in segment:+ result.report_path = _write_report(+ result, options, decoded, gpu, session, evidence+ )+ successes_by_index[item.index] = result+ except Exception as exc:+ for item, result, _decoded in segment:+ output = Path(result.output_path)+ if output.exists():+ output.unlink()+ failures_by_index[item.index] = ImageConversionFailure(str(item.path), str(exc))+ if cancelled:+ break+ if cancelled:+ break+ if cancelled:+ completed = set(successes_by_index) | set(failures_by_index)+ for probe in probes:+ if probe.index not in completed:+ failures_by_index[probe.index] = ImageConversionFailure(+ str(probe.path), "Cancelled before rendering."+ )+ successes = [successes_by_index[index] for index in sorted(successes_by_index)]+ failures = [failures_by_index[index] for index in sorted(failures_by_index)]+ manifest_path, zip_path = _build_manifest_and_zip(+ stamp, options, successes, failures, cancelled+ )+ if progress:+ progress(1.0, "Cancelled" if cancelled else "Complete")+ return ImageBatchResult(successes, failures, cancelled, manifest_path, zip_path)+++def convert_image(+ input_path: str | os.PathLike[str],+ options: ImageConversionOptions | None = None,+ progress: Callable[[float, str], None] | None = None,+) -> ImageConversionResult:+ result = convert_images([input_path], options, progress)+ if result.successes:+ return result.successes[0]+ if result.failures:+ raise RuntimeError(result.failures[0].error)+ raise RuntimeError("Image conversion produced no result.")diff --git a/src/runtime.py b/src/runtime.pynew file mode 100644index 0000000..d73c760--- /dev/null+++ b/src/runtime.py@@ -0,0 +1,431 @@+from __future__ import annotations++import re+import struct+import subprocess+import threading+from contextlib import contextmanager+from pathlib import Path+from typing import Iterator++import cv2+import numpy as np+++ROOT = Path(__file__).resolve().parents[1]+RUNTIME = ROOT / "bin" / "runtime"+FFMPEG = ROOT / "bin" / "ffmpeg" / "bin" / "ffmpeg.exe"+FFPROBE = ROOT / "bin" / "ffmpeg" / "bin" / "ffprobe.exe"+WORKER = RUNTIME / "nvngx.dll" # Signed-snippet caller checks require this image name.+OUTPUTS = ROOT / "outputs"+LOGS = ROOT / "logs"+JOBS = ROOT / "jobs"++VIDEO_MAGIC = 0x33563544+SETUP_MAGIC = 0x33505553+FRAME_MAGIC = 0x314D5246+OUT_MAGIC = 0x3154554F+VIDEO_HEADER_FORMAT = "<13I4f"+SETUP_RESPONSE_FORMAT = "<11I"+++class Cancelled(RuntimeError):+ pass+++class JobController:+ """Own cancellation state and subprocesses for one render."""++ def __init__(self) -> None:+ self.cancel = threading.Event()+ self._lock = threading.Lock()+ self._processes: list[subprocess.Popen] = []++ def register(self, process: subprocess.Popen) -> None:+ with self._lock:+ self._processes.append(process)++ def unregister(self, process: subprocess.Popen) -> None:+ with self._lock:+ if process in self._processes:+ self._processes.remove(process)++ def stop(self) -> None:+ self.cancel.set()+ self.terminate_processes()++ def terminate_processes(self) -> None:+ with self._lock:+ processes = list(self._processes)+ for process in processes:+ if process.poll() is None:+ try:+ process.terminate()+ except OSError:+ pass+++_RENDER_LOCK = threading.Lock()+_ACTIVE_LOCK = threading.Lock()+_ACTIVE: JobController | None = None+++@contextmanager+def active_job() -> Iterator[JobController]:+ """Claim the single GPU render slot and always release its resources."""+ global _ACTIVE+ if not _RENDER_LOCK.acquire(blocking=False):+ raise RuntimeError("Another GPU render is already running.")+ controller = JobController()+ with _ACTIVE_LOCK:+ _ACTIVE = controller+ try:+ yield controller+ finally:+ controller.terminate_processes()+ with _ACTIVE_LOCK:+ if _ACTIVE is controller:+ _ACTIVE = None+ _RENDER_LOCK.release()+++def cancel_active_job() -> str:+ with _ACTIVE_LOCK:+ controller = _ACTIVE+ if controller is None:+ return "No render is running."+ controller.stop()+ return "Stop requested; incomplete output will be removed and completed batch files retained."+++def drain_text(stream, lines: list[str]) -> None:+ for raw in iter(stream.readline, b""):+ lines.append(raw.decode("utf-8", "replace").rstrip())+++def resize_fit(rgba: np.ndarray, width: int, height: int) -> np.ndarray:+ source_height, source_width = rgba.shape[:2]+ scale = min(width / source_width, height / source_height)+ fit_width = max(1, min(width, int(round(source_width * scale))))+ fit_height = max(1, min(height, int(round(source_height * scale))))+ resized = cv2.resize(rgba, (fit_width, fit_height), interpolation=cv2.INTER_LANCZOS4)+ canvas = np.zeros((height, width, 4), dtype=np.uint8)+ canvas[..., 3] = 255+ x = (width - fit_width) // 2+ y = (height - fit_height) // 2+ canvas[y : y + fit_height, x : x + fit_width] = resized+ return canvas+++def rotate_frame(frame: np.ndarray, rotation: int) -> np.ndarray:+ if rotation == 90:+ return np.ascontiguousarray(np.rot90(frame, 3))+ if rotation == 180:+ return np.ascontiguousarray(np.rot90(frame, 2))+ if rotation == 270:+ return np.ascontiguousarray(np.rot90(frame, 1))+ return frame+++def detect_gpu() -> dict:+ command = [+ "nvidia-smi",+ "--query-gpu=name,driver_version,memory.total,compute_cap",+ "--format=csv,noheader,nounits",+ ]+ try:+ result = subprocess.run(command, capture_output=True, text=True, timeout=10)+ except (OSError, subprocess.TimeoutExpired) as exc:+ raise RuntimeError(+ "NVIDIA driver tools are unavailable; an RTX GPU and current driver are required."+ ) from exc+ candidates = []+ for line in result.stdout.splitlines():+ parts = [part.strip() for part in line.split(",")]+ if len(parts) >= 4 and "RTX" in parts[0].upper():+ candidates.append(parts)+ if not candidates:+ raise RuntimeError("No supported NVIDIA RTX GPU was detected.")+ name, driver, memory, capability = candidates[0]+ match = re.search(r"RTX\s+(\d{2})", name.upper())+ generation = int(match.group(1)) if match else 0+ if generation < 30:+ raise RuntimeError(f"{name} is outside the supported RTX 30/40/50 scope.")+ return {+ "name": name,+ "driver": driver,+ "memory_mb": int(memory),+ "compute_capability": capability,+ "generation": generation,+ "beta": generation == 30,+ }+++def validate_runtime_files() -> None:+ required = [+ FFMPEG,+ FFPROBE,+ WORKER,+ RUNTIME / "dxgi.dll",+ RUNTIME / "renodx-dlss5.addon64",+ RUNTIME / "nvngx_dlss.dll",+ RUNTIME / "nvngx_dlssnr.dll",+ ]+ missing = [str(path) for path in required if not path.exists()]+ if missing:+ raise RuntimeError("Portable runtime is incomplete:\n" + "\n".join(missing))+++def _read_exact(stream, size: int) -> bytes:+ chunks = bytearray()+ while len(chunks) < size:+ block = stream.read(size - len(chunks))+ if not block:+ raise EOFError(f"Native worker stopped after {len(chunks)} of {size} output bytes")+ chunks.extend(block)+ return bytes(chunks)+++class DLSSFrameSession:+ """A reusable native DLSSNR feature-18 frame stream."""++ def __init__(+ self,+ *,+ input_width: int,+ input_height: int,+ output_width: int,+ output_height: int,+ frame_count: int,+ warmup_frames: int,+ factor: float,+ mode: dict[str, str | int],+ native_settings: dict[str, int | float],+ controller: JobController,+ ) -> None:+ self.controller = controller+ self.worker_logs: list[str] = []+ self.closed = False+ self.factor = factor+ self.mode = mode+ self.native_settings = native_settings+ creation_flags = getattr(subprocess, "CREATE_NO_WINDOW", 0)+ self.worker = subprocess.Popen(+ [str(WORKER), "--video"],+ cwd=RUNTIME,+ stdin=subprocess.PIPE,+ stdout=subprocess.PIPE,+ stderr=subprocess.PIPE,+ creationflags=creation_flags,+ )+ controller.register(self.worker)+ assert self.worker.stderr is not None+ self.worker_thread = threading.Thread(+ target=drain_text,+ args=(self.worker.stderr, self.worker_logs),+ daemon=True,+ )+ self.worker_thread.start()+ native = native_settings+ header = struct.pack(+ VIDEO_HEADER_FORMAT,+ VIDEO_MAGIC,+ input_width,+ input_height,+ output_width,+ output_height,+ int(warmup_frames),+ frame_count,+ int(mode["perf_quality"]),+ native["profile"],+ native["preset"],+ native["style"],+ native["auto_mask"],+ native["ui_correction"],+ native["intensity"],+ native["local_tone"],+ native["local_structure"],+ native["skin_structure"],+ )+ assert self.worker.stdin is not None and self.worker.stdout is not None+ try:+ self.worker.stdin.write(header)+ self.worker.stdin.flush()+ try:+ setup_data = _read_exact(+ self.worker.stdout, struct.calcsize(SETUP_RESPONSE_FORMAT)+ )+ except EOFError as exc:+ worker_code = self.worker.wait(timeout=10)+ self.worker_thread.join(timeout=2)+ details = (+ "\n".join(self.worker_logs[-60:])+ or "The worker produced no diagnostic output."+ )+ raise RuntimeError(+ "The native worker is incompatible with the version-3 upscaling protocol "+ f"or failed during DLSS setup (exit {worker_code}):\n{details}"+ ) from exc+ (+ setup_magic,+ setup_ok,+ self.setup_result,+ self.render_width,+ self.render_height,+ negotiated_output_width,+ negotiated_output_height,+ self.minimum_width,+ self.minimum_height,+ self.maximum_width,+ self.maximum_height,+ ) = struct.unpack(SETUP_RESPONSE_FORMAT, setup_data)+ if setup_magic != SETUP_MAGIC:+ raise RuntimeError(+ "The installed native worker does not support the version-3 upscaling protocol. "+ "Rebuild it."+ )+ if not setup_ok:+ details = "\n".join(self.worker_logs[-60:])+ raise RuntimeError(+ f"DLSS {mode['name']} is unavailable for {output_width}×{output_height} "+ f"(NGX 0x{self.setup_result:08X}). Choose a lower upscaling factor or update "+ "the NVIDIA driver."+ + (f"\n{details}" if details else "")+ )+ if (negotiated_output_width, negotiated_output_height) != (+ output_width,+ output_height,+ ):+ raise RuntimeError(+ "The native worker returned output dimensions different from the request."+ )+ if self.render_width < 64 or self.render_height < 64:+ raise RuntimeError(+ f"DLSS returned an unsupported render size: "+ f"{self.render_width}×{self.render_height}; both dimensions must be at least "+ "64 pixels."+ )+ self.output_width = output_width+ self.output_height = output_height+ except Exception:+ self.abort()+ raise++ def process(+ self,+ *,+ index: int,+ rgba: np.ndarray,+ motion: np.ndarray,+ reset: bool,+ pts: int,+ ) -> tuple[np.ndarray, int]:+ if self.controller.cancel.is_set():+ raise Cancelled("Render stopped by user.")+ assert self.worker.stdin is not None and self.worker.stdout is not None+ frame_header = struct.pack("<4Iq", FRAME_MAGIC, index, int(reset), 0, pts)+ self.worker.stdin.write(frame_header)+ self.worker.stdin.write(np.ascontiguousarray(rgba, dtype=np.uint8).tobytes())+ self.worker.stdin.write(np.ascontiguousarray(motion, dtype=np.float16).tobytes())+ self.worker.stdin.flush()+ try:+ result_header = _read_exact(self.worker.stdout, struct.calcsize("<5Iq"))+ except EOFError as exc:+ worker_code = self.worker.wait(timeout=10)+ self.worker_thread.join(timeout=2)+ details = (+ "\n".join(self.worker_logs[-60:])+ or "The worker produced no diagnostic output."+ )+ raise RuntimeError(+ f"Native DLSS worker exited with code {worker_code} before frame {index} "+ f"completed:\n{details}"+ ) from exc+ magic, out_index, ok, byte_count, ngx_result, out_pts = struct.unpack(+ "<5Iq", result_header+ )+ expected = self.output_width * self.output_height * 4+ if magic != OUT_MAGIC or not ok or out_index != index or byte_count != expected:+ raise RuntimeError(f"Invalid native worker response for frame {index}")+ if ngx_result != 1:+ raise RuntimeError(+ f"Direct feature-18 evaluation failed on frame {index}: 0x{ngx_result:08X}"+ )+ output = np.frombuffer(+ _read_exact(self.worker.stdout, byte_count), dtype=np.uint8+ ).reshape(self.output_height, self.output_width, 4)+ return output.copy(), out_pts++ def close(self) -> None:+ if self.closed:+ return+ if self.worker.stdin and not self.worker.stdin.closed:+ self.worker.stdin.close()+ worker_code = self.worker.wait(timeout=60)+ self.worker_thread.join(timeout=2)+ self.controller.unregister(self.worker)+ self.closed = True+ if worker_code:+ raise RuntimeError(+ "Native DLSS worker failed:\n" + "\n".join(self.worker_logs[-40:])+ )++ def abort(self) -> None:+ if self.closed:+ return+ if self.worker.poll() is None:+ try:+ self.worker.terminate()+ self.worker.wait(timeout=10)+ except (OSError, subprocess.TimeoutExpired):+ try:+ self.worker.kill()+ except OSError:+ pass+ self.worker_thread.join(timeout=2)+ self.controller.unregister(self.worker)+ self.closed = True+++def verify_feature_18(worker_logs: list[str]) -> dict[str, object]:+ reshade_log_path = RUNTIME / "ReShade.log"+ reshade_log = (+ reshade_log_path.read_text(encoding="utf-8", errors="replace")+ if reshade_log_path.exists()+ else ""+ )+ feature_created = "feature 18 created via the signed snippet" in reshade_log+ feature_evaluated = "inline feature 18 evaluation succeeded" in reshade_log+ runtime_initialized = "signed DLSSNR 310.8.0 D3D12 runtime initialized" in reshade_log+ if not (runtime_initialized and feature_created and feature_evaluated):+ evidence = "\n".join(+ line+ for line in reshade_log.splitlines()+ if "DLSS 5 Neural Rendering" in line+ or "DLSSNR" in line+ or "feature 18" in line+ )+ raise RuntimeError(+ "The carrier render completed, but signed DLSSNR feature-18 execution was not "+ "verified.\n"+ + (evidence[-6000:] or "ReShade produced no DLSSNR evidence.")+ )+ carrier_matches = re.findall(+ r"DLSS carrier ready:.*result=0x([0-9A-Fa-f]{8})", "\n".join(worker_logs)+ )+ return {+ "reshade_log": reshade_log,+ "nr_upscaling_active": "[upscaling]" in reshade_log and feature_evaluated,+ "nr_native_fallback": "NR upscaling fell back to native" in reshade_log,+ "carrier_create_result": (+ f"0x{carrier_matches[-1].upper()}" if carrier_matches else "unreported"+ ),+ "evidence": [+ line+ for line in reshade_log.splitlines()+ if "signed DLSSNR" in line+ or "feature 18 created" in line+ or "feature 18 evaluation succeeded" in line+ or "NR upscaling fell back" in line+ ],+ }diff --git a/src/settings.py b/src/settings.pynew file mode 100644index 0000000..5f0119f--- /dev/null+++ b/src/settings.py@@ -0,0 +1,171 @@+from __future__ import annotations++import configparser+import math+import os+from dataclasses import dataclass+from pathlib import Path++from .ffmpeg import ENCODING_QUALITIES+from .video import (+ NR_PRESETS,+ NR_STYLES,+ ConversionOptions,+ resolve_native_settings,+ resolve_upscaling_mode,+)+++QUALITY_CHOICES = ENCODING_QUALITIES+CODEC_CHOICES = ("H.264", "HEVC", "AV1", "ProRes Proxy")+CONTAINER_CHOICES = ("MP4", "MKV", "MOV")+IMAGE_FORMAT_CHOICES = ("PNG", "JPEG", "WebP", "AVIF", "TIFF")+CONFIG_SECTION = "Settings"+++@dataclass(frozen=True, slots=True)+class UISettings:+ nr_style: str = "Default"+ nr_intensity: float = 1.0+ local_tone_strength: float = 1.0+ local_structure_strength: float = 1.0+ skin_structure_strength: float = -1.0+ upscaling_factor: float = 1.0+ codec: str = "H.264"+ container: str = "MP4"+ quality: str = "Auto (Default)"+ image_format: str = "PNG"+ image_quality: int = 95+ nr_preset: str = "Default"++ def component_values(self) -> tuple[str, str, float, float, float, float, float, str, str, str]:+ return (+ self.nr_preset,+ self.nr_style,+ self.nr_intensity,+ self.local_tone_strength,+ self.local_structure_strength,+ self.skin_structure_strength,+ self.upscaling_factor,+ self.codec,+ self.container,+ self.quality,+ )+++DEFAULT_SETTINGS = UISettings()+++def _validate(settings: UISettings) -> UISettings:+ resolve_native_settings(+ ConversionOptions(+ nr_preset=settings.nr_preset,+ nr_style=settings.nr_style,+ nr_intensity=settings.nr_intensity,+ local_tone_strength=settings.local_tone_strength,+ local_structure_strength=settings.local_structure_strength,+ skin_structure_strength=settings.skin_structure_strength,+ upscaling_factor=settings.upscaling_factor,+ )+ )+ resolve_upscaling_mode(settings.upscaling_factor)+ allowed = {+ "Video codec": (settings.codec, CODEC_CHOICES),+ "Container": (settings.container, CONTAINER_CHOICES),+ "Encoding quality": (settings.quality, QUALITY_CHOICES),+ "Image format": (settings.image_format, IMAGE_FORMAT_CHOICES),+ }+ for label, (value, choices) in allowed.items():+ if value not in choices:+ raise ValueError(f"Unknown {label}: {value!r}.")+ if isinstance(settings.image_quality, bool) or not 1 <= int(settings.image_quality) <= 100:+ raise ValueError("Image quality must be an integer from 1 to 100.")+ if int(settings.image_quality) != settings.image_quality:+ raise ValueError("Image quality must be an integer from 1 to 100.")+ return settings+++def load_settings(path: str | os.PathLike[str]) -> UISettings:+ config_path = Path(path)+ parser = configparser.ConfigParser()+ try:+ with config_path.open("r", encoding="utf-8") as stream:+ parser.read_file(stream)+ except (OSError, configparser.Error):+ return DEFAULT_SETTINGS++ section = parser[CONFIG_SECTION] if parser.has_section(CONFIG_SECTION) else {}++ def choice(key: str, choices: tuple[str, ...], default: str) -> str:+ value = section.get(key, default)+ return value if value in choices else default++ def number(key: str, minimum: float, maximum: float, default: float) -> float:+ try:+ value = float(section.get(key, str(default)))+ except (TypeError, ValueError):+ return default+ return value if math.isfinite(value) and minimum <= value <= maximum else default++ def upscaling_factor() -> float:+ try:+ return resolve_upscaling_mode(float(section.get("upscaling_factor", "1.0")))[0]+ except (TypeError, ValueError):+ return DEFAULT_SETTINGS.upscaling_factor++ def image_quality() -> int:+ value = number("image_quality", 1, 100, DEFAULT_SETTINGS.image_quality)+ return int(value) if float(value).is_integer() else DEFAULT_SETTINGS.image_quality++ return UISettings(+ nr_preset=choice("nr_preset", tuple(NR_PRESETS), DEFAULT_SETTINGS.nr_preset),+ nr_style=choice("nr_style", tuple(NR_STYLES), DEFAULT_SETTINGS.nr_style),+ nr_intensity=number("nr_intensity", 0.0, 2.0, DEFAULT_SETTINGS.nr_intensity),+ local_tone_strength=number(+ "local_tone_strength", 0.0, 2.0, DEFAULT_SETTINGS.local_tone_strength+ ),+ local_structure_strength=number(+ "local_structure_strength", 0.0, 2.0, DEFAULT_SETTINGS.local_structure_strength+ ),+ skin_structure_strength=number(+ "skin_structure_strength", -1.0, 2.0, DEFAULT_SETTINGS.skin_structure_strength+ ),+ upscaling_factor=upscaling_factor(),+ codec=choice("codec", CODEC_CHOICES, DEFAULT_SETTINGS.codec),+ container=choice("container", CONTAINER_CHOICES, DEFAULT_SETTINGS.container),+ quality=choice("quality", QUALITY_CHOICES, DEFAULT_SETTINGS.quality),+ image_format=choice(+ "image_format", IMAGE_FORMAT_CHOICES, DEFAULT_SETTINGS.image_format+ ),+ image_quality=image_quality(),+ )+++def save_settings(path: str | os.PathLike[str], settings: UISettings) -> None:+ settings = _validate(settings)+ config_path = Path(path)+ config_path.parent.mkdir(parents=True, exist_ok=True)+ parser = configparser.ConfigParser()+ parser[CONFIG_SECTION] = {+ "nr_preset": settings.nr_preset,+ "nr_style": settings.nr_style,+ "nr_intensity": f"{settings.nr_intensity:.2f}",+ "local_tone_strength": f"{settings.local_tone_strength:.2f}",+ "local_structure_strength": f"{settings.local_structure_strength:.2f}",+ "skin_structure_strength": f"{settings.skin_structure_strength:.2f}",+ "upscaling_factor": f"{settings.upscaling_factor:g}",+ "codec": settings.codec,+ "container": settings.container,+ "quality": settings.quality,+ "image_format": settings.image_format,+ "image_quality": str(settings.image_quality),+ }++ temporary = config_path.with_name(f".{config_path.name}.tmp")+ try:+ with temporary.open("w", encoding="utf-8", newline="") as stream:+ parser.write(stream)+ os.replace(temporary, config_path)+ finally:+ if temporary.exists():+ temporary.unlink()diff --git a/src/video.py b/src/video.pynew file mode 100644index 0000000..3a966fe--- /dev/null+++ b/src/video.py@@ -0,0 +1,650 @@+from __future__ import annotations++import hashlib+import json+import math+import os+import shutil+import time+from contextlib import suppress+from dataclasses import asdict, dataclass+from fractions import Fraction+from pathlib import Path+from typing import Callable++import av+import cv2+import numpy as np++from . import ffmpeg+from .runtime import (+ JOBS,+ LOGS,+ OUTPUTS,+ RUNTIME,+ WORKER,+ Cancelled,+ DLSSFrameSession,+ active_job,+ detect_gpu,+ resize_fit,+ rotate_frame,+ validate_runtime_files,+ verify_feature_18,+)+++ENCODING_QUALITIES = ffmpeg.ENCODING_QUALITIES+AUTO_BITRATE_DIVISORS = ffmpeg.AUTO_BITRATE_DIVISORS+calculate_auto_bitrate_kbps = ffmpeg.calculate_auto_bitrate_kbps+probe_video = ffmpeg.probe_video+validate_codec_container = ffmpeg.validate_codec_container+++@dataclass(slots=True)+class ConversionOptions:+ nr_style: str = "Default"+ nr_intensity: float = 1.0+ local_tone_strength: float = 1.0+ local_structure_strength: float = 1.0+ skin_structure_strength: float = -1.0+ upscaling_factor: float = 1.0+ codec: str = "H.264"+ container: str = "MP4"+ quality: str = "Auto (Default)"+ preserve_hdr: bool = False+ warmup_frames: int = 120+ preview_seconds: float | None = None+ preview_frames: int | None = None+ nr_preset: str = "Default"+++NR_PRESETS = {+ "Default": 0,+ "Preset #1": 1,+ "Preset #2": 2,+ "Preset #3": 3,+}++NR_STYLES = {+ "Default": 0,+ "Natural": 1,+ "Cinematic": 2,+}++UPSCALING_MODES = {+ 1.0: {"label": "1× (DLAA / native)", "name": "DLAA", "perf_quality": 5},+ 1.5: {"label": "1.5× (Quality)", "name": "Quality", "perf_quality": 2},+ 1.724: {"label": "1.724× (Balanced)", "name": "Balanced", "perf_quality": 1},+ 2.0: {"label": "2× (Performance)", "name": "Performance", "perf_quality": 0},+ 3.0: {+ "label": "3× (Ultra Performance)",+ "name": "Ultra Performance",+ "perf_quality": 3,+ },+}+UPSCALING_CHOICES = tuple(+ (mode["label"], factor) for factor, mode in UPSCALING_MODES.items()+)+++def resolve_upscaling_mode(raw_factor: float) -> tuple[float, dict[str, str | int]]:+ try:+ factor = float(raw_factor)+ except (TypeError, ValueError) as exc:+ raise ValueError(+ "Upscaling factor must be one of the supported NVIDIA DLSS modes."+ ) from exc+ if not math.isfinite(factor):+ raise ValueError("Upscaling factor must be one of the supported NVIDIA DLSS modes.")+ for supported, mode in UPSCALING_MODES.items():+ if math.isclose(factor, supported, rel_tol=0.0, abs_tol=1e-9):+ return supported, mode+ choices = ", ".join(f"{factor:g}×" for factor in UPSCALING_MODES)+ raise ValueError(f"Unsupported upscaling factor {factor:g}×. Choose one of: {choices}.")+++def _nearest_even(value: float) -> int:+ return max(2, int(math.floor(value / 2.0 + 0.5)) * 2)+++def resolve_output_size(width: int, height: int, factor: float) -> tuple[int, int]:+ factor, _ = resolve_upscaling_mode(factor)+ output_width = _nearest_even(int(width) * factor)+ output_height = _nearest_even(int(height) * factor)+ long_edge = max(output_width, output_height)+ short_edge = min(output_width, output_height)+ if long_edge > 7680 or short_edge > 4320:+ valid = [+ candidate+ for candidate in UPSCALING_MODES+ if max(_nearest_even(width * candidate), _nearest_even(height * candidate)) <= 7680+ and min(_nearest_even(width * candidate), _nearest_even(height * candidate))+ <= 4320+ ]+ recommendation = max(valid) if valid else None+ hint = (+ f" Choose {recommendation:g}× or lower for this video."+ if recommendation is not None+ else " The source already exceeds the supported 8K boundary."+ )+ raise ValueError(+ f"The requested {output_width}×{output_height} output exceeds the supported "+ f"7680×4320 boundary.{hint}"+ )+ return output_width, output_height+++def resolve_encoding_quality(+ options: ConversionOptions, width: int, height: int, fps: float+) -> dict:+ return ffmpeg.resolve_encoding_quality(+ options.quality, options.codec, width, height, fps+ )+++def resolve_native_settings(options: ConversionOptions) -> dict[str, int | float]:+ """Validate public NR controls and translate them to the worker protocol."""+ try:+ preset = NR_PRESETS[options.nr_preset]+ except KeyError as exc:+ choices = ", ".join(NR_PRESETS)+ raise ValueError(+ f"Unknown NR Preset: {options.nr_preset!r}. Choose one of: {choices}."+ ) from exc++ try:+ style = NR_STYLES[options.nr_style]+ except KeyError as exc:+ choices = ", ".join(NR_STYLES)+ raise ValueError(+ f"Unknown NR Style: {options.nr_style!r}. Choose one of: {choices}."+ ) from exc++ controls = {+ "NR Intensity": (options.nr_intensity, 0.0, 2.0),+ "Local Tone Strength": (options.local_tone_strength, 0.0, 2.0),+ "Local Structure Strength": (options.local_structure_strength, 0.0, 2.0),+ "Skin Structure Strength": (options.skin_structure_strength, -1.0, 2.0),+ }+ validated: dict[str, float] = {}+ for label, (raw_value, minimum, maximum) in controls.items():+ try:+ value = float(raw_value)+ except (TypeError, ValueError) as exc:+ raise ValueError(+ f"{label} must be a number between {minimum:g} and {maximum:g}."+ ) from exc+ if not math.isfinite(value) or not minimum <= value <= maximum:+ raise ValueError(f"{label} must be between {minimum:g} and {maximum:g}.")+ validated[label] = value++ return {+ "profile": 0,+ "preset": preset,+ "style": style,+ "auto_mask": 0,+ "ui_correction": 0,+ "intensity": validated["NR Intensity"],+ "local_tone": validated["Local Tone Strength"],+ "local_structure": validated["Local Structure Strength"],+ "skin_structure": validated["Skin Structure Strength"],+ }+++@dataclass(slots=True)+class ConversionResult:+ output_path: str+ report_path: str+ frames: int+ nr_count_evidence: int+ elapsed_seconds: float+ gpu: str+ input_width: int+ input_height: int+ render_width: int+ render_height: int+ output_width: int+ output_height: int+ upscaling_factor: float+ dlss_mode: str+++@dataclass(slots=True)+class GuideFrame:+ motion: np.ndarray+ reset: bool+ scene_score: float+++class TemporalGuideGenerator:+ """Estimate the guide buffers an encoded video does not contain."""++ def __init__(self, width: int, height: int, flow_width: int = 640) -> None:+ self.width = width+ self.height = height+ scale = min(1.0, flow_width / width)+ self.flow_width = max(64, int(round(width * scale / 2) * 2))+ self.flow_height = max(64, int(round(height * scale / 2) * 2))+ self.previous_gray: np.ndarray | None = None+ self.dis = cv2.DISOpticalFlow_create(cv2.DISOPTICAL_FLOW_PRESET_MEDIUM)+ self.dis.setUseSpatialPropagation(True)+ self.dis.setFinestScale(1)++ def _small_gray(self, rgba: np.ndarray) -> np.ndarray:+ gray = cv2.cvtColor(rgba, cv2.COLOR_RGBA2GRAY)+ return cv2.resize(+ gray,+ (self.flow_width, self.flow_height),+ interpolation=cv2.INTER_AREA,+ )++ def process(self, rgba: np.ndarray) -> GuideFrame:+ current = self._small_gray(rgba)+ pixels = self.width * self.height+ if self.previous_gray is None:+ motion = np.zeros((self.height, self.width, 2), dtype=np.float32)+ reset = True+ scene_score = 1.0+ else:+ scene_score = float(np.mean(cv2.absdiff(current, self.previous_gray))) / 255.0+ reset = scene_score > 0.24+ if reset:+ motion = np.zeros((self.height, self.width, 2), dtype=np.float32)+ else:+ cur_to_prev = self.dis.calc(current, self.previous_gray, None)+ prev_to_cur = self.dis.calc(self.previous_gray, current, None)+ yy, xx = np.mgrid[0 : self.flow_height, 0 : self.flow_width].astype(+ np.float32+ )+ sample_x = xx + cur_to_prev[..., 0]+ sample_y = yy + cur_to_prev[..., 1]+ reverse = cv2.remap(+ prev_to_cur,+ sample_x,+ sample_y,+ cv2.INTER_LINEAR,+ borderMode=cv2.BORDER_CONSTANT,+ )+ consistency = cv2.magnitude(+ cur_to_prev[..., 0] + reverse[..., 0],+ cur_to_prev[..., 1] + reverse[..., 1],+ )+ warped_previous = cv2.remap(+ self.previous_gray,+ sample_x,+ sample_y,+ cv2.INTER_LINEAR,+ borderMode=cv2.BORDER_REFLECT,+ )+ residual = (+ cv2.absdiff(current, warped_previous).astype(np.float32) / 255.0+ )+ invalid = np.maximum(+ np.clip(consistency / 2.5, 0.0, 1.0),+ np.clip(residual * 4.0, 0.0, 1.0),+ )+ cv2.dilate(invalid, np.ones((3, 3), np.uint8), iterations=1)++ motion = cv2.resize(+ cur_to_prev,+ (self.width, self.height),+ interpolation=cv2.INTER_LINEAR,+ )+ motion[..., 0] *= self.width / self.flow_width+ motion[..., 1] *= self.height / self.flow_height+ self.previous_gray = current+ assert motion.size == pixels * 2+ return GuideFrame(+ motion=np.ascontiguousarray(motion.astype(np.float16)),+ reset=reset,+ scene_score=scene_score,+ )+++def _validate_preview_options(+ options: ConversionOptions,+) -> tuple[float | None, int | None]:+ preview_seconds: float | None = None+ if options.preview_seconds is not None:+ try:+ preview_seconds = float(options.preview_seconds)+ except (TypeError, ValueError) as exc:+ raise ValueError("Preview duration must be a positive number of seconds.") from exc+ if not math.isfinite(preview_seconds) or preview_seconds <= 0:+ raise ValueError("Preview duration must be a positive number of seconds.")++ preview_frames: int | None = None+ if options.preview_frames is not None:+ if isinstance(options.preview_frames, bool):+ raise ValueError("Preview frame count must be a positive integer.")+ try:+ preview_frames = int(options.preview_frames)+ except (TypeError, ValueError) as exc:+ raise ValueError("Preview frame count must be a positive integer.") from exc+ if preview_frames <= 0 or preview_frames != options.preview_frames:+ raise ValueError("Preview frame count must be a positive integer.")+ if preview_seconds is not None and preview_frames is not None:+ raise ValueError("Choose either a timed preview or a frame preview, not both.")+ return preview_seconds, preview_frames+++def convert_video(+ input_path: str | os.PathLike[str],+ options: ConversionOptions | None = None,+ progress: Callable[[float, str], None] | None = None,+) -> ConversionResult:+ options = options or ConversionOptions()+ source = Path(input_path).resolve()+ if not source.is_file():+ raise FileNotFoundError(source)+ validate_codec_container(options.codec, options.container)+ preview_seconds, preview_frames = _validate_preview_options(options)+ is_preview = preview_seconds is not None or preview_frames is not None+ if options.preserve_hdr:+ raise RuntimeError(+ "HDR preservation is disabled in this build because the verified DLSSNR path is "+ "RGBA8. HDR input is converted to SDR instead of being mislabeled as HDR."+ )+ validate_runtime_files()++ with active_job() as controller:+ started = time.perf_counter()+ job_dir: Path | None = None+ output: Path | None = None+ session: DLSSFrameSession | None = None+ encoder = None+ nut = None+ input_container = None+ try:+ metadata = probe_video(source)+ if preview_frames is not None:+ frame_count = min(int(metadata["frames"]), preview_frames)+ elif preview_seconds is not None:+ frame_count = ffmpeg.preview_frame_count(source, preview_seconds)+ else:+ frame_count = int(metadata["frames"])+ gpu = detect_gpu()+ input_width = int(metadata["width"])+ input_height = int(metadata["height"])+ factor, mode = resolve_upscaling_mode(options.upscaling_factor)+ output_width, output_height = resolve_output_size(+ input_width, input_height, factor+ )+ OUTPUTS.mkdir(exist_ok=True)+ LOGS.mkdir(exist_ok=True)+ JOBS.mkdir(exist_ok=True)+ stamp = time.strftime("%Y%m%d-%H%M%S") + f"-{time.time_ns() % 1_000_000:06d}"+ job_dir = JOBS / f"{source.stem}-{stamp}-{os.getpid()}"+ job_dir.mkdir(parents=True, exist_ok=False)+ extension = {"MP4": ".mp4", "MKV": ".mkv", "MOV": ".mov"}.get(+ options.container+ )+ if extension is None:+ raise ValueError(f"Unknown output container: {options.container!r}.")+ output_kind = (+ "DLSS5"+ if not is_preview+ else (+ "DLSS5_PREVIEW_FRAME"+ if preview_frames is not None+ else "DLSS5_PREVIEW"+ )+ )+ output = OUTPUTS / f"{source.stem}_{output_kind}_{stamp}{extension}"+ temp_video = job_dir / "processed-video.mkv"+ native = resolve_native_settings(options)+ if progress:+ progress(0.01, f"Starting feature 18 on {gpu['name']}")++ session = DLSSFrameSession(+ input_width=input_width,+ input_height=input_height,+ output_width=output_width,+ output_height=output_height,+ frame_count=frame_count,+ warmup_frames=options.warmup_frames,+ factor=factor,+ mode=mode,+ native_settings=native,+ controller=controller,+ )+ render_width = session.render_width+ render_height = session.render_height+ setup_result = session.setup_result+ minimum_width = session.minimum_width+ minimum_height = session.minimum_height+ maximum_width = session.maximum_width+ maximum_height = session.maximum_height+ if progress:+ progress(+ 0.03,+ f"DLSS {mode['name']}: {render_width}×{render_height} → "+ f"{output_width}×{output_height}",+ )++ (+ encoder,+ encoder_thread,+ encoder_logs,+ selected_encoder,+ encoding_quality,+ ) = ffmpeg.start_encoder(+ temp_video,+ options.codec,+ options.quality,+ controller,+ output_width,+ output_height,+ float(metadata["fps"]),+ )+ assert encoder.stdin is not None+ nut = av.open(encoder.stdin, mode="w", format="nut")+ input_container = av.open(str(source))+ input_stream = input_container.streams.video[0]+ input_stream.thread_type = "AUTO"+ rate = input_stream.average_rate or metadata["rate"]+ raw_stream = nut.add_stream("rawvideo", rate=rate)+ raw_stream.width = output_width+ raw_stream.height = output_height+ raw_stream.pix_fmt = "rgba"+ raw_stream.time_base = input_stream.time_base or metadata["time_base"]+ guides = TemporalGuideGenerator(render_width, render_height)+ delivered = 0+ scene_resets = 0+ preview_pts_origin: int | None = None+ for index, frame in enumerate(input_container.decode(input_stream)):+ if index >= frame_count:+ break+ if controller.cancel.is_set():+ raise Cancelled("Render stopped by user.")+ rgba = rotate_frame(+ frame.to_ndarray(format="rgba"), metadata["rotation"]+ )+ if rgba.shape[1] != render_width or rgba.shape[0] != render_height:+ rgba = resize_fit(rgba, render_width, render_height)+ rgba = np.ascontiguousarray(rgba, dtype=np.uint8)+ guide = guides.process(rgba)+ scene_resets += int(guide.reset and index != 0)+ pts = int(frame.pts if frame.pts is not None else index)+ processed, out_pts = session.process(+ index=index,+ rgba=rgba,+ motion=guide.motion,+ reset=guide.reset,+ pts=pts,+ )+ out_frame = av.VideoFrame.from_ndarray(processed, format="rgba")+ if is_preview:+ if preview_pts_origin is None:+ preview_pts_origin = out_pts+ out_frame.pts = out_pts - preview_pts_origin+ else:+ out_frame.pts = out_pts+ out_frame.time_base = input_stream.time_base or metadata["time_base"]+ for packet in raw_stream.encode(out_frame):+ nut.mux(packet)+ delivered += 1+ if progress:+ progress(+ 0.04 + 0.84 * delivered / frame_count,+ f"DLSS 5 frame {delivered}/{frame_count}",+ )++ if delivered != frame_count:+ raise RuntimeError(+ f"Decoded {delivered} frames instead of the expected {frame_count}; "+ "refusing an incomplete render."+ )+ for packet in raw_stream.encode():+ nut.mux(packet)+ nut.close()+ nut = None+ if encoder.stdin and not encoder.stdin.closed:+ encoder.stdin.close()+ input_container.close()+ input_container = None+ session.close()+ encoder_code = encoder.wait(timeout=120)+ encoder_thread.join(timeout=2)+ controller.unregister(encoder)+ if encoder_code:+ raise RuntimeError(+ "Video encoder failed:\n" + "\n".join(encoder_logs[-40:])+ )++ feature_evidence = verify_feature_18(session.worker_logs)+ nr_count = delivered+ nr_upscaling_requested = factor > 1.0+ nr_upscaling_active = bool(feature_evidence["nr_upscaling_active"])+ nr_native_fallback = bool(feature_evidence["nr_native_fallback"])+ carrier_create_result = str(feature_evidence["carrier_create_result"])+ if progress:+ progress(0.91, "Muxing original audio and metadata")+ ffmpeg.final_mux(temp_video, source, output, options.container)+ verified = probe_video(output)+ if verified["frames"] != delivered:+ raise RuntimeError(+ f"Output verification found {verified['frames']} frames instead of "+ f"{delivered}."+ )+ if (verified["width"], verified["height"]) != (+ output_width,+ output_height,+ ):+ raise RuntimeError(+ f"Output verification found {verified['width']}×{verified['height']} "+ f"instead of {output_width}×{output_height}."+ )++ elapsed = time.perf_counter() - started+ report = {+ "status": "success",+ "input": str(source),+ "output": str(output),+ "options": asdict(options),+ "input_metadata": {+ key: str(value) if isinstance(value, Fraction) else value+ for key, value in metadata.items()+ },+ "output_metadata": {+ key: str(value) if isinstance(value, Fraction) else value+ for key, value in verified.items()+ },+ "gpu": gpu,+ "encoder": selected_encoder,+ "encoding_quality": encoding_quality,+ "frames_processed": delivered,+ "render_mode": (+ "full"+ if not is_preview+ else ("preview-frame" if preview_frames is not None else "preview")+ ),+ "dlss_mode": mode["name"],+ "requested_upscaling_factor": factor,+ "input_dimensions": {"width": input_width, "height": input_height},+ "negotiated_render_dimensions": {+ "width": render_width,+ "height": render_height,+ },+ "negotiated_render_range": {+ "minimum": {"width": minimum_width, "height": minimum_height},+ "maximum": {"width": maximum_width, "height": maximum_height},+ },+ "output_dimensions": {"width": output_width, "height": output_height},+ "effective_factor": {+ "width": output_width / input_width,+ "height": output_height / input_height,+ },+ "nr_upscaling_requested": nr_upscaling_requested,+ "nr_upscaling_active": nr_upscaling_active,+ "nr_native_fallback": nr_native_fallback,+ "ngx_setup_result": f"0x{setup_result:08X}",+ "scene_resets": scene_resets,+ "pipeline": "renodx-dlssnr-feature18",+ "feature_id": 18,+ "feature_18_confirmed": True,+ "carrier_create_result": carrier_create_result,+ "successful_neural_rendering_frames": nr_count,+ "model_sha256": hashlib.sha256(+ (RUNTIME / "nvngx_dlssnr.dll").read_bytes()+ ).hexdigest(),+ "worker_sha256": hashlib.sha256(WORKER.read_bytes()).hexdigest(),+ "loaded_module_inventory": [+ "nvngx.dll (standalone worker image)",+ "dxgi.dll (ReShade carrier)",+ "renodx-dlss5.addon64",+ "nvngx_dlss.dll",+ "nvngx_dlssnr.dll",+ "system D3D12/DXGI/NGX core",+ ],+ "native_settings": native,+ "elapsed_seconds": elapsed,+ "average_fps": delivered / elapsed,+ "worker_log": session.worker_logs,+ "encoder_log": encoder_logs,+ "dlssnr_evidence": feature_evidence["evidence"],+ }+ report_path = LOGS / f"{output.name}.report.json"+ report_path.write_text(json.dumps(report, indent=2), encoding="utf-8")+ if progress:+ progress(1.0, "Complete — feature 18 confirmed")+ return ConversionResult(+ str(output),+ str(report_path),+ delivered,+ nr_count,+ elapsed,+ gpu["name"],+ input_width,+ input_height,+ render_width,+ render_height,+ output_width,+ output_height,+ factor,+ str(mode["name"]),+ )+ except Exception as exc:+ was_cancelled = controller.cancel.is_set()+ controller.stop()+ if session is not None and not session.closed:+ with suppress(Exception):+ session.abort()+ if nut is not None:+ with suppress(Exception):+ nut.close()+ if input_container is not None:+ with suppress(Exception):+ input_container.close()+ if encoder is not None and encoder.stdin and not encoder.stdin.closed:+ with suppress(OSError):+ encoder.stdin.close()+ if output and output.exists():+ output.unlink()+ if was_cancelled and not isinstance(exc, Cancelled):+ raise Cancelled("Render stopped by user.") from exc+ raise+ finally:+ if job_dir and job_dir.exists():+ shutil.rmtree(job_dir, ignore_errors=True)