1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-12-05 01:24:14 +01:00

[dxvk] Remove null check when setting vertex stride

Move the responsibility to the front-end instead.
This commit is contained in:
Philip Rebohle 2022-02-19 13:22:46 +01:00
parent 8e11630370
commit 520d62903a
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99
2 changed files with 2 additions and 5 deletions

View File

@ -241,10 +241,6 @@ namespace dxvk {
m_state.vi.vertexBuffers[binding] = buffer;
m_flags.set(DxvkContextFlag::GpDirtyVertexBuffers);
if (unlikely(!buffer.defined())
&& unlikely(!m_features.test(DxvkContextFeature::NullDescriptors)))
stride = 0;
if (unlikely(m_state.vi.vertexStrides[binding] != stride)) {
m_state.vi.vertexStrides[binding] = stride;
m_flags.set(DxvkContextFlag::GpDirtyPipelineState);

View File

@ -156,6 +156,7 @@ namespace dxvk {
/**
* \brief Binds vertex buffer
*
* When binding a null buffer, stride must be 0.
* \param [in] binding Vertex buffer binding
* \param [in] buffer New vertex buffer
* \param [in] stride Stride between vertices
@ -164,7 +165,7 @@ namespace dxvk {
uint32_t binding,
const DxvkBufferSlice& buffer,
uint32_t stride);
/**
* \brief Binds transform feedback buffer
*