src/dawn_native/RenderPassEncoder.cpp
RenderPassEncoder::RenderPassEncoder(DeviceBase* device,
                                         CommandEncoder* commandEncoder,
                                         EncodingContext* encodingContext,
                                         PassResourceUsageTracker usageTracker,
                                         uint32_t renderTargetWidth,
                                         uint32_t renderTargetHeight)
        : RenderEncoderBase(device, encodingContext),
          mCommandEncoder(commandEncoder),
          mRenderTargetWidth(renderTargetWidth),
          mRenderTargetHeight(renderTargetHeight) {
        mUsageTracker = std::move(usageTracker);
    }
// The usage tracker is passed in here, because it is prepopulated with usages from the
// BeginRenderPassCmd. If we had RenderPassEncoder responsible for recording the
// command, then this wouldn't be necessary.
The usage tracker is passed in here, because it is prepopulated with usages from the
BeginRenderPassCmd. If we had RenderPassEncoder responsible for recording the
command, then this wouldn't be necessary.
The usage tracker is passed in here because it is prepopulated with usages from the BeginRenderPassCmd . If we had RenderPassEncoder responsible for recording the command then this wouldn ' t be necessary .
RenderPassEncoder::RenderPassEncoder(DeviceBase* device,
                                         CommandEncoder* commandEncoder,
                                         EncodingContext* encodingContext,
                                         PassResourceUsageTracker usageTracker,
                                         uint32_t renderTargetWidth,
                                         uint32_t renderTargetHeight)
        : RenderEncoderBase(device, encodingContext),
          mCommandEncoder(commandEncoder),
          mRenderTargetWidth(renderTargetWidth),
          mRenderTargetHeight(renderTargetHeight) {
        mUsageTracker = std::move(usageTracker);
    }
RenderPassEncoder :: RenderPassEncoder ( DeviceBase * device , CommandEncoder * commandEncoder , EncodingContext * encodingContext , PassResourceUsageTracker usageTracker , uint32_t renderTargetWidth , uint32_t renderTargetHeight ) : RenderEncoderBase ( device , encodingContext ) , mCommandEncoder ( commandEncoder ) , mRenderTargetWidth ( renderTargetWidth ) , mRenderTargetHeight ( renderTargetHeight ) { mUsageTracker = std :: move ( usageTracker ) ; }
The usage tracker is passed in here, because it is prepopulated with usages from the
BeginRenderPassCmd.
The usage tracker is passed in here because it is prepopulated with usages from the BeginRenderPassCmd .