P4 to Git Change 1530931 by gandryey@gera-w8 on 2018/03/22 16:38:47

SWDEV-79445 - OCL generic changes and code clean-up
	- Prepare the changes to remove resource rename feature. Resource rename can substitute a low level memory object in the current resource with a different one in order to avoid GPU stalls on frequent CPU updates, like constant buffers or staging buffers. Renaming was necessary due to CAL and old HW limitations to manage suballocations and has some inefficiency with tiny updates and staging buffers.
	- This change removes renames usage from the constant buffer management

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palconstbuf.cpp#3 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palconstbuf.hpp#4 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palkernel.cpp#45 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palvirtual.cpp#78 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palvirtual.hpp#43 edit
Este cometimento está contido em:
foreman cometeu 2018-03-22 16:51:43 -04:00
1 ascendente 41404377b1
cometimento db04b3b295
5 ficheiros modificados
+95 -81

Não existem ficheiros que correspondam à sua pesquisa

+4 -7
Ver ficheiro
@@ -2803,18 +2803,15 @@ void VirtualGPU::waitEventLock(CommandBatch* cb) {
}
bool VirtualGPU::allocConstantBuffers() {
// Allocate/reallocate constant buffers
size_t minCbSize;
// GCN doesn't really have a limit
minCbSize = 256 * Ki;
// Allocate constant buffers, GCN doesn't really have a limit
static constexpr uint32_t MinCbSize = 256 * Ki;
uint i;
// Create/reallocate constant buffer resources
for (i = 0; i < MaxConstBuffersArguments; ++i) {
ConstBuffer* constBuf = new ConstBuffer(
*this, ((minCbSize + ConstBuffer::VectorSize - 1) / ConstBuffer::VectorSize));
ManagedBuffer* constBuf = new ManagedBuffer(*this, MinCbSize);
if ((constBuf != nullptr) && constBuf->create()) {
if ((constBuf != nullptr) && constBuf->create(Resource::RemoteUSWC, true)) {
addConstBuffer(constBuf);
} else {
// We failed to create a constant buffer