1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-12-01 07:24:12 +01:00

[dxvk] DxvkBindingLayout -> DxvkPipelineLayout

This commit is contained in:
Philip Rebohle 2018-01-23 17:40:36 +01:00
parent e198bd2d55
commit a1a7bb9092
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99
8 changed files with 17 additions and 17 deletions

View File

@ -12,7 +12,7 @@ namespace dxvk {
DxvkDescriptorSlotMapping slotMapping; DxvkDescriptorSlotMapping slotMapping;
cs->defineResourceSlots(slotMapping); cs->defineResourceSlots(slotMapping);
m_layout = new DxvkBindingLayout(m_vkd, m_layout = new DxvkPipelineLayout(m_vkd,
slotMapping.bindingCount(), slotMapping.bindingCount(),
slotMapping.bindingInfos()); slotMapping.bindingInfos());

View File

@ -35,7 +35,7 @@ namespace dxvk {
* slots used by the pipeline. * slots used by the pipeline.
* \returns Pipeline layout * \returns Pipeline layout
*/ */
Rc<DxvkBindingLayout> layout() const { Rc<DxvkPipelineLayout> layout() const {
return m_layout; return m_layout;
} }
@ -53,7 +53,7 @@ namespace dxvk {
const Rc<vk::DeviceFn> m_vkd; const Rc<vk::DeviceFn> m_vkd;
Rc<DxvkPipelineCache> m_cache; Rc<DxvkPipelineCache> m_cache;
Rc<DxvkBindingLayout> m_layout; Rc<DxvkPipelineLayout> m_layout;
Rc<DxvkShaderModule> m_cs; Rc<DxvkShaderModule> m_cs;
VkPipeline m_pipeline = VK_NULL_HANDLE; VkPipeline m_pipeline = VK_NULL_HANDLE;

View File

@ -1236,7 +1236,7 @@ namespace dxvk {
void DxvkContext::updateShaderResources( void DxvkContext::updateShaderResources(
VkPipelineBindPoint bindPoint, VkPipelineBindPoint bindPoint,
const Rc<DxvkBindingLayout>& layout) { const Rc<DxvkPipelineLayout>& layout) {
DxvkBindingState& bs = DxvkBindingState& bs =
bindPoint == VK_PIPELINE_BIND_POINT_GRAPHICS bindPoint == VK_PIPELINE_BIND_POINT_GRAPHICS
? m_state.gp.state.bsBindingState ? m_state.gp.state.bsBindingState
@ -1323,7 +1323,7 @@ namespace dxvk {
void DxvkContext::updateShaderDescriptors( void DxvkContext::updateShaderDescriptors(
VkPipelineBindPoint bindPoint, VkPipelineBindPoint bindPoint,
const DxvkBindingState& bindingState, const DxvkBindingState& bindingState,
const Rc<DxvkBindingLayout>& layout) { const Rc<DxvkPipelineLayout>& layout) {
std::array<VkWriteDescriptorSet, MaxNumResourceSlots> writes; std::array<VkWriteDescriptorSet, MaxNumResourceSlots> writes;
const VkDescriptorSet dset = const VkDescriptorSet dset =

View File

@ -541,12 +541,12 @@ namespace dxvk {
void updateShaderResources( void updateShaderResources(
VkPipelineBindPoint bindPoint, VkPipelineBindPoint bindPoint,
const Rc<DxvkBindingLayout>& layout); const Rc<DxvkPipelineLayout>& layout);
void updateShaderDescriptors( void updateShaderDescriptors(
VkPipelineBindPoint bindPoint, VkPipelineBindPoint bindPoint,
const DxvkBindingState& bindingState, const DxvkBindingState& bindingState,
const Rc<DxvkBindingLayout>& layout); const Rc<DxvkPipelineLayout>& layout);
void updateDynamicState(); void updateDynamicState();
void updateViewports(); void updateViewports();

View File

@ -50,7 +50,7 @@ namespace dxvk {
if (gs != nullptr) gs ->defineResourceSlots(slotMapping); if (gs != nullptr) gs ->defineResourceSlots(slotMapping);
if (fs != nullptr) fs ->defineResourceSlots(slotMapping); if (fs != nullptr) fs ->defineResourceSlots(slotMapping);
m_layout = new DxvkBindingLayout(m_vkd, m_layout = new DxvkPipelineLayout(m_vkd,
slotMapping.bindingCount(), slotMapping.bindingCount(),
slotMapping.bindingInfos()); slotMapping.bindingInfos());

View File

@ -107,7 +107,7 @@ namespace dxvk {
* slots used by the pipeline. * slots used by the pipeline.
* \returns Pipeline layout * \returns Pipeline layout
*/ */
Rc<DxvkBindingLayout> layout() const { Rc<DxvkPipelineLayout> layout() const {
return m_layout; return m_layout;
} }
@ -133,7 +133,7 @@ namespace dxvk {
const Rc<vk::DeviceFn> m_vkd; const Rc<vk::DeviceFn> m_vkd;
Rc<DxvkPipelineCache> m_cache; Rc<DxvkPipelineCache> m_cache;
Rc<DxvkBindingLayout> m_layout; Rc<DxvkPipelineLayout> m_layout;
Rc<DxvkShaderModule> m_vs; Rc<DxvkShaderModule> m_vs;
Rc<DxvkShaderModule> m_tcs; Rc<DxvkShaderModule> m_tcs;

View File

@ -41,7 +41,7 @@ namespace dxvk {
} }
DxvkBindingLayout::DxvkBindingLayout( DxvkPipelineLayout::DxvkPipelineLayout(
const Rc<vk::DeviceFn>& vkd, const Rc<vk::DeviceFn>& vkd,
uint32_t bindingCount, uint32_t bindingCount,
const DxvkDescriptorSlot* bindingInfos) const DxvkDescriptorSlot* bindingInfos)
@ -73,7 +73,7 @@ namespace dxvk {
if (m_vkd->vkCreateDescriptorSetLayout(m_vkd->device(), if (m_vkd->vkCreateDescriptorSetLayout(m_vkd->device(),
&dsetInfo, nullptr, &m_descriptorSetLayout) != VK_SUCCESS) &dsetInfo, nullptr, &m_descriptorSetLayout) != VK_SUCCESS)
throw DxvkError("DxvkBindingLayout: Failed to create descriptor set layout"); throw DxvkError("DxvkPipelineLayout: Failed to create descriptor set layout");
VkPipelineLayoutCreateInfo pipeInfo; VkPipelineLayoutCreateInfo pipeInfo;
pipeInfo.sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO; pipeInfo.sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO;
@ -88,12 +88,12 @@ namespace dxvk {
&pipeInfo, nullptr, &m_pipelineLayout) != VK_SUCCESS) { &pipeInfo, nullptr, &m_pipelineLayout) != VK_SUCCESS) {
m_vkd->vkDestroyDescriptorSetLayout( m_vkd->vkDestroyDescriptorSetLayout(
m_vkd->device(), m_descriptorSetLayout, nullptr); m_vkd->device(), m_descriptorSetLayout, nullptr);
throw DxvkError("DxvkBindingLayout: Failed to create pipeline layout"); throw DxvkError("DxvkPipelineLayout: Failed to create pipeline layout");
} }
} }
DxvkBindingLayout::~DxvkBindingLayout() { DxvkPipelineLayout::~DxvkPipelineLayout() {
if (m_pipelineLayout != VK_NULL_HANDLE) { if (m_pipelineLayout != VK_NULL_HANDLE) {
m_vkd->vkDestroyPipelineLayout( m_vkd->vkDestroyPipelineLayout(
m_vkd->device(), m_pipelineLayout, nullptr); m_vkd->device(), m_pipelineLayout, nullptr);

View File

@ -104,16 +104,16 @@ namespace dxvk {
* Describes shader resource bindings * Describes shader resource bindings
* for a graphics or compute pipeline. * for a graphics or compute pipeline.
*/ */
class DxvkBindingLayout : public RcObject { class DxvkPipelineLayout : public RcObject {
public: public:
DxvkBindingLayout( DxvkPipelineLayout(
const Rc<vk::DeviceFn>& vkd, const Rc<vk::DeviceFn>& vkd,
uint32_t bindingCount, uint32_t bindingCount,
const DxvkDescriptorSlot* bindingInfos); const DxvkDescriptorSlot* bindingInfos);
~DxvkBindingLayout(); ~DxvkPipelineLayout();
/** /**
* \brief Number of resource bindings * \brief Number of resource bindings