@@ -194,7 +194,7 @@ class DxilShaderReflection : public DxilModuleReflection,
194
194
DXC_MICROCOM_TM_ADDREF_RELEASE_IMPL ()
195
195
DXC_MICROCOM_TM_CTOR (DxilShaderReflection)
196
196
HRESULT STDMETHODCALLTYPE QueryInterface (REFIID iid,
197
- void **ppvObject) override {
197
+ void **ppvObject) noexcept override {
198
198
HRESULT hr = E_NOINTERFACE;
199
199
200
200
// There is non-standard handling of QueryInterface:
@@ -221,49 +221,50 @@ class DxilShaderReflection : public DxilModuleReflection,
221
221
const DxilPartHeader *pRDATPart);
222
222
223
223
// ID3D12ShaderReflection
224
- STDMETHODIMP GetDesc (D3D12_SHADER_DESC *pDesc) override ;
224
+ STDMETHODIMP GetDesc (D3D12_SHADER_DESC *pDesc) noexcept override ;
225
225
226
226
STDMETHODIMP_ (ID3D12ShaderReflectionConstantBuffer *)
227
- GetConstantBufferByIndex (UINT Index) override ;
227
+ GetConstantBufferByIndex (UINT Index) noexcept override ;
228
228
STDMETHODIMP_ (ID3D12ShaderReflectionConstantBuffer *)
229
- GetConstantBufferByName (LPCSTR Name) override ;
229
+ GetConstantBufferByName (LPCSTR Name) noexcept override ;
230
230
231
231
STDMETHODIMP
232
232
GetResourceBindingDesc (UINT ResourceIndex,
233
- D3D12_SHADER_INPUT_BIND_DESC *pDesc) override ;
234
-
235
- STDMETHODIMP
236
- GetInputParameterDesc ( UINT ParameterIndex,
237
- D3D12_SIGNATURE_PARAMETER_DESC *pDesc) override ;
238
- STDMETHODIMP
239
- GetOutputParameterDesc ( UINT ParameterIndex,
240
- D3D12_SIGNATURE_PARAMETER_DESC *pDesc) override ;
241
- STDMETHODIMP
242
- GetPatchConstantParameterDesc ( UINT ParameterIndex,
243
- D3D12_SIGNATURE_PARAMETER_DESC *pDesc) override ;
233
+ D3D12_SHADER_INPUT_BIND_DESC *pDesc) noexcept override ;
234
+
235
+ STDMETHODIMP GetInputParameterDesc (
236
+ UINT ParameterIndex,
237
+ D3D12_SIGNATURE_PARAMETER_DESC *pDesc) noexcept override ;
238
+ STDMETHODIMP GetOutputParameterDesc (
239
+ UINT ParameterIndex,
240
+ D3D12_SIGNATURE_PARAMETER_DESC *pDesc) noexcept override ;
241
+ STDMETHODIMP GetPatchConstantParameterDesc (
242
+ UINT ParameterIndex,
243
+ D3D12_SIGNATURE_PARAMETER_DESC *pDesc) noexcept override ;
244
244
245
245
STDMETHODIMP_ (ID3D12ShaderReflectionVariable *)
246
- GetVariableByName (LPCSTR Name) override ;
246
+ GetVariableByName (LPCSTR Name) noexcept override ;
247
247
248
- STDMETHODIMP
249
- GetResourceBindingDescByName (LPCSTR Name,
250
- D3D12_SHADER_INPUT_BIND_DESC *pDesc) override ;
248
+ STDMETHODIMP GetResourceBindingDescByName (
249
+ LPCSTR Name, D3D12_SHADER_INPUT_BIND_DESC *pDesc) noexcept override ;
251
250
252
- STDMETHODIMP_ (UINT) GetMovInstructionCount() override ;
253
- STDMETHODIMP_ (UINT) GetMovcInstructionCount() override ;
254
- STDMETHODIMP_ (UINT) GetConversionInstructionCount() override ;
255
- STDMETHODIMP_ (UINT) GetBitwiseInstructionCount() override ;
251
+ STDMETHODIMP_ (UINT) GetMovInstructionCount(THIS) noexcept override ;
252
+ STDMETHODIMP_ (UINT) GetMovcInstructionCount(THIS) noexcept override ;
253
+ STDMETHODIMP_ (UINT) GetConversionInstructionCount(THIS) noexcept override ;
254
+ STDMETHODIMP_ (UINT) GetBitwiseInstructionCount(THIS) noexcept override ;
256
255
257
- STDMETHODIMP_ (D3D_PRIMITIVE) GetGSInputPrimitive() override ;
258
- STDMETHODIMP_ (BOOL) IsSampleFrequencyShader() override ;
256
+ STDMETHODIMP_ (D3D_PRIMITIVE) GetGSInputPrimitive(THIS) noexcept override ;
257
+ STDMETHODIMP_ (BOOL) IsSampleFrequencyShader(THIS) noexcept override ;
259
258
260
- STDMETHODIMP_ (UINT) GetNumInterfaceSlots() override ;
261
- STDMETHODIMP GetMinFeatureLevel (enum D3D_FEATURE_LEVEL *pLevel) override ;
259
+ STDMETHODIMP_ (UINT) GetNumInterfaceSlots(THIS) noexcept override ;
260
+ STDMETHODIMP
261
+ GetMinFeatureLevel (D3D_FEATURE_LEVEL *pLevel) noexcept override ;
262
262
263
263
STDMETHODIMP_ (UINT)
264
- GetThreadGroupSize (UINT *pSizeX, UINT *pSizeY, UINT *pSizeZ) override ;
264
+ GetThreadGroupSize (UINT *pSizeX, UINT *pSizeY,
265
+ UINT *pSizeZ) noexcept override ;
265
266
266
- STDMETHODIMP_ (UINT64) GetRequiresFlags() override ;
267
+ STDMETHODIMP_ (UINT64) GetRequiresFlags(THIS) noexcept override ;
267
268
};
268
269
269
270
class CFunctionReflection ;
@@ -287,7 +288,7 @@ class DxilLibraryReflection : public DxilModuleReflection,
287
288
DXC_MICROCOM_TM_ADDREF_RELEASE_IMPL ()
288
289
DXC_MICROCOM_TM_CTOR (DxilLibraryReflection)
289
290
HRESULT STDMETHODCALLTYPE QueryInterface (REFIID iid,
290
- void **ppvObject) override {
291
+ void **ppvObject) noexcept override {
291
292
return DoBasicQueryInterface<ID3D12LibraryReflection>(this , iid, ppvObject);
292
293
}
293
294
@@ -2316,7 +2317,8 @@ HRESULT DxilShaderReflection::Load(const DxilProgramHeader *pProgramHeader,
2316
2317
CATCH_CPP_RETURN_HRESULT ();
2317
2318
}
2318
2319
2319
- HRESULT DxilShaderReflection::GetDesc (D3D12_SHADER_DESC *pDesc) {
2320
+ HRESULT
2321
+ DxilShaderReflection::GetDesc (D3D12_SHADER_DESC *pDesc) noexcept {
2320
2322
if (nullptr == pDesc)
2321
2323
return E_POINTER;
2322
2324
memcpy (pDesc, &m_Desc, sizeof (D3D12_SHADER_DESC));
@@ -2536,7 +2538,7 @@ void DxilShaderReflection::InitDesc() {
2536
2538
}
2537
2539
2538
2540
ID3D12ShaderReflectionConstantBuffer *
2539
- DxilShaderReflection::GetConstantBufferByIndex (UINT Index) {
2541
+ DxilShaderReflection::GetConstantBufferByIndex (UINT Index) noexcept {
2540
2542
return DxilModuleReflection::_GetConstantBufferByIndex (Index);
2541
2543
}
2542
2544
ID3D12ShaderReflectionConstantBuffer *
@@ -2548,7 +2550,7 @@ DxilModuleReflection::_GetConstantBufferByIndex(UINT Index) {
2548
2550
}
2549
2551
2550
2552
ID3D12ShaderReflectionConstantBuffer *
2551
- DxilShaderReflection::GetConstantBufferByName (LPCSTR Name) {
2553
+ DxilShaderReflection::GetConstantBufferByName (LPCSTR Name) noexcept {
2552
2554
return DxilModuleReflection::_GetConstantBufferByName (Name);
2553
2555
}
2554
2556
ID3D12ShaderReflectionConstantBuffer *
@@ -2575,7 +2577,7 @@ DxilModuleReflection::_GetConstantBufferByName(LPCSTR Name) {
2575
2577
}
2576
2578
2577
2579
HRESULT DxilShaderReflection::GetResourceBindingDesc (
2578
- UINT ResourceIndex, D3D12_SHADER_INPUT_BIND_DESC *pDesc) {
2580
+ UINT ResourceIndex, D3D12_SHADER_INPUT_BIND_DESC *pDesc) noexcept {
2579
2581
return DxilModuleReflection::_GetResourceBindingDesc (ResourceIndex, pDesc,
2580
2582
m_PublicAPI);
2581
2583
}
@@ -2593,7 +2595,7 @@ HRESULT DxilModuleReflection::_GetResourceBindingDesc(
2593
2595
}
2594
2596
2595
2597
HRESULT DxilShaderReflection::GetInputParameterDesc (
2596
- UINT ParameterIndex, D3D12_SIGNATURE_PARAMETER_DESC *pDesc) {
2598
+ UINT ParameterIndex, D3D12_SIGNATURE_PARAMETER_DESC *pDesc) noexcept {
2597
2599
IFRBOOL (pDesc != nullptr , E_INVALIDARG);
2598
2600
IFRBOOL (ParameterIndex < m_InputSignature.size (), E_INVALIDARG);
2599
2601
if (m_PublicAPI != PublicAPI::D3D11_43)
@@ -2608,7 +2610,7 @@ HRESULT DxilShaderReflection::GetInputParameterDesc(
2608
2610
}
2609
2611
2610
2612
HRESULT DxilShaderReflection::GetOutputParameterDesc (
2611
- UINT ParameterIndex, D3D12_SIGNATURE_PARAMETER_DESC *pDesc) {
2613
+ UINT ParameterIndex, D3D12_SIGNATURE_PARAMETER_DESC *pDesc) noexcept {
2612
2614
IFRBOOL (pDesc != nullptr , E_INVALIDARG);
2613
2615
IFRBOOL (ParameterIndex < m_OutputSignature.size (), E_INVALIDARG);
2614
2616
if (m_PublicAPI != PublicAPI::D3D11_43)
@@ -2622,8 +2624,9 @@ HRESULT DxilShaderReflection::GetOutputParameterDesc(
2622
2624
return S_OK;
2623
2625
}
2624
2626
2625
- HRESULT DxilShaderReflection::GetPatchConstantParameterDesc (
2626
- UINT ParameterIndex, D3D12_SIGNATURE_PARAMETER_DESC *pDesc) {
2627
+ HRESULT
2628
+ DxilShaderReflection::GetPatchConstantParameterDesc (
2629
+ UINT ParameterIndex, D3D12_SIGNATURE_PARAMETER_DESC *pDesc) noexcept {
2627
2630
IFRBOOL (pDesc != nullptr , E_INVALIDARG);
2628
2631
IFRBOOL (ParameterIndex < m_PatchConstantSignature.size (), E_INVALIDARG);
2629
2632
if (m_PublicAPI != PublicAPI::D3D11_43)
@@ -2638,7 +2641,7 @@ HRESULT DxilShaderReflection::GetPatchConstantParameterDesc(
2638
2641
}
2639
2642
2640
2643
ID3D12ShaderReflectionVariable *
2641
- DxilShaderReflection::GetVariableByName (LPCSTR Name) {
2644
+ DxilShaderReflection::GetVariableByName (LPCSTR Name) noexcept {
2642
2645
return DxilModuleReflection::_GetVariableByName (Name);
2643
2646
}
2644
2647
ID3D12ShaderReflectionVariable *
@@ -2657,7 +2660,7 @@ DxilModuleReflection::_GetVariableByName(LPCSTR Name) {
2657
2660
}
2658
2661
2659
2662
HRESULT DxilShaderReflection::GetResourceBindingDescByName (
2660
- LPCSTR Name, D3D12_SHADER_INPUT_BIND_DESC *pDesc) {
2663
+ LPCSTR Name, D3D12_SHADER_INPUT_BIND_DESC *pDesc) noexcept {
2661
2664
return DxilModuleReflection::_GetResourceBindingDescByName (Name, pDesc,
2662
2665
m_PublicAPI);
2663
2666
}
@@ -2679,32 +2682,34 @@ HRESULT DxilModuleReflection::_GetResourceBindingDescByName(
2679
2682
return HRESULT_FROM_WIN32 (ERROR_NOT_FOUND);
2680
2683
}
2681
2684
2682
- UINT DxilShaderReflection::GetMovInstructionCount () { return 0 ; }
2683
- UINT DxilShaderReflection::GetMovcInstructionCount () { return 0 ; }
2684
- UINT DxilShaderReflection::GetConversionInstructionCount () { return 0 ; }
2685
- UINT DxilShaderReflection::GetBitwiseInstructionCount () { return 0 ; }
2685
+ UINT DxilShaderReflection::GetMovInstructionCount () noexcept { return 0 ; }
2686
+ UINT DxilShaderReflection::GetMovcInstructionCount () noexcept { return 0 ; }
2687
+ UINT DxilShaderReflection::GetConversionInstructionCount () noexcept {
2688
+ return 0 ;
2689
+ }
2690
+ UINT DxilShaderReflection::GetBitwiseInstructionCount () noexcept { return 0 ; }
2686
2691
2687
- D3D_PRIMITIVE DxilShaderReflection::GetGSInputPrimitive () {
2692
+ D3D_PRIMITIVE DxilShaderReflection::GetGSInputPrimitive () noexcept {
2688
2693
if (!m_pDxilModule->GetShaderModel ()->IsGS ())
2689
2694
return D3D_PRIMITIVE::D3D10_PRIMITIVE_UNDEFINED;
2690
2695
return (D3D_PRIMITIVE)m_pDxilModule->GetInputPrimitive ();
2691
2696
}
2692
2697
2693
- BOOL DxilShaderReflection::IsSampleFrequencyShader () {
2698
+ BOOL DxilShaderReflection::IsSampleFrequencyShader () noexcept {
2694
2699
// TODO: determine correct value
2695
2700
return FALSE ;
2696
2701
}
2697
2702
2698
- UINT DxilShaderReflection::GetNumInterfaceSlots () { return 0 ; }
2703
+ UINT DxilShaderReflection::GetNumInterfaceSlots () noexcept { return 0 ; }
2699
2704
2700
2705
HRESULT
2701
- DxilShaderReflection::GetMinFeatureLevel (enum D3D_FEATURE_LEVEL *pLevel) {
2706
+ DxilShaderReflection::GetMinFeatureLevel (D3D_FEATURE_LEVEL *pLevel) noexcept {
2702
2707
IFR (AssignToOut (D3D_FEATURE_LEVEL_12_0, pLevel));
2703
2708
return S_OK;
2704
2709
}
2705
2710
2706
2711
UINT DxilShaderReflection::GetThreadGroupSize (UINT *pSizeX, UINT *pSizeY,
2707
- UINT *pSizeZ) {
2712
+ UINT *pSizeZ) noexcept {
2708
2713
if (!m_pDxilModule->GetShaderModel ()->IsCS () &&
2709
2714
!m_pDxilModule->GetShaderModel ()->IsMS () &&
2710
2715
!m_pDxilModule->GetShaderModel ()->IsAS ()) {
@@ -2722,7 +2727,7 @@ UINT DxilShaderReflection::GetThreadGroupSize(UINT *pSizeX, UINT *pSizeY,
2722
2727
return x * y * z;
2723
2728
}
2724
2729
2725
- UINT64 DxilShaderReflection::GetRequiresFlags () {
2730
+ UINT64 DxilShaderReflection::GetRequiresFlags () noexcept {
2726
2731
UINT64 result = m_pDxilModule->m_ShaderFlags .GetFeatureInfo ();
2727
2732
// FeatureInfo flags are identical, with the exception of a collision between:
2728
2733
// SHADER_FEATURE_COMPUTE_SHADERS_PLUS_RAW_AND_STRUCTURED_BUFFERS_VIA_SHADER_4_X
0 commit comments