mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-03-02 22:29:16 +01:00
[d3d11] Remove default sampler
This is handled in the backend now.
This commit is contained in:
parent
b8e49f1eb8
commit
6d75178870
@ -32,10 +32,6 @@ namespace dxvk {
|
|||||||
m_defaultDepthStencilState = static_cast<D3D11DepthStencilState*>(defaultDepthStencilState.ptr());
|
m_defaultDepthStencilState = static_cast<D3D11DepthStencilState*>(defaultDepthStencilState.ptr());
|
||||||
m_defaultRasterizerState = static_cast<D3D11RasterizerState*> (defaultRasterizerState.ptr());
|
m_defaultRasterizerState = static_cast<D3D11RasterizerState*> (defaultRasterizerState.ptr());
|
||||||
|
|
||||||
// Create a default sampler that we're going to bind
|
|
||||||
// when the application binds null to a sampler slot.
|
|
||||||
m_defaultSampler = CreateDefaultSampler();
|
|
||||||
|
|
||||||
EmitCs([
|
EmitCs([
|
||||||
dev = m_device,
|
dev = m_device,
|
||||||
bsState = m_defaultBlendState,
|
bsState = m_defaultBlendState,
|
||||||
@ -1994,7 +1990,7 @@ namespace dxvk {
|
|||||||
cSlotId = slotId + i,
|
cSlotId = slotId + i,
|
||||||
cSampler = sampler != nullptr
|
cSampler = sampler != nullptr
|
||||||
? sampler->GetDXVKSampler()
|
? sampler->GetDXVKSampler()
|
||||||
: m_defaultSampler
|
: nullptr
|
||||||
] (DxvkContext* ctx) {
|
] (DxvkContext* ctx) {
|
||||||
ctx->bindResourceSampler(cSlotId, cSampler);
|
ctx->bindResourceSampler(cSlotId, cSampler);
|
||||||
});
|
});
|
||||||
@ -2191,27 +2187,6 @@ namespace dxvk {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Rc<DxvkSampler> D3D11DeviceContext::CreateDefaultSampler() {
|
|
||||||
DxvkSamplerCreateInfo info;
|
|
||||||
info.minFilter = VK_FILTER_LINEAR;
|
|
||||||
info.magFilter = VK_FILTER_LINEAR;
|
|
||||||
info.mipmapMode = VK_SAMPLER_MIPMAP_MODE_LINEAR;
|
|
||||||
info.mipmapLodBias = 0.0f;
|
|
||||||
info.mipmapLodMin = -256.0f;
|
|
||||||
info.mipmapLodMax = 256.0f;
|
|
||||||
info.useAnisotropy = VK_FALSE;
|
|
||||||
info.maxAnisotropy = 1.0f;
|
|
||||||
info.addressModeU = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE;
|
|
||||||
info.addressModeV = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE;
|
|
||||||
info.addressModeW = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE;
|
|
||||||
info.compareToDepth = VK_FALSE;
|
|
||||||
info.compareOp = VK_COMPARE_OP_NEVER;
|
|
||||||
info.borderColor = VK_BORDER_COLOR_FLOAT_OPAQUE_WHITE;
|
|
||||||
info.usePixelCoord = VK_FALSE;
|
|
||||||
return m_device->createSampler(info);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
DxvkDataSlice D3D11DeviceContext::AllocUpdateBufferSlice(size_t Size) {
|
DxvkDataSlice D3D11DeviceContext::AllocUpdateBufferSlice(size_t Size) {
|
||||||
constexpr size_t UpdateBufferSize = 4 * 1024 * 1024;
|
constexpr size_t UpdateBufferSize = 4 * 1024 * 1024;
|
||||||
|
|
||||||
|
@ -519,7 +519,6 @@ namespace dxvk {
|
|||||||
|
|
||||||
Rc<DxvkDevice> m_device;
|
Rc<DxvkDevice> m_device;
|
||||||
Rc<DxvkCsChunk> m_csChunk;
|
Rc<DxvkCsChunk> m_csChunk;
|
||||||
Rc<DxvkSampler> m_defaultSampler;
|
|
||||||
Rc<DxvkDataBuffer> m_updateBuffer;
|
Rc<DxvkDataBuffer> m_updateBuffer;
|
||||||
|
|
||||||
Com<D3D11BlendState> m_defaultBlendState;
|
Com<D3D11BlendState> m_defaultBlendState;
|
||||||
@ -564,8 +563,6 @@ namespace dxvk {
|
|||||||
|
|
||||||
void ApplyViewportState();
|
void ApplyViewportState();
|
||||||
|
|
||||||
Rc<DxvkSampler> CreateDefaultSampler();
|
|
||||||
|
|
||||||
DxvkDataSlice AllocUpdateBufferSlice(size_t Size);
|
DxvkDataSlice AllocUpdateBufferSlice(size_t Size);
|
||||||
|
|
||||||
template<typename Cmd>
|
template<typename Cmd>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user