From 15d14be3ccbaa4f9429abad8d60b98df4ef14915 Mon Sep 17 00:00:00 2001 From: MerryMage Date: Wed, 27 Dec 2017 13:02:34 +0000 Subject: [PATCH] primitive_assembly: Add getters for internal state --- src/video_core/primitive_assembly.cpp | 10 ++++++++++ src/video_core/primitive_assembly.h | 10 ++++++++++ 2 files changed, 20 insertions(+) diff --git a/src/video_core/primitive_assembly.cpp b/src/video_core/primitive_assembly.cpp index 52fc843639..b282ccca02 100644 --- a/src/video_core/primitive_assembly.cpp +++ b/src/video_core/primitive_assembly.cpp @@ -71,6 +71,16 @@ void PrimitiveAssembler::Reconfigure(PipelineRegs::TriangleTopology this->topology = topology; } +template +bool PrimitiveAssembler::IsEmpty() const { + return buffer_index == 0 && strip_ready == false; +} + +template +PipelineRegs::TriangleTopology PrimitiveAssembler::GetTopology() const { + return topology; +} + // explicitly instantiate use cases template struct PrimitiveAssembler; diff --git a/src/video_core/primitive_assembly.h b/src/video_core/primitive_assembly.h index 0d62192925..5c1d6f5d46 100644 --- a/src/video_core/primitive_assembly.h +++ b/src/video_core/primitive_assembly.h @@ -45,6 +45,16 @@ struct PrimitiveAssembler { */ void Reconfigure(PipelineRegs::TriangleTopology topology); + /** + * Is our internal state empty? + */ + bool IsEmpty() const; + + /** + * What is our triangle topology? + */ + PipelineRegs::TriangleTopology GetTopology() const; + private: PipelineRegs::TriangleTopology topology;