mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-29 17:23:40 +01:00
samplerjit: Refactor sampler ID calculation.
Make it the same as pixel func IDs.
This commit is contained in:
1 parent
6aec68aa5c
commit
3bc6009158
5 files changed
+158
-156
No files matched your search
@@ -84,8 +84,15 @@ void DrawSprite(const VertexData& v0, const VertexData& v1) {
|
||||
if (Memory::IsValidAddress(texaddr))
|
||||
texptr = Memory::GetPointerUnchecked(texaddr);
|
||||
|
||||
// These look at gstate.
|
||||
SamplerID samplerID;
|
||||
ComputeSamplerID(&samplerID);
|
||||
PixelFuncID pixelID;
|
||||
ComputePixelFuncID(&pixelID);
|
||||
|
||||
ScreenCoords pprime(v0.screenpos.x, v0.screenpos.y, 0);
|
||||
Sampler::NearestFunc nearestFunc = Sampler::GetNearestFunc(); // Looks at gstate.
|
||||
Sampler::NearestFunc nearestFunc = Sampler::GetNearestFunc(samplerID);
|
||||
Rasterizer::SingleFunc drawPixel = Rasterizer::GetSingleFunc(pixelID);
|
||||
|
||||
DrawingCoords pos0 = TransformUnit::ScreenToDrawing(v0.screenpos);
|
||||
// Include the ending pixel based on its center, not start.
|
||||
@@ -99,10 +106,6 @@ void DrawSprite(const VertexData& v0, const VertexData& v1) {
|
||||
|
||||
bool isWhite = v1.color0 == Vec4<int>(255, 255, 255, 255);
|
||||
|
||||
PixelFuncID pixelID;
|
||||
ComputePixelFuncID(&pixelID);
|
||||
Rasterizer::SingleFunc drawPixel = Rasterizer::GetSingleFunc(pixelID);
|
||||
|
||||
constexpr int MIN_LINES_PER_THREAD = 32;
|
||||
|
||||
if (gstate.isTextureMapEnabled()) {
|
||||
|
||||
Reference in new issue
Block a user