mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-11-30 22:24:15 +01:00
[dxvk] DxvkBindingLayout -> DxvkPipelineLayout
This commit is contained in:
parent
e198bd2d55
commit
a1a7bb9092
@ -12,7 +12,7 @@ namespace dxvk {
|
||||
DxvkDescriptorSlotMapping slotMapping;
|
||||
cs->defineResourceSlots(slotMapping);
|
||||
|
||||
m_layout = new DxvkBindingLayout(m_vkd,
|
||||
m_layout = new DxvkPipelineLayout(m_vkd,
|
||||
slotMapping.bindingCount(),
|
||||
slotMapping.bindingInfos());
|
||||
|
||||
|
@ -35,7 +35,7 @@ namespace dxvk {
|
||||
* slots used by the pipeline.
|
||||
* \returns Pipeline layout
|
||||
*/
|
||||
Rc<DxvkBindingLayout> layout() const {
|
||||
Rc<DxvkPipelineLayout> layout() const {
|
||||
return m_layout;
|
||||
}
|
||||
|
||||
@ -53,7 +53,7 @@ namespace dxvk {
|
||||
const Rc<vk::DeviceFn> m_vkd;
|
||||
|
||||
Rc<DxvkPipelineCache> m_cache;
|
||||
Rc<DxvkBindingLayout> m_layout;
|
||||
Rc<DxvkPipelineLayout> m_layout;
|
||||
Rc<DxvkShaderModule> m_cs;
|
||||
|
||||
VkPipeline m_pipeline = VK_NULL_HANDLE;
|
||||
|
@ -1236,7 +1236,7 @@ namespace dxvk {
|
||||
|
||||
void DxvkContext::updateShaderResources(
|
||||
VkPipelineBindPoint bindPoint,
|
||||
const Rc<DxvkBindingLayout>& layout) {
|
||||
const Rc<DxvkPipelineLayout>& layout) {
|
||||
DxvkBindingState& bs =
|
||||
bindPoint == VK_PIPELINE_BIND_POINT_GRAPHICS
|
||||
? m_state.gp.state.bsBindingState
|
||||
@ -1323,7 +1323,7 @@ namespace dxvk {
|
||||
void DxvkContext::updateShaderDescriptors(
|
||||
VkPipelineBindPoint bindPoint,
|
||||
const DxvkBindingState& bindingState,
|
||||
const Rc<DxvkBindingLayout>& layout) {
|
||||
const Rc<DxvkPipelineLayout>& layout) {
|
||||
std::array<VkWriteDescriptorSet, MaxNumResourceSlots> writes;
|
||||
|
||||
const VkDescriptorSet dset =
|
||||
|
@ -541,12 +541,12 @@ namespace dxvk {
|
||||
|
||||
void updateShaderResources(
|
||||
VkPipelineBindPoint bindPoint,
|
||||
const Rc<DxvkBindingLayout>& layout);
|
||||
const Rc<DxvkPipelineLayout>& layout);
|
||||
|
||||
void updateShaderDescriptors(
|
||||
VkPipelineBindPoint bindPoint,
|
||||
const DxvkBindingState& bindingState,
|
||||
const Rc<DxvkBindingLayout>& layout);
|
||||
const Rc<DxvkPipelineLayout>& layout);
|
||||
|
||||
void updateDynamicState();
|
||||
void updateViewports();
|
||||
|
@ -50,7 +50,7 @@ namespace dxvk {
|
||||
if (gs != nullptr) gs ->defineResourceSlots(slotMapping);
|
||||
if (fs != nullptr) fs ->defineResourceSlots(slotMapping);
|
||||
|
||||
m_layout = new DxvkBindingLayout(m_vkd,
|
||||
m_layout = new DxvkPipelineLayout(m_vkd,
|
||||
slotMapping.bindingCount(),
|
||||
slotMapping.bindingInfos());
|
||||
|
||||
|
@ -107,7 +107,7 @@ namespace dxvk {
|
||||
* slots used by the pipeline.
|
||||
* \returns Pipeline layout
|
||||
*/
|
||||
Rc<DxvkBindingLayout> layout() const {
|
||||
Rc<DxvkPipelineLayout> layout() const {
|
||||
return m_layout;
|
||||
}
|
||||
|
||||
@ -133,7 +133,7 @@ namespace dxvk {
|
||||
const Rc<vk::DeviceFn> m_vkd;
|
||||
|
||||
Rc<DxvkPipelineCache> m_cache;
|
||||
Rc<DxvkBindingLayout> m_layout;
|
||||
Rc<DxvkPipelineLayout> m_layout;
|
||||
|
||||
Rc<DxvkShaderModule> m_vs;
|
||||
Rc<DxvkShaderModule> m_tcs;
|
||||
|
@ -41,7 +41,7 @@ namespace dxvk {
|
||||
}
|
||||
|
||||
|
||||
DxvkBindingLayout::DxvkBindingLayout(
|
||||
DxvkPipelineLayout::DxvkPipelineLayout(
|
||||
const Rc<vk::DeviceFn>& vkd,
|
||||
uint32_t bindingCount,
|
||||
const DxvkDescriptorSlot* bindingInfos)
|
||||
@ -73,7 +73,7 @@ namespace dxvk {
|
||||
|
||||
if (m_vkd->vkCreateDescriptorSetLayout(m_vkd->device(),
|
||||
&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;
|
||||
pipeInfo.sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO;
|
||||
@ -88,12 +88,12 @@ namespace dxvk {
|
||||
&pipeInfo, nullptr, &m_pipelineLayout) != VK_SUCCESS) {
|
||||
m_vkd->vkDestroyDescriptorSetLayout(
|
||||
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) {
|
||||
m_vkd->vkDestroyPipelineLayout(
|
||||
m_vkd->device(), m_pipelineLayout, nullptr);
|
||||
|
@ -104,16 +104,16 @@ namespace dxvk {
|
||||
* Describes shader resource bindings
|
||||
* for a graphics or compute pipeline.
|
||||
*/
|
||||
class DxvkBindingLayout : public RcObject {
|
||||
class DxvkPipelineLayout : public RcObject {
|
||||
|
||||
public:
|
||||
|
||||
DxvkBindingLayout(
|
||||
DxvkPipelineLayout(
|
||||
const Rc<vk::DeviceFn>& vkd,
|
||||
uint32_t bindingCount,
|
||||
const DxvkDescriptorSlot* bindingInfos);
|
||||
|
||||
~DxvkBindingLayout();
|
||||
~DxvkPipelineLayout();
|
||||
|
||||
/**
|
||||
* \brief Number of resource bindings
|
||||
|
Loading…
Reference in New Issue
Block a user