@@ -159,6 +159,7 @@ SProgramOutput* CShader::ProgramOutput()
159159
160160void CShader::EOTURBWrite ()
161161{
162+
162163 CEncoder& encoder = GetEncoder ();
163164 uint messageLength = 3 ;
164165
@@ -192,41 +193,29 @@ void CShader::EOTURBWrite()
192193 encoder.Push ();
193194}
194195
195- void CShader::EOTRenderTarget ()
196- {
197- // dummy render target to do EOT and free release the pixel scoreboard
198- EU_GEN6_DATA_PORT_RENDER_TARGET_WRITE_CONTROL msgControl =
199- (m_SIMDSize == SIMDMode::SIMD8)
200- ? EU_GEN6_DATA_PORT_RENDER_TARGET_WRITE_CONTROL_SIMD8_SINGLE_SOURCE_LOW
201- : EU_GEN6_DATA_PORT_RENDER_TARGET_WRITE_CONTROL_SIMD16_SINGLE_SOURCE;
202-
203- bool perCoarse = false ;
204- if (GetShaderType () == ShaderType::PIXEL_SHADER)
205- {
206- perCoarse = (static_cast <CPixelShader*>(this )->GetPhase () != PSPHASE_LEGACY);
207- }
208-
209- const uint Desc = PixelDataPort (
210- false ,
211- m_SIMDSize == SIMDMode::SIMD8 ? 4 : 8 ,
212- 0 ,
213- false ,
214- perCoarse,
215- false ,
216- true , // scoreboard release
217- false ,
218- msgControl,
219- m_pBtiLayout->GetNullSurfaceIdx ());
220-
221- // we don't want to update the usage mask for null surface, so set the buffer type to be unknown.
222- this ->SetBindingTableEntryCountAndBitmap (true , BUFFER_TYPE_UNKNOWN, 0 , m_pBtiLayout->GetNullSurfaceIdx ());
223-
224- constexpr uint nullRenderTargetBit = BIT (20 );
225- constexpr uint exDesc = EU_MESSAGE_TARGET_DATA_PORT_WRITE | cMessageExtendedDescriptorEOTBit | nullRenderTargetBit;
226-
227- CVariable* payload = GetNewVariable (
228- 4 * numLanes (m_SIMDSize), ISA_TYPE_UD, EALIGN_GRF, " EOTPayload" );
229- encoder.SendC (nullptr , payload, exDesc, ImmToVariable (Desc, ISA_TYPE_UD));
196+ void CShader::EOTRenderTarget (CVariable* r1, bool isPerCoarse)
197+ {
198+ CVariable* src[4 ] = { nullptr , nullptr , nullptr , nullptr };
199+ bool isUndefined[4 ] = { true , true , true , true };
200+ CVariable* const nullSurfaceBti = ImmToVariable (m_pBtiLayout->GetNullSurfaceIdx (), ISA_TYPE_D);
201+ CVariable* const blendStateIndex = ImmToVariable (0 , ISA_TYPE_D);
202+ SetBindingTableEntryCountAndBitmap (true , BUFFER_TYPE_UNKNOWN, 0 , m_pBtiLayout->GetNullSurfaceIdx ());
203+ encoder.RenderTargetWrite (
204+ src,
205+ isUndefined,
206+ true , // lastRenderTarget,
207+ false , // perSample,
208+ isPerCoarse, // coarseMode,
209+ false , // isHeaderMaskFromCe0,
210+ nullSurfaceBti,
211+ blendStateIndex,
212+ nullptr , // source0Alpha,
213+ nullptr , // oMaskOpnd,
214+ nullptr , // outputDepthOpnd,
215+ nullptr , // stencilOpnd,
216+ nullptr , // cpscounter,
217+ nullptr , // sampleIndex,
218+ r1);
230219 encoder.Push ();
231220}
232221
0 commit comments