mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 22:57:44 +00:00
LibGL+LibGPU+LibSoftGPU: Move ImageDataLayout.h to LibGPU
This commit is contained in:
parent
4e0643ae97
commit
54307a9cd3
4 changed files with 7 additions and 7 deletions
|
@ -60,7 +60,7 @@ void Texture2D::replace_sub_texture_data(GLuint lod, GLint xoffset, GLint yoffse
|
|||
int const physical_width = pixels_per_row > 0 ? pixels_per_row : width;
|
||||
size_t const physical_width_bytes = physical_width * pixel_size_bytes;
|
||||
|
||||
SoftGPU::ImageDataLayout layout;
|
||||
GPU::ImageDataLayout layout;
|
||||
layout.column_stride = pixel_size_bytes;
|
||||
layout.row_stride = physical_width_bytes + (byte_alignment - physical_width_bytes % byte_alignment) % byte_alignment;
|
||||
layout.depth_stride = 0;
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
#include <LibGPU/ImageFormat.h>
|
||||
|
||||
namespace SoftGPU {
|
||||
namespace GPU {
|
||||
|
||||
struct ImageDataLayout final {
|
||||
GPU::ImageFormat format;
|
|
@ -39,7 +39,7 @@ Image::Image(unsigned width, unsigned height, unsigned depth, unsigned max_level
|
|||
m_num_levels = level + 1;
|
||||
}
|
||||
|
||||
void Image::write_texels(unsigned layer, unsigned level, Vector3<unsigned> const& offset, Vector3<unsigned> const& size, void const* data, ImageDataLayout const& layout)
|
||||
void Image::write_texels(unsigned layer, unsigned level, Vector3<unsigned> const& offset, Vector3<unsigned> const& size, void const* data, GPU::ImageDataLayout const& layout)
|
||||
{
|
||||
VERIFY(layer < num_layers());
|
||||
VERIFY(level < num_levels());
|
||||
|
@ -58,7 +58,7 @@ void Image::write_texels(unsigned layer, unsigned level, Vector3<unsigned> const
|
|||
}
|
||||
}
|
||||
|
||||
void Image::read_texels(unsigned layer, unsigned level, Vector3<unsigned> const& offset, Vector3<unsigned> const& size, void* data, ImageDataLayout const& layout) const
|
||||
void Image::read_texels(unsigned layer, unsigned level, Vector3<unsigned> const& offset, Vector3<unsigned> const& size, void* data, GPU::ImageDataLayout const& layout) const
|
||||
{
|
||||
VERIFY(layer < num_layers());
|
||||
VERIFY(level < num_levels());
|
||||
|
|
|
@ -11,12 +11,12 @@
|
|||
#include <AK/RefCounted.h>
|
||||
#include <AK/RefPtr.h>
|
||||
#include <LibGPU/Enums.h>
|
||||
#include <LibGPU/ImageDataLayout.h>
|
||||
#include <LibGPU/ImageFormat.h>
|
||||
#include <LibGfx/Vector3.h>
|
||||
#include <LibGfx/Vector4.h>
|
||||
#include <LibSoftGPU/Buffer/Typed3DBuffer.h>
|
||||
#include <LibSoftGPU/Config.h>
|
||||
#include <LibSoftGPU/ImageDataLayout.h>
|
||||
|
||||
namespace SoftGPU {
|
||||
|
||||
|
@ -156,8 +156,8 @@ public:
|
|||
pack_color(color, texel_pointer(layer, level, x, y, z), GPU::ImageFormat::BGRA8888);
|
||||
}
|
||||
|
||||
void write_texels(unsigned layer, unsigned level, Vector3<unsigned> const& offset, Vector3<unsigned> const& size, void const* data, ImageDataLayout const& layout);
|
||||
void read_texels(unsigned layer, unsigned level, Vector3<unsigned> const& offset, Vector3<unsigned> const& size, void* data, ImageDataLayout const& layout) const;
|
||||
void write_texels(unsigned layer, unsigned level, Vector3<unsigned> const& offset, Vector3<unsigned> const& size, void const* data, GPU::ImageDataLayout const& layout);
|
||||
void read_texels(unsigned layer, unsigned level, Vector3<unsigned> const& offset, Vector3<unsigned> const& size, void* data, GPU::ImageDataLayout const& layout) const;
|
||||
void copy_texels(Image const& source, unsigned source_layer, unsigned source_level, Vector3<unsigned> const& source_offset, Vector3<unsigned> const& size, unsigned destination_layer, unsigned destination_level, Vector3<unsigned> const& destination_offset);
|
||||
|
||||
private:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue