mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-07-11 01:25:07 +02:00
Assorted cleanup and tweaks
This commit is contained in:
@@ -977,10 +977,9 @@ void VulkanRenderManager::EndCurRenderStep() {
|
||||
}
|
||||
}
|
||||
|
||||
compileQueueMutex_.lock();
|
||||
if (needsCompile)
|
||||
if (needsCompile) {
|
||||
compileCond_.notify_one();
|
||||
compileQueueMutex_.unlock();
|
||||
}
|
||||
pipelinesToCheck_.clear();
|
||||
|
||||
// We don't do this optimization for very small targets, probably not worth it.
|
||||
@@ -1865,7 +1864,7 @@ void VKRPipelineLayout::FlushDescSets(VulkanContext *vulkan, int frame, QueuePro
|
||||
|
||||
pool.Reset();
|
||||
|
||||
VkDescriptorSet setCache[8];
|
||||
VkDescriptorSet setCache[16];
|
||||
VkDescriptorSetLayout layoutsForAlloc[ARRAY_SIZE(setCache)];
|
||||
for (int i = 0; i < ARRAY_SIZE(setCache); i++) {
|
||||
layoutsForAlloc[i] = descriptorSetLayout;
|
||||
|
||||
@@ -128,46 +128,6 @@ public:
|
||||
void Comp_ColorConv(MIPSOpcode op) override;
|
||||
void Comp_Vbfy(MIPSOpcode op) override;
|
||||
|
||||
// Non-NEON: VPFX
|
||||
|
||||
// NEON implementations of the VFPU ops.
|
||||
void CompNEON_SV(MIPSOpcode op);
|
||||
void CompNEON_SVQ(MIPSOpcode op);
|
||||
void CompNEON_VVectorInit(MIPSOpcode op);
|
||||
void CompNEON_VMatrixInit(MIPSOpcode op);
|
||||
void CompNEON_VDot(MIPSOpcode op);
|
||||
void CompNEON_VecDo3(MIPSOpcode op);
|
||||
void CompNEON_VV2Op(MIPSOpcode op);
|
||||
void CompNEON_Mftv(MIPSOpcode op);
|
||||
void CompNEON_Vmfvc(MIPSOpcode op);
|
||||
void CompNEON_Vmtvc(MIPSOpcode op);
|
||||
void CompNEON_Vmmov(MIPSOpcode op);
|
||||
void CompNEON_VScl(MIPSOpcode op);
|
||||
void CompNEON_Vmmul(MIPSOpcode op);
|
||||
void CompNEON_Vmscl(MIPSOpcode op);
|
||||
void CompNEON_Vtfm(MIPSOpcode op);
|
||||
void CompNEON_VHdp(MIPSOpcode op);
|
||||
void CompNEON_VCrs(MIPSOpcode op);
|
||||
void CompNEON_VDet(MIPSOpcode op);
|
||||
void CompNEON_Vi2x(MIPSOpcode op);
|
||||
void CompNEON_Vx2i(MIPSOpcode op);
|
||||
void CompNEON_Vf2i(MIPSOpcode op);
|
||||
void CompNEON_Vi2f(MIPSOpcode op);
|
||||
void CompNEON_Vh2f(MIPSOpcode op);
|
||||
void CompNEON_Vcst(MIPSOpcode op);
|
||||
void CompNEON_Vhoriz(MIPSOpcode op);
|
||||
void CompNEON_VRot(MIPSOpcode op);
|
||||
void CompNEON_VIdt(MIPSOpcode op);
|
||||
void CompNEON_Vcmp(MIPSOpcode op);
|
||||
void CompNEON_Vcmov(MIPSOpcode op);
|
||||
void CompNEON_Viim(MIPSOpcode op);
|
||||
void CompNEON_Vfim(MIPSOpcode op);
|
||||
void CompNEON_VCrossQuat(MIPSOpcode op);
|
||||
void CompNEON_Vsgn(MIPSOpcode op);
|
||||
void CompNEON_Vocp(MIPSOpcode op);
|
||||
void CompNEON_ColorConv(MIPSOpcode op);
|
||||
void CompNEON_Vbfy(MIPSOpcode op);
|
||||
|
||||
int Replace_fabsf() override;
|
||||
|
||||
JitBlockCache *GetBlockCache() override { return &blocks; }
|
||||
|
||||
@@ -177,14 +177,14 @@ void VtxDec_Tu8_C5551_Ps16(const u8 *srcp, u8 *dstp, int numVerts, const UVScale
|
||||
__m128 pos0_ext = _mm_mul_ps(_mm_cvtepi32_ps(pos0_32), posScale);
|
||||
__m128 pos1_ext = _mm_mul_ps(_mm_cvtepi32_ps(pos1_32), posScale);
|
||||
|
||||
__m128i uv8 = _mm_set1_epi32(uv0);
|
||||
__m128i uv8 = _mm_cvtsi32_si128(uv0);
|
||||
__m128i uv16 = _mm_unpacklo_epi8(uv8, uv8);
|
||||
__m128i uv32 = _mm_srli_epi32(_mm_unpacklo_epi16(uv16, uv16), 24);
|
||||
__m128d uvf = _mm_castps_pd(_mm_add_ps(_mm_mul_ps(_mm_cvtepi32_ps(uv32), uvScale), uvOff));
|
||||
alpha &= col0;
|
||||
|
||||
// Combined 5551 -> 8888 RGBA. Nasty.
|
||||
__m128i col = _mm_set1_epi64x(col0);
|
||||
__m128i col = _mm_cvtsi64_si128(col0);
|
||||
__m128i r = _mm_slli_epi32(_mm_and_si128(col, rmask), 8 - 5);
|
||||
__m128i g = _mm_slli_epi32(_mm_and_si128(col, gmask), 16 - 10);
|
||||
__m128i b = _mm_slli_epi32(_mm_and_si128(col, bmask), 24 - 15);
|
||||
|
||||
@@ -324,7 +324,7 @@ void DrawEngineD3D11::Flush() {
|
||||
bool useElements;
|
||||
DecodeVerts(dec_, decoded_);
|
||||
DecodeIndsAndGetData(&prim, &vertexCount, &maxIndex, &useElements, false);
|
||||
gpuStats.perFrame.numUncachedVertsDrawn += vertexCount;
|
||||
gpuStats.perFrame.numVertsDrawn += vertexCount;
|
||||
|
||||
bool hasColor = (lastVType_ & GE_VTYPE_COL_MASK) != GE_VTYPE_COL_NONE;
|
||||
if (gstate.isModeThrough()) {
|
||||
@@ -412,7 +412,6 @@ void DrawEngineD3D11::Flush() {
|
||||
gstate_c.vertexFullAlpha = gstate_c.vertexFullAlpha && ((hasColor && (gstate.materialupdate & 1)) || gstate.getMaterialAmbientA() == 255) && (!gstate.isLightingEnabled() || gstate.getAmbientA() == 255);
|
||||
}
|
||||
|
||||
gpuStats.perFrame.numUncachedVertsDrawn += vertexCount;
|
||||
prim = IndexGenerator::GeneralPrim((GEPrimitiveType)drawInds_[0].prim);
|
||||
VERBOSE_LOG(Log::G3D, "Flush prim %i SW! %i verts in one go", prim, vertexCount);
|
||||
|
||||
@@ -492,6 +491,7 @@ void DrawEngineD3D11::Flush() {
|
||||
pushInds_->EndPush(context_);
|
||||
context_->IASetIndexBuffer(pushInds_->Buf(), DXGI_FORMAT_R16_UINT, iOffset);
|
||||
context_->DrawIndexed(result.drawIndexCount, 0, 0);
|
||||
gpuStats.perFrame.numVertsDrawn += result.drawIndexCount;
|
||||
} else if (action == SW_CLEAR) {
|
||||
u32 clearColor = result.color;
|
||||
float clearDepth = result.depth;
|
||||
|
||||
@@ -303,6 +303,7 @@ void DrawEngineGLES::Flush() {
|
||||
bool useElements;
|
||||
DecodeVerts(dec_, decoded_);
|
||||
DecodeIndsAndGetData(&prim, &vertexCount, &maxIndex, &useElements, false);
|
||||
gpuStats.perFrame.numVertsDrawn += vertexCount;
|
||||
|
||||
if (useElements) {
|
||||
uint32_t esz = sizeof(uint16_t) * vertexCount;
|
||||
@@ -361,7 +362,6 @@ void DrawEngineGLES::Flush() {
|
||||
gstate_c.vertexFullAlpha = gstate_c.vertexFullAlpha && ((hasColor && (gstate.materialupdate & 1)) || gstate.getMaterialAmbientA() == 255) && (!gstate.isLightingEnabled() || gstate.getAmbientA() == 255);
|
||||
}
|
||||
|
||||
gpuStats.perFrame.numUncachedVertsDrawn += vertexCount;
|
||||
prim = IndexGenerator::GeneralPrim((GEPrimitiveType)drawInds_[0].prim);
|
||||
|
||||
int maxIndex = numDecodedVerts_;
|
||||
@@ -424,6 +424,7 @@ void DrawEngineGLES::Flush() {
|
||||
render_->DrawIndexed(
|
||||
softwareInputLayout_, vertexBuffer, vertexBufferOffset, indexBuffer, indexBufferOffset,
|
||||
glprim[prim], result.drawIndexCount, GL_UNSIGNED_SHORT);
|
||||
gpuStats.perFrame.numVertsDrawn += result.drawIndexCount;
|
||||
} else if (action == SW_CLEAR) {
|
||||
u32 clearColor = result.color;
|
||||
float clearDepth = result.depth;
|
||||
|
||||
@@ -104,7 +104,7 @@ struct GPUStatsPerFrame {
|
||||
int numBBOXJumps;
|
||||
int numVertsSubmitted;
|
||||
int numVertsDecoded;
|
||||
int numUncachedVertsDrawn;
|
||||
int numVertsDrawn;
|
||||
int numTextureInvalidations;
|
||||
int numTexturesChanged;
|
||||
int numTextureInvalidationsByFramebuffer;
|
||||
|
||||
+1
-1
@@ -1819,7 +1819,7 @@ void GPUCommonHW::FormatGPUStatsCommon(StringWriter &w) {
|
||||
gpuStats.perFrame.numSoftTransformedDraws,
|
||||
gpuStats.perFrame.numVertsSubmitted,
|
||||
gpuStats.perFrame.numVertsDecoded,
|
||||
gpuStats.perFrame.numUncachedVertsDrawn,
|
||||
gpuStats.perFrame.numVertsDrawn,
|
||||
gpuStats.perFrame.numSoftClippedTriangles,
|
||||
(int)framebufferManager_->NumVFBs(),
|
||||
gpuStats.perFrame.numFramebufferEvaluations,
|
||||
|
||||
@@ -292,6 +292,7 @@ void DrawEngineVulkan::Flush() {
|
||||
int maxIndex;
|
||||
bool useElements;
|
||||
DecodeIndsAndGetData(&prim, &vertexCount, &maxIndex, &useElements, false);
|
||||
gpuStats.perFrame.numVertsDrawn += vertexCount;
|
||||
|
||||
bool hasColor = (lastVType_ & GE_VTYPE_COL_MASK) != GE_VTYPE_COL_NONE;
|
||||
if (gstate.isModeThrough()) {
|
||||
@@ -420,7 +421,7 @@ void DrawEngineVulkan::Flush() {
|
||||
gstate_c.vertexFullAlpha = gstate_c.vertexFullAlpha && ((hasColor && (gstate.materialupdate & 1)) || gstate.getMaterialAmbientA() == 255) && (!gstate.isLightingEnabled() || gstate.getAmbientA() == 255);
|
||||
}
|
||||
|
||||
gpuStats.perFrame.numUncachedVertsDrawn += vertexCount;
|
||||
gpuStats.perFrame.numVertsDrawn += vertexCount;
|
||||
prim = IndexGenerator::GeneralPrim((GEPrimitiveType)drawInds_[0].prim);
|
||||
|
||||
// At this point, the output is always an indexed triangle/line/point list, no strips/fans.
|
||||
|
||||
@@ -140,6 +140,7 @@ android {
|
||||
}
|
||||
buildTypes {
|
||||
getByName("debug") {
|
||||
isDefault = true
|
||||
isMinifyEnabled = false
|
||||
isJniDebuggable = true
|
||||
signingConfig = signingConfigs.getByName("debug")
|
||||
@@ -191,6 +192,7 @@ android {
|
||||
}
|
||||
productFlavors {
|
||||
create("normal") {
|
||||
isDefault = true
|
||||
applicationId = "org.ppsspp.ppsspp"
|
||||
dimension = "variant"
|
||||
externalNativeBuild {
|
||||
|
||||
Reference in New Issue
Block a user