mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-03-03 07:29:14 +01:00
[d3d9] Return specific image view from GetSampleView
Lets us have pick the sRGB-ness of the view in one place. Needed for the next patch.
This commit is contained in:
parent
905d69e77b
commit
296aacb23e
@ -331,8 +331,8 @@ namespace dxvk {
|
|||||||
bool SetDirty(UINT Subresource, bool value) { return std::exchange(m_dirty[Subresource], value); }
|
bool SetDirty(UINT Subresource, bool value) { return std::exchange(m_dirty[Subresource], value); }
|
||||||
void MarkAllDirty() { for (uint32_t i = 0; i < m_dirty.size(); i++) m_dirty[i] = true; }
|
void MarkAllDirty() { for (uint32_t i = 0; i < m_dirty.size(); i++) m_dirty[i] = true; }
|
||||||
|
|
||||||
const D3D9ColorView& GetSampleView() const {
|
const Rc<DxvkImageView>& GetSampleView(bool srgb) const {
|
||||||
return m_sampleView;
|
return m_sampleView.Pick(srgb);
|
||||||
}
|
}
|
||||||
|
|
||||||
VkImageLayout DetermineRenderTargetLayout() const {
|
VkImageLayout DetermineRenderTargetLayout() const {
|
||||||
|
@ -4058,7 +4058,7 @@ namespace dxvk {
|
|||||||
void D3D9DeviceEx::GenerateMips(
|
void D3D9DeviceEx::GenerateMips(
|
||||||
D3D9CommonTexture* pResource) {
|
D3D9CommonTexture* pResource) {
|
||||||
EmitCs([
|
EmitCs([
|
||||||
cImageView = pResource->GetSampleView().Color
|
cImageView = pResource->GetSampleView(false)
|
||||||
] (DxvkContext* ctx) {
|
] (DxvkContext* ctx) {
|
||||||
ctx->generateMipmaps(cImageView);
|
ctx->generateMipmaps(cImageView);
|
||||||
});
|
});
|
||||||
@ -5289,7 +5289,7 @@ namespace dxvk {
|
|||||||
cColorSlot = colorSlot,
|
cColorSlot = colorSlot,
|
||||||
cDepthSlot = depthSlot,
|
cDepthSlot = depthSlot,
|
||||||
cDepth = commonTex->IsShadow(),
|
cDepth = commonTex->IsShadow(),
|
||||||
cImageView = commonTex->GetSampleView().Pick(srgb)
|
cImageView = commonTex->GetSampleView(srgb)
|
||||||
](DxvkContext* ctx) {
|
](DxvkContext* ctx) {
|
||||||
ctx->bindResourceView(cColorSlot, !cDepth ? cImageView : nullptr, nullptr);
|
ctx->bindResourceView(cColorSlot, !cDepth ? cImageView : nullptr, nullptr);
|
||||||
ctx->bindResourceView(cDepthSlot, cDepth ? cImageView : nullptr, nullptr);
|
ctx->bindResourceView(cDepthSlot, cDepth ? cImageView : nullptr, nullptr);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user