mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-11-29 19:24:10 +01:00
[dxvk] Added support for vertex index types
This commit is contained in:
parent
be7a70a307
commit
a901a85401
@ -54,9 +54,13 @@ namespace dxvk {
|
||||
|
||||
|
||||
void DxvkContext::bindIndexBuffer(
|
||||
const DxvkBufferBinding& buffer) {
|
||||
if (m_state.vi.indexBuffer != buffer) {
|
||||
const DxvkBufferBinding& buffer,
|
||||
VkIndexType indexType) {
|
||||
if (m_state.vi.indexBuffer != buffer
|
||||
|| m_state.vi.indexType != indexType) {
|
||||
m_state.vi.indexBuffer = buffer;
|
||||
m_state.vi.indexType = indexType;
|
||||
|
||||
m_flags.set(DxvkContextFlag::GpDirtyIndexBuffer);
|
||||
}
|
||||
}
|
||||
@ -547,7 +551,7 @@ namespace dxvk {
|
||||
m_cmd->cmdBindIndexBuffer(
|
||||
m_state.vi.indexBuffer.bufferHandle(),
|
||||
m_state.vi.indexBuffer.bufferOffset(),
|
||||
VK_INDEX_TYPE_UINT32);
|
||||
m_state.vi.indexType);
|
||||
m_cmd->trackResource(
|
||||
m_state.vi.indexBuffer.resource());
|
||||
}
|
||||
|
@ -60,9 +60,11 @@ namespace dxvk {
|
||||
* The index buffer will be used when
|
||||
* issuing \c drawIndexed commands.
|
||||
* \param [in] buffer New index buffer
|
||||
* \param [in] indexType Index type
|
||||
*/
|
||||
void bindIndexBuffer(
|
||||
const DxvkBufferBinding& buffer);
|
||||
const DxvkBufferBinding& buffer,
|
||||
VkIndexType indexType);
|
||||
|
||||
/**
|
||||
* \brief Binds buffer as a shader resource
|
||||
|
@ -38,6 +38,8 @@ namespace dxvk {
|
||||
|
||||
struct DxvkVertexInputState {
|
||||
DxvkBufferBinding indexBuffer;
|
||||
VkIndexType indexType = VK_INDEX_TYPE_UINT32;
|
||||
|
||||
std::array<DxvkBufferBinding,
|
||||
DxvkLimits::MaxNumVertexBindings> vertexBuffers;
|
||||
std::array<uint32_t,
|
||||
|
Loading…
Reference in New Issue
Block a user