7b6c0331d1
SWDEV-77981 - Clean-up CAL map/unmap functionality - Keep map information only for SDMA copy. GSL map/unmap doesn't require any tracking - simplify the interface to return the address from map() Affected files ... ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuresource.cpp#229 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuresource.hpp#85 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gslbe/src/rt/EventQueue.h#7 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gslbe/src/rt/GSLContext.cpp#80 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gslbe/src/rt/GSLDevice.cpp#146 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gslbe/src/rt/GSLDevice.h#58 edit
55 行
1.3 KiB
C++
55 行
1.3 KiB
C++
#ifndef __EventQueue_h__
|
|
#define __EventQueue_h__
|
|
|
|
#include "backend.h"
|
|
#include "atitypes.h"
|
|
#include "gsl_types.h"
|
|
#include "gsl_config.h"
|
|
|
|
namespace gsl
|
|
{
|
|
class gsCtx;
|
|
};
|
|
|
|
enum EQManagerConfig
|
|
{
|
|
EQManager_HIGH = 512,
|
|
EQManager_LOW = 32
|
|
};
|
|
|
|
class EventQueue {
|
|
public:
|
|
static const unsigned int c_staticQueueSize = EQManager_HIGH;
|
|
EventQueue();
|
|
~EventQueue();
|
|
|
|
bool open(gsl::gsCtx* cs, gslQueryTarget target, EQManagerConfig config, uint32 engineMask = GSL_ENGINEMASK_ALL_BUT_UVD_VCE);
|
|
void close();
|
|
|
|
void begin();
|
|
uint32 end();
|
|
bool isDone(uint32 event);
|
|
bool waitForEvent(uint32 event, uint32 waitType);
|
|
bool flush();
|
|
|
|
private:
|
|
|
|
gsl::gsCtx* m_cs;
|
|
|
|
uint32 m_queueSize;
|
|
gslQueryTarget m_target;
|
|
uint32 m_engineMask; // EngineMask for this Query
|
|
uint32 m_tail; //represents the oldest event we have
|
|
uint32 m_headId;
|
|
uint32 m_latestRetired; //!< most recentyl retired event.
|
|
gslQueryObject m_queries[c_staticQueueSize];
|
|
bool m_flushed[c_staticQueueSize];
|
|
///////////////////////
|
|
// private functions //
|
|
///////////////////////
|
|
void setSlotCount(uint32 slotCount);
|
|
};
|
|
|
|
#endif
|
|
|