mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-14 15:00:30 +02:00
The C++ paths draw and sample four pixels at a time in vector lanes, while a JIT function only does one, and with a JIT function in use the span and quad paths were skipped. On x86 the JITs had become slower: Wipeout took 13% more wall time and 25% more CPU with them, God of War 3% more. They were also a second implementation of every GE rule, and ARM never had them. The SoftwareRendererJit setting goes with them. RasterizerRegCache.h keeps only the types the pixel and sampler functions take, as RasterizerTypes.h. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
50 lines
1.9 KiB
C++
50 lines
1.9 KiB
C++
// Copyright (c) 2021- PPSSPP Project.
|
|
|
|
// This program is free software: you can redistribute it and/or modify
|
|
// it under the terms of the GNU General Public License as published by
|
|
// the Free Software Foundation, version 2.0 or later versions.
|
|
|
|
// This program is distributed in the hope that it will be useful,
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
// GNU General Public License 2.0 for more details.
|
|
|
|
// A copy of the GPL 2.0 should have been included with the program.
|
|
// If not, see http://www.gnu.org/licenses/
|
|
|
|
// Official git repository and contact information can be found at
|
|
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
|
|
|
|
#pragma once
|
|
|
|
#include "ppsspp_config.h"
|
|
|
|
#include "GPU/Math3D.h"
|
|
#include "GPU/Software/FuncId.h"
|
|
#include "GPU/Software/RasterizerTypes.h"
|
|
|
|
namespace Rasterizer {
|
|
|
|
// Our std::unordered_map argument will ignore the alignment attribute, but that doesn't matter.
|
|
// We'll still have and want it for the actual function call, to keep the args in vector registers.
|
|
#if defined(__clang__) || defined(__GNUC__)
|
|
#pragma GCC diagnostic push
|
|
#pragma GCC diagnostic ignored "-Wignored-attributes"
|
|
#endif
|
|
|
|
typedef void (SOFTRAST_CALL *SingleFunc)(int x, int y, int z, int fog, Vec4IntArg color_in, const PixelFuncID &pixelID);
|
|
SingleFunc GetSingleFunc(const PixelFuncID &id);
|
|
|
|
// The pixels x to x + 3 of row y with mask[i] >= 0. z and fog are per pixel, colors a channel at a time:
|
|
// channel c of pixel i is colors[c * colorStride + i].
|
|
typedef void (SOFTRAST_CALL *SpanFunc)(int x, int y, const int *mask, const int *z, const int *fog, const int *colors, int colorStride, const PixelFuncID &pixelID);
|
|
SpanFunc GetSpanFunc(const PixelFuncID &id);
|
|
|
|
bool CheckDepthTestPassed(GEComparison func, int x, int y, int stride, u16 z);
|
|
|
|
#if defined(__clang__) || defined(__GNUC__)
|
|
#pragma GCC diagnostic pop
|
|
#endif
|
|
|
|
};
|