mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-01-30 20:52:11 +01:00
[dxvk] Implement getShader method for graphics pipelines
This commit is contained in:
parent
e5f3019524
commit
eff81c7edf
@ -81,6 +81,25 @@ namespace dxvk {
|
||||
}
|
||||
|
||||
|
||||
Rc<DxvkShader> DxvkGraphicsPipeline::getShader(
|
||||
VkShaderStageFlagBits stage) const {
|
||||
switch (stage) {
|
||||
case VK_SHADER_STAGE_VERTEX_BIT:
|
||||
return m_vs != nullptr ? m_vs->shader() : nullptr;
|
||||
case VK_SHADER_STAGE_GEOMETRY_BIT:
|
||||
return m_gs != nullptr ? m_gs->shader() : nullptr;
|
||||
case VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT:
|
||||
return m_tcs != nullptr ? m_tcs->shader() : nullptr;
|
||||
case VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT:
|
||||
return m_tes != nullptr ? m_tes->shader() : nullptr;
|
||||
case VK_SHADER_STAGE_FRAGMENT_BIT:
|
||||
return m_fs != nullptr ? m_fs->shader() : nullptr;
|
||||
default:
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
VkPipeline DxvkGraphicsPipeline::getPipelineHandle(
|
||||
const DxvkGraphicsPipelineStateInfo& state,
|
||||
const DxvkRenderPass& renderPass) {
|
||||
|
@ -168,6 +168,17 @@ namespace dxvk {
|
||||
return m_layout.ptr();
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Queries shader for a given stage
|
||||
*
|
||||
* In case no shader is specified for the
|
||||
* given stage, \c nullptr will be returned.
|
||||
* \param [in] stage The shader stage
|
||||
* \returns Shader of the given stage
|
||||
*/
|
||||
Rc<DxvkShader> getShader(
|
||||
VkShaderStageFlagBits stage) const;
|
||||
|
||||
/**
|
||||
* \brief Pipeline handle
|
||||
*
|
||||
|
Loading…
x
Reference in New Issue
Block a user