mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 06:49:52 +08:00
Refactor getCmdSizeForPipelineSelect
Change-Id: Ib601974250d4a3576bf90d74ba36c4216c3cb1af Related-To: NEO-3457 Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
This commit is contained in:
@@ -612,6 +612,24 @@ size_t CommandStreamReceiverHw<GfxFamily>::getRequiredCmdStreamSize(const Dispat
|
||||
return size;
|
||||
}
|
||||
|
||||
template <typename GfxFamily>
|
||||
inline size_t CommandStreamReceiverHw<GfxFamily>::getCmdSizeForPipelineSelect() const {
|
||||
using PIPE_CONTROL = typename GfxFamily::PIPE_CONTROL;
|
||||
using PIPELINE_SELECT = typename GfxFamily::PIPELINE_SELECT;
|
||||
size_t size = 0;
|
||||
|
||||
if (csrSizeRequestFlags.mediaSamplerConfigChanged ||
|
||||
csrSizeRequestFlags.specialPipelineSelectModeChanged ||
|
||||
!isPreambleSent) {
|
||||
|
||||
size += sizeof(PIPELINE_SELECT);
|
||||
if (HardwareCommandsHelper<GfxFamily>::isPipeControlPriorToPipelineSelectWArequired(peekHwInfo())) {
|
||||
size += sizeof(PIPE_CONTROL);
|
||||
}
|
||||
}
|
||||
return size;
|
||||
}
|
||||
|
||||
template <typename GfxFamily>
|
||||
inline void CommandStreamReceiverHw<GfxFamily>::emitNoop(LinearStream &commandStream, size_t bytesToUpdate) {
|
||||
if (bytesToUpdate) {
|
||||
|
||||
@@ -53,14 +53,6 @@ void CommandStreamReceiverHw<GfxFamily>::programPipelineSelect(LinearStream &com
|
||||
}
|
||||
}
|
||||
|
||||
template <typename GfxFamily>
|
||||
inline size_t CommandStreamReceiverHw<GfxFamily>::getCmdSizeForPipelineSelect() const {
|
||||
if (csrSizeRequestFlags.mediaSamplerConfigChanged || !isPreambleSent) {
|
||||
return sizeof(typename GfxFamily::PIPELINE_SELECT);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
template <typename GfxFamily>
|
||||
void CommandStreamReceiverHw<GfxFamily>::createScratchSpaceController() {
|
||||
scratchSpaceController = std::make_unique<ScratchSpaceControllerBase>(executionEnvironment, *internalAllocationStorage.get());
|
||||
|
||||
Reference in New Issue
Block a user