Skip to content

Commit

Permalink
dxPixEventWrapper: Provide dummy PIX_EVENT macro for OpenGL.
Browse files Browse the repository at this point in the history
  • Loading branch information
CrossVR committed Nov 24, 2015
1 parent 68d49ab commit 55f10b5
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 18 deletions.
2 changes: 1 addition & 1 deletion src/Layers/xrRender/Debug/dxPixEventWrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#define dxPixEventWrapper_included
#pragma once

#ifdef DEBUG
#if defined(DEBUG) && !defined(USE_OGL)

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

Expand Down
34 changes: 17 additions & 17 deletions src/Layers/xrRenderPC_GL/gl_R_render.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ IC bool pred_sp_sort (ISpatial* _1, ISpatial* _2)

void CRender::render_main (Fmatrix& m_ViewProjection, bool _fportals)
{
// PIX_EVENT(render_main);
PIX_EVENT(render_main);
// Msg ("---begin");
marker ++;

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

void CRender::render_menu ()
{
// PIX_EVENT(render_menu);
PIX_EVENT(render_menu);
// Globals
RCache.set_CullMode (CULL_CCW);
RCache.set_Stencil (FALSE);
Expand Down Expand Up @@ -192,7 +192,7 @@ void CRender::render_menu ()
extern u32 g_r;
void CRender::Render ()
{
// PIX_EVENT(CRender_Render);
PIX_EVENT(CRender_Render);

g_r = 1;
VERIFY (0==mapDistort.size());
Expand Down Expand Up @@ -241,7 +241,7 @@ void CRender::Render ()
//******* Z-prefill calc - DEFERRER RENDERER
if (ps_r2_ls_flags.test(R2FLAG_ZFILL))
{
// PIX_EVENT(DEFER_Z_FILL);
PIX_EVENT(DEFER_Z_FILL);
BasicStats.Culling.Begin ();
float z_distance = ps_r2_zfill ;
Fmatrix m_zfill, m_project ;
Expand Down Expand Up @@ -311,7 +311,7 @@ void CRender::Render ()
//******* Main render :: PART-0 -- first
if (!split_the_scene_to_minimize_wait)
{
// PIX_EVENT(DEFER_PART0_NO_SPLIT);
PIX_EVENT(DEFER_PART0_NO_SPLIT);
// level, DO NOT SPLIT
Target->phase_scene_begin ();
r_dsgraph_render_hud ();
Expand All @@ -322,7 +322,7 @@ void CRender::Render ()
}
else
{
// PIX_EVENT(DEFER_PART0_SPLIT);
PIX_EVENT(DEFER_PART0_SPLIT);
// level, SPLIT
Target->phase_scene_begin ();
r_dsgraph_render_graph (0);
Expand All @@ -336,7 +336,7 @@ void CRender::Render ()
if( RImplementation.o.dx10_msaa )
RCache.set_ZB( RImplementation.Target->rt_MSAADepth->pZRT );
{
// PIX_EVENT(DEFER_TEST_LIGHT_VIS);
PIX_EVENT(DEFER_TEST_LIGHT_VIS);
// perform tests
u32 count = 0;
light_Package& LP = Lights.package;
Expand Down Expand Up @@ -377,7 +377,7 @@ void CRender::Render ()
//******* Main render :: PART-1 (second)
if (split_the_scene_to_minimize_wait)
{
// PIX_EVENT(DEFER_PART1_SPLIT);
PIX_EVENT(DEFER_PART1_SPLIT);
// skybox can be drawn here
if (0)
{
Expand Down Expand Up @@ -415,15 +415,15 @@ void CRender::Render ()
// Wall marks
if(Wallmarks)
{
// PIX_EVENT(DEFER_WALLMARKS);
PIX_EVENT(DEFER_WALLMARKS);
Target->phase_wallmarks ();
g_r = 0;
Wallmarks->Render (); // wallmarks has priority as normal geometry
}

// Update incremental shadowmap-visibility solver
{
// PIX_EVENT(DEFER_FLUSH_OCCLUSION);
PIX_EVENT(DEFER_FLUSH_OCCLUSION);
u32 it=0;
for (it=0; it<Lights_LastFrame.size(); it++) {
if (0==Lights_LastFrame[it]) continue ;
Expand All @@ -440,21 +440,21 @@ void CRender::Render ()
// full screen pass to mark msaa-edge pixels in highest stencil bit
if( RImplementation.o.dx10_msaa )
{
// PIX_EVENT( MARK_MSAA_EDGES );
PIX_EVENT( MARK_MSAA_EDGES );
Target->mark_msaa_edges();
}

// TODO: DX10: Implement DX10 rain.
if (ps_r2_ls_flags.test(R3FLAG_DYN_WET_SURF))
{
// PIX_EVENT(DEFER_RAIN);
PIX_EVENT(DEFER_RAIN);
render_rain();
}

// Directional light - fucking sun
if (bSUN)
{
// PIX_EVENT(DEFER_SUN);
PIX_EVENT(DEFER_SUN);
RImplementation.Stats.l_visible ++;
if( !ps_r2_ls_flags_ext.is(R2FLAGEXT_SUN_OLD))
render_sun_cascades ();
Expand All @@ -468,7 +468,7 @@ void CRender::Render ()
}

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

// Lighting, non dependant on OCCQ
{
// PIX_EVENT(DEFER_LIGHT_NO_OCCQ);
PIX_EVENT(DEFER_LIGHT_NO_OCCQ);
Target->phase_accumulator ();
HOM.Disable ();
render_lights (LP_normal);
}

// Lighting, dependant on OCCQ
{
// PIX_EVENT(DEFER_LIGHT_OCCQ);
PIX_EVENT(DEFER_LIGHT_OCCQ);
render_lights (LP_pending);
}

// Postprocess
{
// PIX_EVENT(DEFER_LIGHT_COMBINE);
PIX_EVENT(DEFER_LIGHT_COMBINE);
Target->phase_combine ();
}

Expand Down
1 change: 1 addition & 0 deletions src/Layers/xrRenderPC_GL/stdafx.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include <glbinding/gl/gl.h>

#include "Layers/xrRender/xrD3DDefs.h"
#include "Layers/xrRender/Debug/dxPixEventWrapper.h"

#define R_GL 0
#define R_R1 1
Expand Down
2 changes: 2 additions & 0 deletions src/Layers/xrRenderPC_GL/xrRender_GL.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@
<ClCompile Include="..\xrRenderGL\glTextureUtils.cpp" />
<ClCompile Include="..\xrRender\ColorMapManager.cpp" />
<ClCompile Include="..\xrRender\D3DUtils.cpp" />
<ClCompile Include="..\xrRender\Debug\dxPixEventWrapper.cpp" />
<ClCompile Include="..\xrRender\DetailManager_VS.cpp" />
<ClCompile Include="..\xrRender\du_box.cpp" />
<ClCompile Include="..\xrRender\du_cone.cpp" />
Expand Down Expand Up @@ -412,6 +413,7 @@
<ClInclude Include="..\xrRender\ColorMapManager.h" />
<ClInclude Include="..\xrRender\D3DUtils.h" />
<ClInclude Include="..\xrRender\D3DXRenderBase.h" />
<ClInclude Include="..\xrRender\Debug\dxPixEventWrapper.h" />
<ClInclude Include="..\xrRender\du_box.h" />
<ClInclude Include="..\xrRender\du_cone.h" />
<ClInclude Include="..\xrRender\du_cylinder.h" />
Expand Down
6 changes: 6 additions & 0 deletions src/Layers/xrRenderPC_GL/xrRender_GL.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -663,6 +663,9 @@
<ClCompile Include="glMinMaxSMBlender.cpp">
<Filter>Shading templates</Filter>
</ClCompile>
<ClCompile Include="..\xrRender\Debug\dxPixEventWrapper.cpp">
<Filter>Debug</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="stdafx.h">
Expand Down Expand Up @@ -1094,5 +1097,8 @@
<ClInclude Include="glMinMaxSMBlender.h">
<Filter>Shading templates</Filter>
</ClInclude>
<ClInclude Include="..\xrRender\Debug\dxPixEventWrapper.h">
<Filter>Debug</Filter>
</ClInclude>
</ItemGroup>
</Project>

0 comments on commit 55f10b5

Please sign in to comment.