summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2022-11-14 11:40:18 -0600
committerDave Parks <davep@lindenlab.com>2022-11-14 11:40:18 -0600
commit843a5c287e34855fb7bd4882d8d0a106e987a9f7 (patch)
tree373d601d7765df24df745e0924db1ececd2fb6a8 /indra
parent6c93f4232525f55b283be6881ed12db623cd5ce0 (diff)
SL-18485 Cleanup -- remove unused GLTF specific vertex attributes from LLVertexBuffer (blows past 16-attribute limit)
Diffstat (limited to 'indra')
-rw-r--r--indra/llrender/llshadermgr.cpp4
-rw-r--r--indra/llrender/llvertexbuffer.cpp92
-rw-r--r--indra/llrender/llvertexbuffer.h8
3 files changed, 0 insertions, 104 deletions
diff --git a/indra/llrender/llshadermgr.cpp b/indra/llrender/llshadermgr.cpp
index e8cf7ec758..ac4c610d72 100644
--- a/indra/llrender/llshadermgr.cpp
+++ b/indra/llrender/llshadermgr.cpp
@@ -1163,10 +1163,6 @@ void LLShaderMgr::initAttribsAndUniforms()
mReservedAttribs.push_back("weight4");
mReservedAttribs.push_back("clothing");
mReservedAttribs.push_back("texture_index");
- mReservedAttribs.push_back("basecolor_texcoord"); // GLTF
- mReservedAttribs.push_back("normal_texcoord"); // GLTF
- mReservedAttribs.push_back("metallic_roughness_texcoord"); // GLTF
- mReservedAttribs.push_back("emissive_texcoord"); // GLTF
//matrix state
mReservedUniforms.push_back("modelview_matrix");
diff --git a/indra/llrender/llvertexbuffer.cpp b/indra/llrender/llvertexbuffer.cpp
index b33708cae6..f51000b9a6 100644
--- a/indra/llrender/llvertexbuffer.cpp
+++ b/indra/llrender/llvertexbuffer.cpp
@@ -358,10 +358,6 @@ const S32 LLVertexBuffer::sTypeSize[LLVertexBuffer::TYPE_MAX] =
sizeof(LLVector4), // TYPE_WEIGHT4,
sizeof(LLVector4), // TYPE_CLOTHWEIGHT,
sizeof(LLVector4), // TYPE_TEXTURE_INDEX (actually exists as position.w), no extra data, but stride is 16 bytes
- sizeof(LLVector2), // TYPE_BASECOLOR_TEXCOORD,
- sizeof(LLVector2), // TYPE_NORMAL_TEXCOORD,
- sizeof(LLVector2), // TYPE_METALLIC_ROUGHNESS_TEXCOORD,
- sizeof(LLVector2), // TYPE_EMISSIVE_TEXCOORD,
};
static const std::string vb_type_name[] =
@@ -379,10 +375,6 @@ static const std::string vb_type_name[] =
"TYPE_WEIGHT4",
"TYPE_CLOTHWEIGHT",
"TYPE_TEXTURE_INDEX",
- "TYPE_BASECOLOR_TEXCOORD",
- "TYPE_NORMAL_TEXCOORD",
- "TYPE_METALLIC_ROUGHNESS_TEXCOORD",
- "TYPE_EMISSIVE_TEXCOORD",
"TYPE_MAX",
"TYPE_INDEX",
};
@@ -1278,10 +1270,6 @@ void LLVertexBuffer::setupVertexArray()
4, //TYPE_WEIGHT4,
4, //TYPE_CLOTHWEIGHT,
1, //TYPE_TEXTURE_INDEX
- 2, // TYPE_BASECOLOR_TEXCOORD,
- 2, // TYPE_NORMAL_TEXCOORD,
- 2, // TYPE_METALLIC_ROUGHNESS_TEXCOORD,
- 2, // TYPE_EMISSIVE_TEXCOORD,
};
static const U32 attrib_type[] =
@@ -1299,10 +1287,6 @@ void LLVertexBuffer::setupVertexArray()
GL_FLOAT, //TYPE_WEIGHT4,
GL_FLOAT, //TYPE_CLOTHWEIGHT,
GL_UNSIGNED_INT, //TYPE_TEXTURE_INDEX
- GL_FLOAT, // TYPE_BASECOLOR_TEXCOORD,
- GL_FLOAT, // TYPE_NORMAL_TEXCOORD,
- GL_FLOAT, // TYPE_METALLIC_ROUGHNESS_TEXCOORD,
- GL_FLOAT, // TYPE_EMISSIVE_TEXCOORD,
};
static const bool attrib_integer[] =
@@ -1320,10 +1304,6 @@ void LLVertexBuffer::setupVertexArray()
false, //TYPE_WEIGHT4,
false, //TYPE_CLOTHWEIGHT,
true, //TYPE_TEXTURE_INDEX
- false, // TYPE_BASECOLOR_TEXCOORD,
- false, // TYPE_NORMAL_TEXCOORD,
- false, // TYPE_METALLIC_ROUGHNESS_TEXCOORD,
- false, // TYPE_EMISSIVE_TEXCOORD,
};
static const U32 attrib_normalized[] =
@@ -1341,10 +1321,6 @@ void LLVertexBuffer::setupVertexArray()
GL_FALSE, //TYPE_WEIGHT4,
GL_FALSE, //TYPE_CLOTHWEIGHT,
GL_FALSE, //TYPE_TEXTURE_INDEX
- GL_FALSE, // TYPE_BASECOLOR_TEXCOORD,
- GL_FALSE, // TYPE_NORMAL_TEXCOORD,
- GL_FALSE, // TYPE_METALLIC_ROUGHNESS_TEXCOORD,
- GL_FALSE, // TYPE_EMISSIVE_TEXCOORD,
};
bindGLBuffer(true);
@@ -1985,26 +1961,6 @@ bool LLVertexBuffer::getClothWeightStrider(LLStrider<LLVector4>& strider, S32 in
return VertexBufferStrider<LLVector4,TYPE_CLOTHWEIGHT>::get(*this, strider, index, count, map_range);
}
-bool LLVertexBuffer::getBasecolorTexcoordStrider(LLStrider<LLVector2>& strider, S32 index, S32 count, bool map_range)
-{
- return VertexBufferStrider<LLVector2,TYPE_BASECOLOR_TEXCOORD>::get(*this, strider, index, count, map_range);
-}
-
-bool LLVertexBuffer::getNormalTexcoordStrider(LLStrider<LLVector2>& strider, S32 index, S32 count, bool map_range)
-{
- return VertexBufferStrider<LLVector2,TYPE_NORMAL_TEXCOORD>::get(*this, strider, index, count, map_range);
-}
-
-bool LLVertexBuffer::getMetallicRoughnessTexcoordStrider(LLStrider<LLVector2>& strider, S32 index, S32 count, bool map_range)
-{
- return VertexBufferStrider<LLVector2,TYPE_METALLIC_ROUGHNESS_TEXCOORD>::get(*this, strider, index, count, map_range);
-}
-
-bool LLVertexBuffer::getEmissiveTexcoordStrider(LLStrider<LLVector2>& strider, S32 index, S32 count, bool map_range)
-{
- return VertexBufferStrider<LLVector2,TYPE_EMISSIVE_TEXCOORD>::get(*this, strider, index, count, map_range);
-}
-
//----------------------------------------------------------------------------
bool LLVertexBuffer::bindGLArray()
@@ -2423,30 +2379,6 @@ void LLVertexBuffer::setupVertexBuffer(U32 data_mask)
void* ptr = (void*)(base + mOffsets[TYPE_VERTEX]);
glVertexAttribPointer(loc, 3,GL_FLOAT, GL_FALSE, LLVertexBuffer::sTypeSize[TYPE_VERTEX], ptr);
}
- if (data_mask & MAP_BASECOLOR_TEXCOORD)
- {
- S32 loc = TYPE_BASECOLOR_TEXCOORD;
- void* ptr = (void*)(base + mOffsets[TYPE_BASECOLOR_TEXCOORD]);
- glVertexAttribPointer(loc, 2, GL_FLOAT, GL_FALSE, LLVertexBuffer::sTypeSize[TYPE_BASECOLOR_TEXCOORD], ptr);
- }
- if (data_mask & MAP_NORMAL_TEXCOORD)
- {
- S32 loc = TYPE_NORMAL_TEXCOORD;
- void* ptr = (void*)(base + mOffsets[TYPE_NORMAL_TEXCOORD]);
- glVertexAttribPointer(loc, 2, GL_FLOAT, GL_FALSE, LLVertexBuffer::sTypeSize[TYPE_NORMAL_TEXCOORD], ptr);
- }
- if (data_mask & MAP_METALLIC_ROUGHNESS_TEXCOORD)
- {
- S32 loc = TYPE_METALLIC_ROUGHNESS_TEXCOORD;
- void* ptr = (void*)(base + mOffsets[TYPE_METALLIC_ROUGHNESS_TEXCOORD]);
- glVertexAttribPointer(loc, 2, GL_FLOAT, GL_FALSE, LLVertexBuffer::sTypeSize[TYPE_METALLIC_ROUGHNESS_TEXCOORD], ptr);
- }
- if (data_mask & MAP_EMISSIVE_TEXCOORD)
- {
- S32 loc = TYPE_EMISSIVE_TEXCOORD;
- void* ptr = (void*)(base + mOffsets[TYPE_EMISSIVE_TEXCOORD]);
- glVertexAttribPointer(loc, 2, GL_FLOAT, GL_FALSE, LLVertexBuffer::sTypeSize[TYPE_EMISSIVE_TEXCOORD], ptr);
- }
llglassertok();
}
@@ -2540,30 +2472,6 @@ void LLVertexBuffer::setupVertexBufferFast(U32 data_mask)
void* ptr = (void*)(base + mOffsets[TYPE_VERTEX]);
glVertexAttribPointer(loc, 3, GL_FLOAT, GL_FALSE, LLVertexBuffer::sTypeSize[TYPE_VERTEX], ptr);
}
- if (data_mask & MAP_BASECOLOR_TEXCOORD)
- {
- S32 loc = TYPE_BASECOLOR_TEXCOORD;
- void* ptr = (void*)(base + mOffsets[TYPE_BASECOLOR_TEXCOORD]);
- glVertexAttribPointer(loc, 2, GL_FLOAT, GL_FALSE, LLVertexBuffer::sTypeSize[TYPE_BASECOLOR_TEXCOORD], ptr);
- }
- if (data_mask & MAP_NORMAL_TEXCOORD)
- {
- S32 loc = TYPE_NORMAL_TEXCOORD;
- void* ptr = (void*)(base + mOffsets[TYPE_NORMAL_TEXCOORD]);
- glVertexAttribPointer(loc, 2, GL_FLOAT, GL_FALSE, LLVertexBuffer::sTypeSize[TYPE_NORMAL_TEXCOORD], ptr);
- }
- if (data_mask & MAP_METALLIC_ROUGHNESS_TEXCOORD)
- {
- S32 loc = TYPE_METALLIC_ROUGHNESS_TEXCOORD;
- void* ptr = (void*)(base + mOffsets[TYPE_METALLIC_ROUGHNESS_TEXCOORD]);
- glVertexAttribPointer(loc, 2, GL_FLOAT, GL_FALSE, LLVertexBuffer::sTypeSize[TYPE_METALLIC_ROUGHNESS_TEXCOORD], ptr);
- }
- if (data_mask & MAP_EMISSIVE_TEXCOORD)
- {
- S32 loc = TYPE_EMISSIVE_TEXCOORD;
- void* ptr = (void*)(base + mOffsets[TYPE_EMISSIVE_TEXCOORD]);
- glVertexAttribPointer(loc, 2, GL_FLOAT, GL_FALSE, LLVertexBuffer::sTypeSize[TYPE_EMISSIVE_TEXCOORD], ptr);
- }
}
LLVertexBuffer::MappedRegion::MappedRegion(S32 type, S32 index, S32 count)
diff --git a/indra/llrender/llvertexbuffer.h b/indra/llrender/llvertexbuffer.h
index b54e99ca27..99b8b54d69 100644
--- a/indra/llrender/llvertexbuffer.h
+++ b/indra/llrender/llvertexbuffer.h
@@ -182,10 +182,6 @@ public:
TYPE_WEIGHT4, // "weight4"
TYPE_CLOTHWEIGHT, // "clothing"
TYPE_TEXTURE_INDEX, // "texture_index"
- TYPE_BASECOLOR_TEXCOORD, // "basecolor_texcoord" (GLTF)
- TYPE_NORMAL_TEXCOORD, // "normal_texcoord" (GLTF)
- TYPE_METALLIC_ROUGHNESS_TEXCOORD, // "metallic_roughness_texcoord" (GLTF)
- TYPE_EMISSIVE_TEXCOORD, // "emissive_texcoord" (GLTF)
TYPE_MAX, // TYPE_MAX is the size/boundary marker for attributes that go in the vertex buffer
TYPE_INDEX, // TYPE_INDEX is beyond _MAX because it lives in a separate (index) buffer
};
@@ -205,10 +201,6 @@ public:
MAP_WEIGHT4 = (1<<TYPE_WEIGHT4),
MAP_CLOTHWEIGHT = (1<<TYPE_CLOTHWEIGHT),
MAP_TEXTURE_INDEX = (1<<TYPE_TEXTURE_INDEX),
- MAP_BASECOLOR_TEXCOORD = (1<<TYPE_BASECOLOR_TEXCOORD),
- MAP_NORMAL_TEXCOORD = (1<<TYPE_NORMAL_TEXCOORD),
- MAP_METALLIC_ROUGHNESS_TEXCOORD = (1<<TYPE_METALLIC_ROUGHNESS_TEXCOORD),
- MAP_EMISSIVE_TEXCOORD = (1<<TYPE_EMISSIVE_TEXCOORD),
};
protected: