mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:07:47 +00:00
LibGL+LibSoftGPU: Add GPU side shader infrastructure
This adds a shader class to LibSoftGPU and makes use of it when linking GLSL program in LibGL. Also adds actual rendering code to the shader tests.
This commit is contained in:
parent
4ad41e6680
commit
93ab2db80f
11 changed files with 96 additions and 3 deletions
|
@ -22,6 +22,7 @@
|
|||
#include <LibSoftGPU/PixelConverter.h>
|
||||
#include <LibSoftGPU/PixelQuad.h>
|
||||
#include <LibSoftGPU/SIMD.h>
|
||||
#include <LibSoftGPU/Shader.h>
|
||||
#include <math.h>
|
||||
|
||||
namespace SoftGPU {
|
||||
|
@ -1626,6 +1627,11 @@ NonnullRefPtr<GPU::Image> Device::create_image(GPU::PixelFormat const& pixel_for
|
|||
return adopt_ref(*new Image(this, pixel_format, width, height, depth, max_levels));
|
||||
}
|
||||
|
||||
ErrorOr<NonnullRefPtr<GPU::Shader>> Device::create_shader(GPU::IR::Shader const&)
|
||||
{
|
||||
return adopt_ref(*new Shader(this));
|
||||
}
|
||||
|
||||
void Device::set_sampler_config(unsigned sampler, GPU::SamplerConfig const& config)
|
||||
{
|
||||
VERIFY(config.bound_image.is_null() || config.bound_image->ownership_token() == this);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue