mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-12-02 10:24:12 +01:00
[dxvk] Remove createImageView function
Use the image's method instead, like we already do for buffers.
This commit is contained in:
parent
a172cab34f
commit
01a7457a6f
@ -526,7 +526,7 @@ namespace dxvk {
|
||||
DxvkImageViewCreateInfo info = imageView->info();
|
||||
info.format = rawFormat;
|
||||
|
||||
imageView = m_device->createImageView(imageView->image(), info);
|
||||
imageView = imageView->image()->createView(info);
|
||||
}
|
||||
|
||||
EmitCs([
|
||||
|
@ -617,7 +617,7 @@ namespace dxvk {
|
||||
viewInfo.numLevels = 1;
|
||||
viewInfo.minLayer = 0;
|
||||
viewInfo.numLayers = 1;
|
||||
m_swapImageView = m_device->createImageView(m_swapImage, viewInfo);
|
||||
m_swapImageView = m_swapImage->createView(viewInfo);
|
||||
|
||||
// Initialize the image so that we can use it. Clearing
|
||||
// to black prevents garbled output for the first frame.
|
||||
|
@ -219,7 +219,7 @@ namespace dxvk {
|
||||
if (viewInfo.aspect != VK_IMAGE_ASPECT_COLOR_BIT)
|
||||
viewInfo.format = formatFamily.Formats[i];
|
||||
|
||||
m_views[i] = pDevice->GetDXVKDevice()->createImageView(dxvkImage, viewInfo);
|
||||
m_views[i] = dxvkImage->createView(viewInfo);
|
||||
}
|
||||
|
||||
m_isYCbCr = IsYCbCrFormat(resourceDesc.Format);
|
||||
@ -314,8 +314,7 @@ namespace dxvk {
|
||||
throw DxvkError("Invalid view dimension");
|
||||
}
|
||||
|
||||
m_view = pDevice->GetDXVKDevice()->createImageView(
|
||||
GetCommonTexture(pResource)->GetImage(), viewInfo);
|
||||
m_view = GetCommonTexture(pResource)->GetImage()->createView(viewInfo);
|
||||
}
|
||||
|
||||
|
||||
|
@ -99,8 +99,7 @@ namespace dxvk {
|
||||
m_info.Image.Aspects &= ~VK_IMAGE_ASPECT_STENCIL_BIT;
|
||||
|
||||
// Create the underlying image view object
|
||||
m_view = pDevice->GetDXVKDevice()->createImageView(
|
||||
GetCommonTexture(pResource)->GetImage(), viewInfo);
|
||||
m_view = GetCommonTexture(pResource)->GetImage()->createView(viewInfo);
|
||||
}
|
||||
|
||||
|
||||
|
@ -110,7 +110,7 @@ namespace dxvk {
|
||||
m_info.Image.NumLayers = viewInfo.numLayers;
|
||||
|
||||
// Create the underlying image view object
|
||||
m_view = pDevice->GetDXVKDevice()->createImageView(texture->GetImage(), viewInfo);
|
||||
m_view = texture->GetImage()->createView(viewInfo);
|
||||
}
|
||||
|
||||
|
||||
|
@ -176,7 +176,7 @@ namespace dxvk {
|
||||
m_info.Image.NumLayers = viewInfo.numLayers;
|
||||
|
||||
// Create the underlying image view object
|
||||
m_imageView = pDevice->GetDXVKDevice()->createImageView(texture->GetImage(), viewInfo);
|
||||
m_imageView = texture->GetImage()->createView(viewInfo);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -121,8 +121,7 @@ namespace dxvk {
|
||||
m_info.Image.NumLevels = viewInfo.numLevels;
|
||||
m_info.Image.NumLayers = viewInfo.numLayers;
|
||||
|
||||
m_imageView = pDevice->GetDXVKDevice()->createImageView(
|
||||
GetCommonTexture(pResource)->GetImage(), viewInfo);
|
||||
m_imageView = GetCommonTexture(pResource)->GetImage()->createView(viewInfo);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -663,7 +663,7 @@ namespace dxvk {
|
||||
VK_COMPONENT_SWIZZLE_IDENTITY, VK_COMPONENT_SWIZZLE_IDENTITY };
|
||||
|
||||
// Create the underlying image view object
|
||||
return m_device->GetDXVKDevice()->createImageView(GetImage(), viewInfo);
|
||||
return GetImage()->createView(viewInfo);
|
||||
}
|
||||
|
||||
|
||||
|
@ -85,7 +85,7 @@ namespace dxvk {
|
||||
imageViewInfo.numLevels = 1;
|
||||
imageViewInfo.minLayer = dstSubresource.baseArrayLayer;
|
||||
imageViewInfo.numLayers = dstSubresource.layerCount;
|
||||
auto tmpImageView = m_device->createImageView(dstImage, imageViewInfo);
|
||||
auto tmpImageView = dstImage->createView(imageViewInfo);
|
||||
|
||||
VkExtent3D imageExtent = dstImage->mipLevelExtent(dstSubresource.mipLevel);
|
||||
imageExtent = VkExtent3D{ imageExtent.width / macroPixelRun.width,
|
||||
|
@ -3919,7 +3919,7 @@ namespace dxvk {
|
||||
if (dstImage->mipLevelExtent(dstSubresource.mipLevel) != dstExtent)
|
||||
return false;
|
||||
|
||||
auto view = m_device->createImageView(dstImage, viewInfo);
|
||||
auto view = dstImage->createView(viewInfo);
|
||||
this->deferClear(view, srcSubresource.aspectMask, clear->clearValue);
|
||||
return true;
|
||||
}
|
||||
|
@ -171,13 +171,6 @@ namespace dxvk {
|
||||
}
|
||||
|
||||
|
||||
Rc<DxvkImageView> DxvkDevice::createImageView(
|
||||
const Rc<DxvkImage>& image,
|
||||
const DxvkImageViewCreateInfo& createInfo) {
|
||||
return image->createView(createInfo);
|
||||
}
|
||||
|
||||
|
||||
Rc<DxvkSampler> DxvkDevice::createSampler(
|
||||
const DxvkSamplerCreateInfo& createInfo) {
|
||||
return new DxvkSampler(this, createInfo);
|
||||
|
@ -323,17 +323,6 @@ namespace dxvk {
|
||||
const DxvkImageCreateInfo& createInfo,
|
||||
VkMemoryPropertyFlags memoryType);
|
||||
|
||||
/**
|
||||
* \brief Creates an image view
|
||||
*
|
||||
* \param [in] image The image to create a view for
|
||||
* \param [in] createInfo Image view create info
|
||||
* \returns The image view
|
||||
*/
|
||||
Rc<DxvkImageView> createImageView(
|
||||
const Rc<DxvkImage>& image,
|
||||
const DxvkImageViewCreateInfo& createInfo);
|
||||
|
||||
/**
|
||||
* \brief Creates a sampler object
|
||||
*
|
||||
|
@ -267,7 +267,7 @@ namespace dxvk {
|
||||
viewInfo.minLayer = 0;
|
||||
viewInfo.numLayers = 1;
|
||||
|
||||
m_gammaView = m_device->createImageView(m_gammaImage, viewInfo);
|
||||
m_gammaView = m_gammaImage->createView(viewInfo);
|
||||
}
|
||||
|
||||
ctx->invalidateBuffer(m_gammaBuffer, std::move(m_gammaSlice));
|
||||
@ -380,7 +380,7 @@ namespace dxvk {
|
||||
viewInfo.numLevels = 1;
|
||||
viewInfo.minLayer = 0;
|
||||
viewInfo.numLayers = 1;
|
||||
m_resolveView = m_device->createImageView(m_resolveImage, viewInfo);
|
||||
m_resolveView = m_resolveImage->createView(viewInfo);
|
||||
}
|
||||
|
||||
|
||||
|
@ -316,7 +316,7 @@ namespace dxvk::hud {
|
||||
info.minLayer = 0;
|
||||
info.numLayers = 1;
|
||||
|
||||
return m_device->createImageView(m_fontImage, info);
|
||||
return m_fontImage->createView(info);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user