Skip to content

Commit 55f10b5

Browse files
committed
dxPixEventWrapper: Provide dummy PIX_EVENT macro for OpenGL.
1 parent 68d49ab commit 55f10b5

File tree

5 files changed

+27
-18
lines changed

5 files changed

+27
-18
lines changed

src/Layers/xrRender/Debug/dxPixEventWrapper.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#define dxPixEventWrapper_included
33
#pragma once
44

5-
#ifdef DEBUG
5+
#if defined(DEBUG) && !defined(USE_OGL)
66

77
#define PIX_EVENT(Name) dxPixEventWrapper pixEvent##Name(L#Name)
88

src/Layers/xrRenderPC_GL/gl_R_render.cpp

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ IC bool pred_sp_sort (ISpatial* _1, ISpatial* _2)
1414

1515
void CRender::render_main (Fmatrix& m_ViewProjection, bool _fportals)
1616
{
17-
// PIX_EVENT(render_main);
17+
PIX_EVENT(render_main);
1818
// Msg ("---begin");
1919
marker ++;
2020

@@ -145,7 +145,7 @@ void CRender::render_main (Fmatrix& m_ViewProjection, bool _fportals)
145145

146146
void CRender::render_menu ()
147147
{
148-
// PIX_EVENT(render_menu);
148+
PIX_EVENT(render_menu);
149149
// Globals
150150
RCache.set_CullMode (CULL_CCW);
151151
RCache.set_Stencil (FALSE);
@@ -192,7 +192,7 @@ void CRender::render_menu ()
192192
extern u32 g_r;
193193
void CRender::Render ()
194194
{
195-
// PIX_EVENT(CRender_Render);
195+
PIX_EVENT(CRender_Render);
196196

197197
g_r = 1;
198198
VERIFY (0==mapDistort.size());
@@ -241,7 +241,7 @@ void CRender::Render ()
241241
//******* Z-prefill calc - DEFERRER RENDERER
242242
if (ps_r2_ls_flags.test(R2FLAG_ZFILL))
243243
{
244-
// PIX_EVENT(DEFER_Z_FILL);
244+
PIX_EVENT(DEFER_Z_FILL);
245245
BasicStats.Culling.Begin ();
246246
float z_distance = ps_r2_zfill ;
247247
Fmatrix m_zfill, m_project ;
@@ -311,7 +311,7 @@ void CRender::Render ()
311311
//******* Main render :: PART-0 -- first
312312
if (!split_the_scene_to_minimize_wait)
313313
{
314-
// PIX_EVENT(DEFER_PART0_NO_SPLIT);
314+
PIX_EVENT(DEFER_PART0_NO_SPLIT);
315315
// level, DO NOT SPLIT
316316
Target->phase_scene_begin ();
317317
r_dsgraph_render_hud ();
@@ -322,7 +322,7 @@ void CRender::Render ()
322322
}
323323
else
324324
{
325-
// PIX_EVENT(DEFER_PART0_SPLIT);
325+
PIX_EVENT(DEFER_PART0_SPLIT);
326326
// level, SPLIT
327327
Target->phase_scene_begin ();
328328
r_dsgraph_render_graph (0);
@@ -336,7 +336,7 @@ void CRender::Render ()
336336
if( RImplementation.o.dx10_msaa )
337337
RCache.set_ZB( RImplementation.Target->rt_MSAADepth->pZRT );
338338
{
339-
// PIX_EVENT(DEFER_TEST_LIGHT_VIS);
339+
PIX_EVENT(DEFER_TEST_LIGHT_VIS);
340340
// perform tests
341341
u32 count = 0;
342342
light_Package& LP = Lights.package;
@@ -377,7 +377,7 @@ void CRender::Render ()
377377
//******* Main render :: PART-1 (second)
378378
if (split_the_scene_to_minimize_wait)
379379
{
380-
// PIX_EVENT(DEFER_PART1_SPLIT);
380+
PIX_EVENT(DEFER_PART1_SPLIT);
381381
// skybox can be drawn here
382382
if (0)
383383
{
@@ -415,15 +415,15 @@ void CRender::Render ()
415415
// Wall marks
416416
if(Wallmarks)
417417
{
418-
// PIX_EVENT(DEFER_WALLMARKS);
418+
PIX_EVENT(DEFER_WALLMARKS);
419419
Target->phase_wallmarks ();
420420
g_r = 0;
421421
Wallmarks->Render (); // wallmarks has priority as normal geometry
422422
}
423423

424424
// Update incremental shadowmap-visibility solver
425425
{
426-
// PIX_EVENT(DEFER_FLUSH_OCCLUSION);
426+
PIX_EVENT(DEFER_FLUSH_OCCLUSION);
427427
u32 it=0;
428428
for (it=0; it<Lights_LastFrame.size(); it++) {
429429
if (0==Lights_LastFrame[it]) continue ;
@@ -440,21 +440,21 @@ void CRender::Render ()
440440
// full screen pass to mark msaa-edge pixels in highest stencil bit
441441
if( RImplementation.o.dx10_msaa )
442442
{
443-
// PIX_EVENT( MARK_MSAA_EDGES );
443+
PIX_EVENT( MARK_MSAA_EDGES );
444444
Target->mark_msaa_edges();
445445
}
446446

447447
// TODO: DX10: Implement DX10 rain.
448448
if (ps_r2_ls_flags.test(R3FLAG_DYN_WET_SURF))
449449
{
450-
// PIX_EVENT(DEFER_RAIN);
450+
PIX_EVENT(DEFER_RAIN);
451451
render_rain();
452452
}
453453

454454
// Directional light - fucking sun
455455
if (bSUN)
456456
{
457-
// PIX_EVENT(DEFER_SUN);
457+
PIX_EVENT(DEFER_SUN);
458458
RImplementation.Stats.l_visible ++;
459459
if( !ps_r2_ls_flags_ext.is(R2FLAGEXT_SUN_OLD))
460460
render_sun_cascades ();
@@ -468,7 +468,7 @@ void CRender::Render ()
468468
}
469469

470470
{
471-
// PIX_EVENT(DEFER_SELF_ILLUM);
471+
PIX_EVENT(DEFER_SELF_ILLUM);
472472
Target->phase_accumulator ();
473473
// Render emissive geometry, stencil - write 0x0 at pixel pos
474474
RCache.set_xform_project (Device.mProject);
@@ -486,21 +486,21 @@ void CRender::Render ()
486486

487487
// Lighting, non dependant on OCCQ
488488
{
489-
// PIX_EVENT(DEFER_LIGHT_NO_OCCQ);
489+
PIX_EVENT(DEFER_LIGHT_NO_OCCQ);
490490
Target->phase_accumulator ();
491491
HOM.Disable ();
492492
render_lights (LP_normal);
493493
}
494494

495495
// Lighting, dependant on OCCQ
496496
{
497-
// PIX_EVENT(DEFER_LIGHT_OCCQ);
497+
PIX_EVENT(DEFER_LIGHT_OCCQ);
498498
render_lights (LP_pending);
499499
}
500500

501501
// Postprocess
502502
{
503-
// PIX_EVENT(DEFER_LIGHT_COMBINE);
503+
PIX_EVENT(DEFER_LIGHT_COMBINE);
504504
Target->phase_combine ();
505505
}
506506

src/Layers/xrRenderPC_GL/stdafx.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#include <glbinding/gl/gl.h>
1616

1717
#include "Layers/xrRender/xrD3DDefs.h"
18+
#include "Layers/xrRender/Debug/dxPixEventWrapper.h"
1819

1920
#define R_GL 0
2021
#define R_R1 1

src/Layers/xrRenderPC_GL/xrRender_GL.vcxproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,7 @@
215215
<ClCompile Include="..\xrRenderGL\glTextureUtils.cpp" />
216216
<ClCompile Include="..\xrRender\ColorMapManager.cpp" />
217217
<ClCompile Include="..\xrRender\D3DUtils.cpp" />
218+
<ClCompile Include="..\xrRender\Debug\dxPixEventWrapper.cpp" />
218219
<ClCompile Include="..\xrRender\DetailManager_VS.cpp" />
219220
<ClCompile Include="..\xrRender\du_box.cpp" />
220221
<ClCompile Include="..\xrRender\du_cone.cpp" />
@@ -412,6 +413,7 @@
412413
<ClInclude Include="..\xrRender\ColorMapManager.h" />
413414
<ClInclude Include="..\xrRender\D3DUtils.h" />
414415
<ClInclude Include="..\xrRender\D3DXRenderBase.h" />
416+
<ClInclude Include="..\xrRender\Debug\dxPixEventWrapper.h" />
415417
<ClInclude Include="..\xrRender\du_box.h" />
416418
<ClInclude Include="..\xrRender\du_cone.h" />
417419
<ClInclude Include="..\xrRender\du_cylinder.h" />

src/Layers/xrRenderPC_GL/xrRender_GL.vcxproj.filters

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -663,6 +663,9 @@
663663
<ClCompile Include="glMinMaxSMBlender.cpp">
664664
<Filter>Shading templates</Filter>
665665
</ClCompile>
666+
<ClCompile Include="..\xrRender\Debug\dxPixEventWrapper.cpp">
667+
<Filter>Debug</Filter>
668+
</ClCompile>
666669
</ItemGroup>
667670
<ItemGroup>
668671
<ClInclude Include="stdafx.h">
@@ -1094,5 +1097,8 @@
10941097
<ClInclude Include="glMinMaxSMBlender.h">
10951098
<Filter>Shading templates</Filter>
10961099
</ClInclude>
1100+
<ClInclude Include="..\xrRender\Debug\dxPixEventWrapper.h">
1101+
<Filter>Debug</Filter>
1102+
</ClInclude>
10971103
</ItemGroup>
10981104
</Project>

0 commit comments

Comments
 (0)