mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-26 23:10:38 +00:00
softgpu: Small optimization to clut updates.
This commit is contained in:
parent
e766f11f2b
commit
59fb374c38
@ -368,8 +368,9 @@ void BinManager::UpdateClut(const void *src) {
|
|||||||
PROFILE_THIS_SCOPE("bin_clut");
|
PROFILE_THIS_SCOPE("bin_clut");
|
||||||
if (cluts_.Full())
|
if (cluts_.Full())
|
||||||
Flush("cluts");
|
Flush("cluts");
|
||||||
clutIndex_ = (uint16_t)cluts_.Push(BinClut());
|
BinClut &clut = cluts_.PeekPush();
|
||||||
memcpy(cluts_[clutIndex_].readable, src, sizeof(BinClut));
|
memcpy(clut.readable, src, sizeof(BinClut));
|
||||||
|
clutIndex_ = (uint16_t)cluts_.PushPeeked();
|
||||||
}
|
}
|
||||||
|
|
||||||
void BinManager::AddTriangle(const VertexData &v0, const VertexData &v1, const VertexData &v2) {
|
void BinManager::AddTriangle(const VertexData &v0, const VertexData &v1, const VertexData &v2) {
|
||||||
|
@ -117,11 +117,12 @@ struct BinQueue {
|
|||||||
return items_[tail_];
|
return items_[tail_];
|
||||||
}
|
}
|
||||||
|
|
||||||
void PushPeeked() {
|
size_t PushPeeked() {
|
||||||
size_t i = tail_++;
|
size_t i = tail_++;
|
||||||
if (i + 1 == N)
|
if (i + 1 == N)
|
||||||
tail_ -= N;
|
tail_ -= N;
|
||||||
size_++;
|
size_++;
|
||||||
|
return i;
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t Size() const {
|
size_t Size() const {
|
||||||
|
Loading…
Reference in New Issue
Block a user