diff options
author | Yuri Kunde Schlesner <yuriks@yuriks.net> | 2017-01-28 03:10:54 +0100 |
---|---|---|
committer | Yuri Kunde Schlesner <yuriks@yuriks.net> | 2017-01-30 06:31:38 +0100 |
commit | 37a4ea046d80973d59ddb7735a0ffbf0bfd93ad0 (patch) | |
tree | ea34825c27519d42b6f9ec82cdccafb49815a89b | |
parent | VideoCore: Extract swrast-specific data from OutputVertex (diff) | |
download | yuzu-37a4ea046d80973d59ddb7735a0ffbf0bfd93ad0.tar yuzu-37a4ea046d80973d59ddb7735a0ffbf0bfd93ad0.tar.gz yuzu-37a4ea046d80973d59ddb7735a0ffbf0bfd93ad0.tar.bz2 yuzu-37a4ea046d80973d59ddb7735a0ffbf0bfd93ad0.tar.lz yuzu-37a4ea046d80973d59ddb7735a0ffbf0bfd93ad0.tar.xz yuzu-37a4ea046d80973d59ddb7735a0ffbf0bfd93ad0.tar.zst yuzu-37a4ea046d80973d59ddb7735a0ffbf0bfd93ad0.zip |
-rw-r--r-- | src/video_core/primitive_assembly.cpp | 2 | ||||
-rw-r--r-- | src/video_core/primitive_assembly.h | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/video_core/primitive_assembly.cpp b/src/video_core/primitive_assembly.cpp index be7377290..e71ff5719 100644 --- a/src/video_core/primitive_assembly.cpp +++ b/src/video_core/primitive_assembly.cpp @@ -14,7 +14,7 @@ PrimitiveAssembler<VertexType>::PrimitiveAssembler(Regs::TriangleTopology topolo : topology(topology), buffer_index(0) {} template <typename VertexType> -void PrimitiveAssembler<VertexType>::SubmitVertex(VertexType& vtx, +void PrimitiveAssembler<VertexType>::SubmitVertex(const VertexType& vtx, TriangleHandler triangle_handler) { switch (topology) { // TODO: Figure out what's different with TriangleTopology::Shader. diff --git a/src/video_core/primitive_assembly.h b/src/video_core/primitive_assembly.h index 0384d5984..24da47382 100644 --- a/src/video_core/primitive_assembly.h +++ b/src/video_core/primitive_assembly.h @@ -15,7 +15,8 @@ namespace Pica { */ template <typename VertexType> struct PrimitiveAssembler { - using TriangleHandler = std::function<void(VertexType& v0, VertexType& v1, VertexType& v2)>; + using TriangleHandler = + std::function<void(const VertexType& v0, const VertexType& v1, const VertexType& v2)>; PrimitiveAssembler(Regs::TriangleTopology topology = Regs::TriangleTopology::List); @@ -25,7 +26,7 @@ struct PrimitiveAssembler { * NOTE: We could specify the triangle handler in the constructor, but this way we can * keep event and handler code next to each other. */ - void SubmitVertex(VertexType& vtx, TriangleHandler triangle_handler); + void SubmitVertex(const VertexType& vtx, TriangleHandler triangle_handler); /** * Resets the internal state of the PrimitiveAssembler. |