Skip to content

Commit f4cc99c

Browse files
committed
Fix blank sampling on Raspberry PI (again)
1 parent 33f1379 commit f4cc99c

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

pathfinder/core/renderer.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,12 @@ std::shared_ptr<Sampler> Renderer::get_default_sampler() {
156156
// Note: It has to be CLAMP_TO_EDGE. Artifacts will show for both REPEAT and MIRRORED_REPEAT.
157157
flags.value = 0;
158158

159-
return get_or_create_sampler(TextureSamplingFlags{});
159+
// Raspberry PI only supports NEAREST for NPOT textures.
160+
#if defined(__linux__) && defined(__ARM_ARCH)
161+
flags.value |= TextureSamplingFlags::NEAREST_MIN | TextureSamplingFlags::NEAREST_MAG;
162+
#endif
163+
164+
return get_or_create_sampler(flags);
160165
}
161166

162167
void Renderer::upload_texture_metadata(const std::vector<TextureMetadataEntry> &metadata,

0 commit comments

Comments
 (0)