summaryrefslogtreecommitdiff
path: root/indra/newview/pipeline.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/pipeline.h')
-rw-r--r--indra/newview/pipeline.h67
1 files changed, 53 insertions, 14 deletions
diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h
index 814c54326a..56c64b190b 100644
--- a/indra/newview/pipeline.h
+++ b/indra/newview/pipeline.h
@@ -45,6 +45,11 @@
#include "llgl.h"
#include "lldrawable.h"
#include "llrendertarget.h"
+#include "llmodel.h" //for LL_MESH_ENaBLED
+
+#include <stack>
+
+#include <stack>
class LLViewerTexture;
class LLEdge;
@@ -59,7 +64,10 @@ class LLCullResult;
class LLVOAvatar;
class LLGLSLShader;
class LLCurlRequest;
+
+#if LL_MESH_ENABLED
class LLMeshResponder;
+#endif
typedef enum e_avatar_skinning_method
{
@@ -215,6 +223,7 @@ public:
//calculate pixel area of given box from vantage point of given camera
static F32 calcPixelArea(LLVector3 center, LLVector3 size, LLCamera& camera);
+ static F32 calcPixelArea(const LLVector4a& center, const LLVector4a& size, LLCamera &camera);
void stateSort(LLCamera& camera, LLCullResult& result);
void stateSort(LLSpatialGroup* group, LLCamera& camera);
@@ -227,6 +236,14 @@ public:
void renderGroups(LLRenderPass* pass, U32 type, U32 mask, BOOL texture);
void grabReferences(LLCullResult& result);
+ void clearReferences();
+
+ //check references will assert that there are no references in sCullResult to the provided data
+ void checkReferences(LLFace* face);
+ void checkReferences(LLDrawable* drawable);
+ void checkReferences(LLDrawInfo* draw_info);
+ void checkReferences(LLSpatialGroup* group);
+
void renderGeom(LLCamera& camera, BOOL forceVBOUpdate = FALSE);
void renderGeomDeferred(LLCamera& camera);
@@ -279,12 +296,25 @@ public:
LLCullResult::sg_list_t::iterator beginAlphaGroups();
LLCullResult::sg_list_t::iterator endAlphaGroups();
+
void addTrianglesDrawn(S32 index_count, U32 render_type = LLRender::TRIANGLES);
- BOOL hasRenderType(const U32 type) const { return (type && (mRenderTypeMask & (1<<type))) ? TRUE : FALSE; }
+
BOOL hasRenderDebugFeatureMask(const U32 mask) const { return (mRenderDebugFeatureMask & mask) ? TRUE : FALSE; }
BOOL hasRenderDebugMask(const U32 mask) const { return (mRenderDebugMask & mask) ? TRUE : FALSE; }
- void setRenderTypeMask(const U32 mask) { mRenderTypeMask = mask; }
- U32 getRenderTypeMask() const { return mRenderTypeMask; }
+
+
+
+ BOOL hasRenderType(const U32 type) const;
+ BOOL hasAnyRenderType(const U32 type, ...) const;
+
+ void setRenderTypeMask(U32 type, ...);
+ void orRenderTypeMask(U32 type, ...);
+ void andRenderTypeMask(U32 type, ...);
+ void clearRenderTypeMask(U32 type, ...);
+
+ void pushRenderTypeMask();
+ void popRenderTypeMask();
+
static void toggleRenderType(U32 type);
// For UI control of render features
@@ -362,6 +392,7 @@ public:
RENDER_TYPE_PASS_FULLBRIGHT_SHINY = LLRenderPass::PASS_FULLBRIGHT_SHINY,
RENDER_TYPE_PASS_SHINY = LLRenderPass::PASS_SHINY,
RENDER_TYPE_PASS_BUMP = LLRenderPass::PASS_BUMP,
+ RENDER_TYPE_PASS_POST_BUMP = LLRenderPass::PASS_POST_BUMP,
RENDER_TYPE_PASS_GLOW = LLRenderPass::PASS_GLOW,
RENDER_TYPE_PASS_ALPHA = LLRenderPass::PASS_ALPHA,
RENDER_TYPE_PASS_ALPHA_MASK = LLRenderPass::PASS_ALPHA_MASK,
@@ -372,7 +403,9 @@ public:
RENDER_TYPE_VOLUME,
RENDER_TYPE_PARTICLES,
RENDER_TYPE_CLOUDS,
- RENDER_TYPE_HUD_PARTICLES
+ RENDER_TYPE_HUD_PARTICLES,
+ NUM_RENDER_TYPES,
+ END_RENDER_TYPES = NUM_RENDER_TYPES
};
enum LLRenderDebugFeatureMask
@@ -413,6 +446,8 @@ public:
RENDER_DEBUG_AVATAR_VOLUME = 0x0100000,
RENDER_DEBUG_BUILD_QUEUE = 0x0200000,
RENDER_DEBUG_AGENT_TARGET = 0x0400000,
+ RENDER_DEBUG_PHYSICS_SHAPES = 0x0800000,
+ RENDER_DEBUG_NORMALS = 0x1000000,
};
public:
@@ -437,7 +472,9 @@ public:
S32 mDebugTextureUploadCost;
S32 mDebugSculptUploadCost;
+#if LL_MESH_ENABLED
S32 mDebugMeshUploadCost;
+#endif
S32 mLightingChanges;
S32 mGeometryChanges;
@@ -450,9 +487,12 @@ public:
static BOOL sForceOldBakedUpload; // If true will not use capabilities to upload baked textures.
static S32 sUseOcclusion; // 0 = no occlusion, 1 = read only, 2 = read/write
static BOOL sDelayVBUpdate;
- static BOOL sFastAlpha;
+ static BOOL sAutoMaskAlphaDeferred;
+ static BOOL sAutoMaskAlphaNonDeferred;
static BOOL sDisableShaders; // if TRUE, rendering will be done without shaders
static BOOL sRenderBump;
+ static BOOL sBakeSunlight;
+ static BOOL sNoAlpha;
static BOOL sUseTriStrips;
static BOOL sUseFarClip;
static BOOL sShadowRender;
@@ -468,6 +508,7 @@ public:
static BOOL sRenderAttachedLights;
static BOOL sRenderAttachedParticles;
static BOOL sRenderDeferred;
+ static BOOL sAllowRebuildPriorityGroup;
static S32 sVisibleLightCount;
static F32 sMinRenderSize;
@@ -538,7 +579,9 @@ public:
S32 mVertexShadersLoaded; // 0 = no, 1 = yes, -1 = failed
protected:
- U32 mRenderTypeMask;
+ BOOL mRenderTypeEnabled[NUM_RENDER_TYPES];
+ std::stack<std::string> mRenderTypeEnableStack;
+
U32 mRenderDebugFeatureMask;
U32 mRenderDebugMask;
@@ -589,7 +632,7 @@ protected:
//
LLDrawable::drawable_list_t mBuildQ1; // priority
LLDrawable::drawable_list_t mBuildQ2; // non-priority
- LLSpatialGroup::sg_list_t mGroupQ1; //priority
+ LLSpatialGroup::sg_vector_t mGroupQ1; //priority
LLSpatialGroup::sg_vector_t mGroupQ2; // non-priority
LLViewerObject::vobj_list_t mCreateQ;
@@ -678,13 +721,6 @@ public:
protected:
std::vector<LLFace*> mSelectedFaces;
-
- typedef std::map<LLUUID, std::set<LLUUID> > mesh_load_map;
- mesh_load_map mLoadingMeshes[4];
-
- typedef std::list<LLMeshResponder*> mesh_response_list;
- mesh_response_list mMeshResponseList;
-
LLPointer<LLViewerFetchedTexture> mFaceSelectImagep;
U32 mLightMask;
@@ -699,6 +735,9 @@ protected:
public:
static BOOL sRenderBeacons;
static BOOL sRenderHighlight;
+
+ //debug use
+ static U32 sCurRenderPoolType ;
};
void render_bbox(const LLVector3 &min, const LLVector3 &max);