mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-23 05:19:56 +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");
|
||||
if (cluts_.Full())
|
||||
Flush("cluts");
|
||||
clutIndex_ = (uint16_t)cluts_.Push(BinClut());
|
||||
memcpy(cluts_[clutIndex_].readable, src, sizeof(BinClut));
|
||||
BinClut &clut = cluts_.PeekPush();
|
||||
memcpy(clut.readable, src, sizeof(BinClut));
|
||||
clutIndex_ = (uint16_t)cluts_.PushPeeked();
|
||||
}
|
||||
|
||||
void BinManager::AddTriangle(const VertexData &v0, const VertexData &v1, const VertexData &v2) {
|
||||
|
@ -117,11 +117,12 @@ struct BinQueue {
|
||||
return items_[tail_];
|
||||
}
|
||||
|
||||
void PushPeeked() {
|
||||
size_t PushPeeked() {
|
||||
size_t i = tail_++;
|
||||
if (i + 1 == N)
|
||||
tail_ -= N;
|
||||
size_++;
|
||||
return i;
|
||||
}
|
||||
|
||||
size_t Size() const {
|
||||
|
Loading…
Reference in New Issue
Block a user