|
@@ -1438,14 +1438,14 @@ class DX12Driver extends h3d.impl.Driver {
|
|
transition(b.vbuf, COPY_DEST);
|
|
transition(b.vbuf, COPY_DEST);
|
|
flushTransitions();
|
|
flushTransitions();
|
|
updateBuffer(b.vbuf, data, startVertex * b.format.strideBytes, vertexCount * b.format.strideBytes);
|
|
updateBuffer(b.vbuf, data, startVertex * b.format.strideBytes, vertexCount * b.format.strideBytes);
|
|
- transition(b.vbuf, b.flags.has(IndexBuffer) ? INDEX_BUFFER : VERTEX_AND_CONSTANT_BUFFER);
|
|
|
|
|
|
+ transition(b.vbuf, b.flags.has(IndexBuffer) ? INDEX_BUFFER : ((b.flags.has(ReadWriteBuffer)) ? UNORDERED_ACCESS : VERTEX_AND_CONSTANT_BUFFER));
|
|
}
|
|
}
|
|
|
|
|
|
override function uploadBufferBytes(b:Buffer, startVertex:Int, vertexCount:Int, buf:haxe.io.Bytes, bufPos:Int) {
|
|
override function uploadBufferBytes(b:Buffer, startVertex:Int, vertexCount:Int, buf:haxe.io.Bytes, bufPos:Int) {
|
|
transition(b.vbuf, COPY_DEST);
|
|
transition(b.vbuf, COPY_DEST);
|
|
flushTransitions();
|
|
flushTransitions();
|
|
updateBuffer(b.vbuf, @:privateAccess buf.b.offset(bufPos), startVertex * b.format.strideBytes, vertexCount * b.format.strideBytes);
|
|
updateBuffer(b.vbuf, @:privateAccess buf.b.offset(bufPos), startVertex * b.format.strideBytes, vertexCount * b.format.strideBytes);
|
|
- transition(b.vbuf, b.flags.has(IndexBuffer) ? INDEX_BUFFER : VERTEX_AND_CONSTANT_BUFFER);
|
|
|
|
|
|
+ transition(b.vbuf, b.flags.has(IndexBuffer) ? INDEX_BUFFER : ((b.flags.has(ReadWriteBuffer)) ? UNORDERED_ACCESS : VERTEX_AND_CONSTANT_BUFFER));
|
|
}
|
|
}
|
|
|
|
|
|
// ------------ TEXTURES -------
|
|
// ------------ TEXTURES -------
|