LibSoftGPU: Vectorize texture sampling and shading

This commit is contained in:
Stephan Unverwerth 2022-01-06 17:06:46 +01:00 committed by Ali Mohammad Pur
commit 034dc480d2
Notes: sideshowbarker 2024-07-17 21:19:54 +09:00
4 changed files with 173 additions and 94 deletions

View file

@ -7,6 +7,7 @@
#pragma once
#include <AK/RefPtr.h>
#include <AK/SIMD.h>
#include <LibGfx/Vector2.h>
#include <LibGfx/Vector4.h>
#include <LibSoftGPU/Image.h>
@ -52,7 +53,7 @@ struct SamplerConfig final {
class Sampler final {
public:
FloatVector4 sample_2d(FloatVector2 const& uv) const;
Vector4<AK::SIMD::f32x4> sample_2d(Vector2<AK::SIMD::f32x4> const& uv) const;
void set_config(SamplerConfig const& config) { m_config = config; }
SamplerConfig const& config() const { return m_config; }