binding: rename descriptor region to descriptor pool
This should be trivial, except that the intel driver has intel_desc_pool
internally. Exchange the names of intel_desc_pool and intel_desc_region.
diff --git a/tests/xglrenderframework.cpp b/tests/xglrenderframework.cpp
index a2ad76f..67f4d7a 100644
--- a/tests/xglrenderframework.cpp
+++ b/tests/xglrenderframework.cpp
@@ -328,12 +328,12 @@
void XglDescriptorSetObj::CreateXGLDescriptorSet(XglCommandBufferObj *cmdBuffer)
{
- // create XGL_DESCRIPTOR_REGION
- XGL_DESCRIPTOR_REGION_CREATE_INFO region = {};
- region.sType = XGL_STRUCTURE_TYPE_DESCRIPTOR_REGION_CREATE_INFO;
- region.count = m_type_counts.size();
- region.pTypeCount = &m_type_counts[0];
- init(*m_device, XGL_DESCRIPTOR_REGION_USAGE_ONE_SHOT, 1, region);
+ // create XGL_DESCRIPTOR_POOL
+ XGL_DESCRIPTOR_POOL_CREATE_INFO pool = {};
+ pool.sType = XGL_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO;
+ pool.count = m_type_counts.size();
+ pool.pTypeCount = &m_type_counts[0];
+ init(*m_device, XGL_DESCRIPTOR_POOL_USAGE_ONE_SHOT, 1, pool);
// create XGL_DESCRIPTOR_SET_LAYOUT
vector<XGL_DESCRIPTOR_SET_LAYOUT_CREATE_INFO> layout;
@@ -380,10 +380,10 @@
NULL;
// do the updates
- m_device->begin_descriptor_region_update(XGL_DESCRIPTOR_UPDATE_MODE_FASTEST);
+ m_device->begin_descriptor_pool_update(XGL_DESCRIPTOR_UPDATE_MODE_FASTEST);
clear_sets(*m_set);
m_set->update(chain);
- m_device->end_descriptor_region_update(*cmdBuffer);
+ m_device->end_descriptor_pool_update(*cmdBuffer);
}
XglImage::XglImage(XglDevice *dev)
diff --git a/tests/xglrenderframework.h b/tests/xglrenderframework.h
index 00343a0..1c8da22 100644
--- a/tests/xglrenderframework.h
+++ b/tests/xglrenderframework.h
@@ -307,7 +307,7 @@
};
-class XglDescriptorSetObj : public xgl_testing::DescriptorRegion
+class XglDescriptorSetObj : public xgl_testing::DescriptorPool
{
public:
XglDescriptorSetObj(XglDevice *device);
diff --git a/tests/xgltestbinding.cpp b/tests/xgltestbinding.cpp
index f92faae..1331d00 100644
--- a/tests/xgltestbinding.cpp
+++ b/tests/xgltestbinding.cpp
@@ -503,14 +503,14 @@
return err;
}
-void Device::begin_descriptor_region_update(XGL_DESCRIPTOR_UPDATE_MODE mode)
+void Device::begin_descriptor_pool_update(XGL_DESCRIPTOR_UPDATE_MODE mode)
{
- EXPECT(xglBeginDescriptorRegionUpdate(obj(), mode) == XGL_SUCCESS);
+ EXPECT(xglBeginDescriptorPoolUpdate(obj(), mode) == XGL_SUCCESS);
}
-void Device::end_descriptor_region_update(CmdBuffer &cmd)
+void Device::end_descriptor_pool_update(CmdBuffer &cmd)
{
- EXPECT(xglEndDescriptorRegionUpdate(obj(), cmd.obj()) == XGL_SUCCESS);
+ EXPECT(xglEndDescriptorPoolUpdate(obj(), cmd.obj()) == XGL_SUCCESS);
}
void Queue::submit(const std::vector<const CmdBuffer *> &cmds, const std::vector<XGL_MEMORY_REF> &mem_refs, Fence &fence)
@@ -836,19 +836,19 @@
init(dev, XGL_SHADER_STAGE_FLAGS_ALL, std::vector<uint32_t>(1, bind_point), prior_layout, info);
}
-void DescriptorRegion::init(const Device &dev, XGL_DESCRIPTOR_REGION_USAGE usage,
- uint32_t max_sets, const XGL_DESCRIPTOR_REGION_CREATE_INFO &info)
+void DescriptorPool::init(const Device &dev, XGL_DESCRIPTOR_POOL_USAGE usage,
+ uint32_t max_sets, const XGL_DESCRIPTOR_POOL_CREATE_INFO &info)
{
- DERIVED_OBJECT_INIT(xglCreateDescriptorRegion, dev.obj(), usage, max_sets, &info);
+ DERIVED_OBJECT_INIT(xglCreateDescriptorPool, dev.obj(), usage, max_sets, &info);
alloc_memory(dev);
}
-void DescriptorRegion::clear()
+void DescriptorPool::clear()
{
- EXPECT(xglClearDescriptorRegion(obj()) == XGL_SUCCESS);
+ EXPECT(xglClearDescriptorPool(obj()) == XGL_SUCCESS);
}
-std::vector<DescriptorSet *> DescriptorRegion::alloc_sets(XGL_DESCRIPTOR_SET_USAGE usage, const std::vector<const DescriptorSetLayout *> &layouts)
+std::vector<DescriptorSet *> DescriptorPool::alloc_sets(XGL_DESCRIPTOR_SET_USAGE usage, const std::vector<const DescriptorSetLayout *> &layouts)
{
const std::vector<XGL_DESCRIPTOR_SET_LAYOUT> layout_objs = make_objects<XGL_DESCRIPTOR_SET_LAYOUT>(layouts);
@@ -871,18 +871,18 @@
return sets;
}
-std::vector<DescriptorSet *> DescriptorRegion::alloc_sets(XGL_DESCRIPTOR_SET_USAGE usage, const DescriptorSetLayout &layout, uint32_t count)
+std::vector<DescriptorSet *> DescriptorPool::alloc_sets(XGL_DESCRIPTOR_SET_USAGE usage, const DescriptorSetLayout &layout, uint32_t count)
{
return alloc_sets(usage, std::vector<const DescriptorSetLayout *>(count, &layout));
}
-DescriptorSet *DescriptorRegion::alloc_sets(XGL_DESCRIPTOR_SET_USAGE usage, const DescriptorSetLayout &layout)
+DescriptorSet *DescriptorPool::alloc_sets(XGL_DESCRIPTOR_SET_USAGE usage, const DescriptorSetLayout &layout)
{
std::vector<DescriptorSet *> set = alloc_sets(usage, layout, 1);
return (set.empty()) ? NULL : set[0];
}
-void DescriptorRegion::clear_sets(const std::vector<DescriptorSet *> &sets)
+void DescriptorPool::clear_sets(const std::vector<DescriptorSet *> &sets)
{
const std::vector<XGL_DESCRIPTOR_SET> set_objs = make_objects<XGL_DESCRIPTOR_SET>(sets);
xglClearDescriptorSets(obj(), set_objs.size(), &set_objs[0]);
diff --git a/tests/xgltestbinding.h b/tests/xgltestbinding.h
index 023dcfb..36352b4 100644
--- a/tests/xgltestbinding.h
+++ b/tests/xgltestbinding.h
@@ -54,7 +54,7 @@
class PipelineDelta;
class Sampler;
class DescriptorSetLayout;
-class DescriptorSetRegion;
+class DescriptorSetPool;
class DescriptorSet;
class DynamicVpStateObject;
class DynamicRsStateObject;
@@ -227,10 +227,10 @@
XGL_RESULT wait(const std::vector<const Fence *> &fences, bool wait_all, uint64_t timeout);
XGL_RESULT wait(const Fence &fence) { return wait(std::vector<const Fence *>(1, &fence), true, (uint64_t) -1); }
- // xglBeginDescriptorRegionUpdate()
- // xglEndDescriptorRegionUpdate()
- void begin_descriptor_region_update(XGL_DESCRIPTOR_UPDATE_MODE mode);
- void end_descriptor_region_update(CmdBuffer &cmd);
+ // xglBeginDescriptorPoolUpdate()
+ // xglEndDescriptorPoolUpdate()
+ void begin_descriptor_pool_update(XGL_DESCRIPTOR_UPDATE_MODE mode);
+ void end_descriptor_pool_update(CmdBuffer &cmd);
private:
enum QueueIndex {
@@ -511,13 +511,13 @@
const XGL_DESCRIPTOR_SET_LAYOUT_CREATE_INFO &info) { init(dev, bind_point, DescriptorSetLayout(), info); }
};
-class DescriptorRegion : public DerivedObject<XGL_DESCRIPTOR_REGION, Object> {
+class DescriptorPool : public DerivedObject<XGL_DESCRIPTOR_POOL, Object> {
public:
- // xglCreateDescriptorRegion()
- void init(const Device &dev, XGL_DESCRIPTOR_REGION_USAGE usage,
- uint32_t max_sets, const XGL_DESCRIPTOR_REGION_CREATE_INFO &info);
+ // xglCreateDescriptorPool()
+ void init(const Device &dev, XGL_DESCRIPTOR_POOL_USAGE usage,
+ uint32_t max_sets, const XGL_DESCRIPTOR_POOL_CREATE_INFO &info);
- // xglClearDescriptorRegion()
+ // xglClearDescriptorPool()
void clear();
// xglAllocDescriptorSets()