Skip to content

Commit 9c44db2

Browse files
Super resolution: move SuperResolutionSourceSettingsAttribs to SuperResolutionFactory.h
1 parent 96fe5cd commit 9c44db2

File tree

2 files changed

+57
-56
lines changed

2 files changed

+57
-56
lines changed

Graphics/SuperResolution/interface/SuperResolution.h

Lines changed: 0 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -60,28 +60,6 @@ DILIGENT_TYPED_ENUM(SUPER_RESOLUTION_FLAGS, Uint32)
6060
DEFINE_FLAG_ENUM_OPERATORS(SUPER_RESOLUTION_FLAGS)
6161

6262

63-
/// Super resolution optimization type.
64-
/// Defines the quality/performance trade-off for super resolution upscaling.
65-
DILIGENT_TYPED_ENUM(SUPER_RESOLUTION_OPTIMIZATION_TYPE, Uint8)
66-
{
67-
/// Maximum quality, lowest performance.
68-
SUPER_RESOLUTION_OPTIMIZATION_TYPE_MAX_QUALITY = 0u,
69-
70-
/// Favor quality over performance.
71-
SUPER_RESOLUTION_OPTIMIZATION_TYPE_HIGH_QUALITY,
72-
73-
/// Balanced quality/performance trade-off.
74-
SUPER_RESOLUTION_OPTIMIZATION_TYPE_BALANCED,
75-
76-
/// Favor performance over quality.
77-
SUPER_RESOLUTION_OPTIMIZATION_TYPE_HIGH_PERFORMANCE,
78-
79-
/// Maximum performance, lowest quality.
80-
SUPER_RESOLUTION_OPTIMIZATION_TYPE_MAX_PERFORMANCE,
81-
82-
SUPER_RESOLUTION_OPTIMIZATION_TYPE_COUNT
83-
};
84-
8563
/// This structure describes the super resolution upscaler object and is part of the creation
8664
/// parameters given to ISuperResolutionFactory::CreateSuperResolution().
8765
struct SuperResolutionDesc DILIGENT_DERIVE(DeviceObjectAttribs)
@@ -149,40 +127,6 @@ struct SuperResolutionDesc DILIGENT_DERIVE(DeviceObjectAttribs)
149127
typedef struct SuperResolutionDesc SuperResolutionDesc;
150128

151129

152-
/// Attributes for querying the optimal source (input) settings for super resolution upscaling.
153-
///
154-
/// This structure is used by ISuperResolutionFactory::GetSourceSettings().
155-
struct SuperResolutionSourceSettingsAttribs
156-
{
157-
/// Unique identifier of the super resolution variant to create.
158-
///
159-
/// Must match one of the VariantIds reported by ISuperResolutionFactory::EnumerateVariants().
160-
INTERFACE_ID VariantId DEFAULT_INITIALIZER({});
161-
162-
/// Target (output) texture width. Must be greater than zero.
163-
Uint32 OutputWidth DEFAULT_INITIALIZER(0);
164-
165-
/// Target (output) texture height. Must be greater than zero.
166-
Uint32 OutputHeight DEFAULT_INITIALIZER(0);
167-
168-
/// Output texture format.
169-
///
170-
/// Some backends (e.g. DirectSR) may return different optimal input resolutions
171-
/// depending on the output format. When set to TEX_FORMAT_UNKNOWN, the backend will use a reasonable default.
172-
TEXTURE_FORMAT OutputFormat DEFAULT_INITIALIZER(TEX_FORMAT_UNKNOWN);
173-
174-
/// Flags controlling the super resolution behavior.
175-
///
176-
/// These flags affect the optimal source resolution returned by the backend.
177-
/// Must match the flags that will be used when creating the upscaler.
178-
SUPER_RESOLUTION_FLAGS Flags DEFAULT_INITIALIZER(SUPER_RESOLUTION_FLAG_NONE);
179-
180-
/// Optimization type controlling the quality/performance trade-off.
181-
SUPER_RESOLUTION_OPTIMIZATION_TYPE OptimizationType DEFAULT_INITIALIZER(SUPER_RESOLUTION_OPTIMIZATION_TYPE_BALANCED);
182-
};
183-
typedef struct SuperResolutionSourceSettingsAttribs SuperResolutionSourceSettingsAttribs;
184-
185-
186130
/// Super resolution execute attributes
187131

188132
/// This structure is used by ISuperResolution::Execute().

Graphics/SuperResolution/interface/SuperResolutionFactory.h

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,63 @@ struct SuperResolutionSourceSettings
166166
typedef struct SuperResolutionSourceSettings SuperResolutionSourceSettings;
167167

168168

169+
/// Super resolution optimization type.
170+
/// Defines the quality/performance trade-off for super resolution upscaling.
171+
DILIGENT_TYPED_ENUM(SUPER_RESOLUTION_OPTIMIZATION_TYPE, Uint8)
172+
{
173+
/// Maximum quality, lowest performance.
174+
SUPER_RESOLUTION_OPTIMIZATION_TYPE_MAX_QUALITY = 0u,
175+
176+
/// Favor quality over performance.
177+
SUPER_RESOLUTION_OPTIMIZATION_TYPE_HIGH_QUALITY,
178+
179+
/// Balanced quality/performance trade-off.
180+
SUPER_RESOLUTION_OPTIMIZATION_TYPE_BALANCED,
181+
182+
/// Favor performance over quality.
183+
SUPER_RESOLUTION_OPTIMIZATION_TYPE_HIGH_PERFORMANCE,
184+
185+
/// Maximum performance, lowest quality.
186+
SUPER_RESOLUTION_OPTIMIZATION_TYPE_MAX_PERFORMANCE,
187+
188+
SUPER_RESOLUTION_OPTIMIZATION_TYPE_COUNT
189+
};
190+
191+
192+
/// Attributes for querying the optimal source (input) settings for super resolution upscaling.
193+
///
194+
/// This structure is used by ISuperResolutionFactory::GetSourceSettings().
195+
struct SuperResolutionSourceSettingsAttribs
196+
{
197+
/// Unique identifier of the super resolution variant to create.
198+
///
199+
/// Must match one of the VariantIds reported by ISuperResolutionFactory::EnumerateVariants().
200+
INTERFACE_ID VariantId DEFAULT_INITIALIZER({});
201+
202+
/// Target (output) texture width. Must be greater than zero.
203+
Uint32 OutputWidth DEFAULT_INITIALIZER(0);
204+
205+
/// Target (output) texture height. Must be greater than zero.
206+
Uint32 OutputHeight DEFAULT_INITIALIZER(0);
207+
208+
/// Output texture format.
209+
///
210+
/// Some backends (e.g. DirectSR) may return different optimal input resolutions
211+
/// depending on the output format. When set to TEX_FORMAT_UNKNOWN, the backend will use a reasonable default.
212+
TEXTURE_FORMAT OutputFormat DEFAULT_INITIALIZER(TEX_FORMAT_UNKNOWN);
213+
214+
/// Flags controlling the super resolution behavior.
215+
///
216+
/// These flags affect the optimal source resolution returned by the backend.
217+
/// Must match the flags that will be used when creating the upscaler.
218+
SUPER_RESOLUTION_FLAGS Flags DEFAULT_INITIALIZER(SUPER_RESOLUTION_FLAG_NONE);
219+
220+
/// Optimization type controlling the quality/performance trade-off.
221+
SUPER_RESOLUTION_OPTIMIZATION_TYPE OptimizationType DEFAULT_INITIALIZER(SUPER_RESOLUTION_OPTIMIZATION_TYPE_BALANCED);
222+
};
223+
typedef struct SuperResolutionSourceSettingsAttribs SuperResolutionSourceSettingsAttribs;
224+
225+
169226
#define DILIGENT_INTERFACE_NAME ISuperResolutionFactory
170227
#include "../../../Primitives/interface/DefineInterfaceHelperMacros.h"
171228

0 commit comments

Comments
 (0)