Remove OpenGL ES2 leftovers that caused crash in Vulkan

Signed-off-by: renderexpert <expert@renderconsulting.co.uk>
This commit is contained in:
renderexpert
2025-06-30 23:52:59 +01:00
committed by Konstantin Pastbin
parent 4d702ec541
commit 01c2f02c86
7 changed files with 8 additions and 20 deletions

View File

@@ -306,11 +306,6 @@ Arrow3d::Arrow3d(ref_ptr<dp::GraphicsContext> context, ref_ptr<dp::TextureManage
{
m_state.SetDepthTestEnabled(true);
// Workaround for OpenGL: some devices require any texture to be set in the rendering pipeline.
auto const apiVersion = context->GetApiVersion();
if (apiVersion == dp::ApiVersion::OpenGLES3)
m_state.SetColorTexture(texMng->GetSymbolsTexture());
m_isValid = preloadedData.m_meshData.has_value();
// Init arrow mesh.

View File

@@ -387,7 +387,7 @@ void BackendRenderer::AcceptMessage(ref_ptr<Message> message)
drape_ptr<CirclesPackRenderData> data = make_unique_dp<CirclesPackRenderData>();
data->m_pointsCount = msg->GetPointsCount();
CHECK(m_context != nullptr, ());
CirclesPackShape::Draw(m_context, m_texMng, *data.get());
CirclesPackShape::Draw(m_context, *data.get());
m_commutator->PostMessage(ThreadsCommutator::RenderThread,
make_unique_dp<FlushCirclesPackMessage>(
std::move(data), msg->GetDestination()),

View File

@@ -28,10 +28,9 @@ struct CirclesPackStaticVertex
TNormal m_normal;
};
dp::RenderState GetCirclesPackState(ref_ptr<dp::TextureManager> texMng)
dp::RenderState GetCirclesPackState()
{
auto state = CreateRenderState(gpu::Program::CirclePoint, DepthLayer::OverlayLayer);
state.SetColorTexture(texMng->GetSymbolsTexture());
state.SetDepthTestEnabled(false);
return state;
}
@@ -139,8 +138,7 @@ size_t CirclesPackHandle::GetPointsCount() const
return m_buffer.size() / dp::Batcher::VertexPerQuad;
}
void CirclesPackShape::Draw(ref_ptr<dp::GraphicsContext> context, ref_ptr<dp::TextureManager> texMng,
CirclesPackRenderData & data)
void CirclesPackShape::Draw(ref_ptr<dp::GraphicsContext> context, CirclesPackRenderData & data)
{
ASSERT_NOT_EQUAL(data.m_pointsCount, 0, ());
@@ -178,7 +176,7 @@ void CirclesPackShape::Draw(ref_ptr<dp::GraphicsContext> context, ref_ptr<dp::Te
make_ref(staticVertexData.data()));
provider.InitStream(1 /* stream index */, GetCirclesPackDynamicBindingInfo(),
make_ref(dynamicVertexData.data()));
batcher.InsertListOfStrip(context, GetCirclesPackState(texMng), make_ref(&provider),
batcher.InsertListOfStrip(context, GetCirclesPackState(), make_ref(&provider),
std::move(handle), kVerticesInPoint);
context->Flush();

View File

@@ -69,7 +69,6 @@ private:
class CirclesPackShape
{
public:
static void Draw(ref_ptr<dp::GraphicsContext> context, ref_ptr<dp::TextureManager> texMng,
CirclesPackRenderData & data);
static void Draw(ref_ptr<dp::GraphicsContext> context, CirclesPackRenderData & data);
};
} // namespace df

View File

@@ -29,8 +29,7 @@ void RouteBuilder::Build(ref_ptr<dp::GraphicsContext> context, dp::DrapeID subro
ASSERT(!subroute->m_style.empty(), ());
for (size_t styleIndex = 0; styleIndex < subroute->m_style.size(); ++styleIndex)
{
subrouteData.push_back(RouteShape::CacheRoute(context, subrouteId, subroute,
styleIndex, recacheId, textures));
subrouteData.push_back(RouteShape::CacheRoute(context, subrouteId, subroute, styleIndex, recacheId));
}
auto markersData = RouteShape::CacheMarkers(context, subrouteId, subroute, recacheId, textures);

View File

@@ -539,8 +539,7 @@ void RouteShape::CacheRouteArrows(ref_ptr<dp::GraphicsContext> context,
drape_ptr<df::SubrouteData> RouteShape::CacheRoute(ref_ptr<dp::GraphicsContext> context,
dp::DrapeID subrouteId, SubrouteConstPtr subroute,
size_t styleIndex, int recacheId,
ref_ptr<dp::TextureManager> textures)
size_t styleIndex, int recacheId)
{
size_t startIndex;
size_t endIndex;
@@ -596,7 +595,6 @@ drape_ptr<df::SubrouteData> RouteShape::CacheRoute(ref_ptr<dp::GraphicsContext>
auto state = CreateRenderState(subroute->m_style[styleIndex].m_pattern.m_isDashed ?
gpu::Program::RouteDash : gpu::Program::Route, DepthLayer::GeometryLayer);
state.SetColorTexture(textures->GetSymbolsTexture());
for (auto & data : geometryBufferData)
{

View File

@@ -208,8 +208,7 @@ public:
static drape_ptr<df::SubrouteData> CacheRoute(ref_ptr<dp::GraphicsContext> context,
dp::DrapeID subrouteId, SubrouteConstPtr subroute,
size_t styleIndex, int recacheId,
ref_ptr<dp::TextureManager> textures);
size_t styleIndex, int recacheId);
static drape_ptr<df::SubrouteMarkersData> CacheMarkers(ref_ptr<dp::GraphicsContext> context,
dp::DrapeID subrouteId,