-
Notifications
You must be signed in to change notification settings - Fork 140
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[D3D11] Also made Domain shader a separate implementation.
D3D11DomainShader (aka tessellation-evaluation shader) has a separate implementation nopw, just like D3D11VertexShader. This provides the same proxy geometry shader when this shader stage is used for stream-output.
- Loading branch information
1 parent
b1e3378
commit 5ec2b8b
Showing
8 changed files
with
125 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* | ||
* D3D11DomainShader.cpp | ||
* | ||
* Copyright (c) 2015 Lukas Hermanns. All rights reserved. | ||
* Licensed under the terms of the BSD 3-Clause license (see LICENSE.txt). | ||
*/ | ||
|
||
#include "D3D11DomainShader.h" | ||
|
||
|
||
namespace LLGL | ||
{ | ||
|
||
|
||
D3D11DomainShader::D3D11DomainShader(ID3D11Device* device, const ShaderDescriptor& desc) : | ||
D3D11Shader { desc.type } | ||
{ | ||
if (BuildShader(device, desc)) | ||
{ | ||
/* Build optional proxy geometry shader if there are any output attributes */ | ||
if (!desc.vertex.outputAttribs.empty()) | ||
BuildProxyGeometryShader(device, desc, proxyGeomtryShader_); | ||
} | ||
if (desc.debugName != nullptr) | ||
SetDebugName(desc.debugName); | ||
} | ||
|
||
|
||
} // /namespace LLGL | ||
|
||
|
||
|
||
// ================================================================================ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
/* | ||
* D3D11DomainShader.h | ||
* | ||
* Copyright (c) 2015 Lukas Hermanns. All rights reserved. | ||
* Licensed under the terms of the BSD 3-Clause license (see LICENSE.txt). | ||
*/ | ||
|
||
#ifndef LLGL_D3D11_DOMAIN_SHADER_H | ||
#define LLGL_D3D11_DOMAIN_SHADER_H | ||
|
||
|
||
#include "D3D11Shader.h" | ||
|
||
|
||
namespace LLGL | ||
{ | ||
|
||
|
||
// The domain shader has its own implementation to store additional information, | ||
// optional proxy geometry-shader for stream-outputs that is. | ||
class D3D11DomainShader final : public D3D11Shader | ||
{ | ||
|
||
public: | ||
|
||
D3D11DomainShader(ID3D11Device* device, const ShaderDescriptor& desc); | ||
|
||
// Returns the proxy geometry shader for stream-output if there is one. | ||
inline const ComPtr<ID3D11GeometryShader>& GetProxyGeometryShader() const | ||
{ | ||
return proxyGeomtryShader_; | ||
} | ||
|
||
private: | ||
|
||
ComPtr<ID3D11GeometryShader> proxyGeomtryShader_; | ||
|
||
}; | ||
|
||
|
||
} // /namespace LLGL | ||
|
||
|
||
#endif | ||
|
||
|
||
|
||
// ================================================================================ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters