1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-02-22 16:54:27 +01:00

[dxvk] Pass device to sampler constructor

This commit is contained in:
Philip Rebohle 2020-05-04 13:40:17 +02:00
parent a968f29754
commit 7b81db2c75
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99
3 changed files with 8 additions and 5 deletions

View File

@ -151,7 +151,7 @@ namespace dxvk {
Rc<DxvkSampler> DxvkDevice::createSampler( Rc<DxvkSampler> DxvkDevice::createSampler(
const DxvkSamplerCreateInfo& createInfo) { const DxvkSamplerCreateInfo& createInfo) {
return new DxvkSampler(m_vkd, createInfo); return new DxvkSampler(this, createInfo);
} }

View File

@ -1,11 +1,12 @@
#include "dxvk_sampler.h" #include "dxvk_sampler.h"
#include "dxvk_device.h"
namespace dxvk { namespace dxvk {
DxvkSampler::DxvkSampler( DxvkSampler::DxvkSampler(
const Rc<vk::DeviceFn>& vkd, DxvkDevice* device,
const DxvkSamplerCreateInfo& info) const DxvkSamplerCreateInfo& info)
: m_vkd(vkd) { : m_vkd(device->vkd()) {
VkSamplerCreateInfo samplerInfo; VkSamplerCreateInfo samplerInfo;
samplerInfo.sType = VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO; samplerInfo.sType = VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO;
samplerInfo.pNext = nullptr; samplerInfo.pNext = nullptr;

View File

@ -4,6 +4,8 @@
namespace dxvk { namespace dxvk {
class DxvkDevice;
/** /**
* \brief Sampler properties * \brief Sampler properties
*/ */
@ -51,7 +53,7 @@ namespace dxvk {
public: public:
DxvkSampler( DxvkSampler(
const Rc<vk::DeviceFn>& vkd, DxvkDevice* device,
const DxvkSamplerCreateInfo& info); const DxvkSamplerCreateInfo& info);
~DxvkSampler(); ~DxvkSampler();