1
0
mirror of https://github.com/EduApps-CDG/OpenDX synced 2024-12-30 09:45:37 +01:00

[dxvk] Removed buffer stride stuff for now, we need a better solution

This commit is contained in:
Philip Rebohle 2017-12-07 19:28:54 +01:00
parent 27e63cbdc6
commit ade00add8d
5 changed files with 8 additions and 15 deletions

View File

@ -561,8 +561,7 @@ namespace dxvk {
} }
m_context->bindVertexBuffer( m_context->bindVertexBuffer(
StartSlot + i, dxvkBinding, StartSlot + i, dxvkBinding);
binding.stride);
} }
} }
@ -1286,6 +1285,7 @@ namespace dxvk {
// TODO D3D11 docs aren't clear about what should happen // TODO D3D11 docs aren't clear about what should happen
// when there are undefined scissor rects for a viewport. // when there are undefined scissor rects for a viewport.
// Figure out what it does on Windows. // Figure out what it does on Windows.
// FIXME Compute correct vertical position
if (enableScissorTest && (i < m_state.rs.numScissors)) { if (enableScissorTest && (i < m_state.rs.numScissors)) {
const D3D11_RECT& sr = m_state.rs.scissors.at(i); const D3D11_RECT& sr = m_state.rs.scissors.at(i);

View File

@ -373,10 +373,12 @@ namespace dxvk {
attributes.push_back(attrib); attributes.push_back(attrib);
// Create vertex input binding description. // Create vertex input binding description. The
// stride is dynamic state in D3D11 and will be
// set by D3D11DeviceContext::IASetVertexBuffers.
VkVertexInputBindingDescription binding; VkVertexInputBindingDescription binding;
binding.binding = pInputElementDescs[i].InputSlot; binding.binding = pInputElementDescs[i].InputSlot;
binding.stride = 12; binding.stride = 0;
binding.inputRate = VK_VERTEX_INPUT_RATE_VERTEX; binding.inputRate = VK_VERTEX_INPUT_RATE_VERTEX;
if (pInputElementDescs[i].InputSlotClass == D3D11_INPUT_PER_INSTANCE_DATA) { if (pInputElementDescs[i].InputSlotClass == D3D11_INPUT_PER_INSTANCE_DATA) {

View File

@ -183,17 +183,11 @@ namespace dxvk {
void DxvkContext::bindVertexBuffer( void DxvkContext::bindVertexBuffer(
uint32_t binding, uint32_t binding,
const DxvkBufferBinding& buffer, const DxvkBufferBinding& buffer) {
uint32_t stride) {
if (m_state.vi.vertexBuffers.at(binding) != buffer) { if (m_state.vi.vertexBuffers.at(binding) != buffer) {
m_state.vi.vertexBuffers.at(binding) = buffer; m_state.vi.vertexBuffers.at(binding) = buffer;
m_flags.set(DxvkContextFlag::GpDirtyVertexBuffers); m_flags.set(DxvkContextFlag::GpDirtyVertexBuffers);
} }
if (m_state.vi.vertexStrides.at(binding) != stride) {
m_state.vi.vertexStrides.at(binding) = stride;
m_flags.set(DxvkContextFlag::GpDirtyPipelineState);
}
} }

View File

@ -140,8 +140,7 @@ namespace dxvk {
*/ */
void bindVertexBuffer( void bindVertexBuffer(
uint32_t binding, uint32_t binding,
const DxvkBufferBinding& buffer, const DxvkBufferBinding& buffer);
uint32_t stride);
/** /**
* \brief Clears subresources of a color image * \brief Clears subresources of a color image

View File

@ -42,8 +42,6 @@ namespace dxvk {
std::array<DxvkBufferBinding, std::array<DxvkBufferBinding,
DxvkLimits::MaxNumVertexBindings> vertexBuffers; DxvkLimits::MaxNumVertexBindings> vertexBuffers;
std::array<uint32_t,
DxvkLimits::MaxNumVertexBindings> vertexStrides;
}; };