Commit graph

27 commits

Author SHA1 Message Date
Jelle Raaijmakers
edcb6176ce LibGL+Lib*GPU: Set model view and projection matrices separately
LibSoftGPU used to calculate the normal transformation based on the
model view transformation for every primitive, because that's when we
sent over the matrix. By making LibGL a bit smarter and only update the
matrices when they could have changed, we only need to calculate the
normal transformation once on every matrix update.

When viewing `Tuba.obj` in 3DFileViewer, this brings the percentage of
time spent in `FloatMatrix4x4::inverse()` down from 15% to 0%. :^)
2023-10-15 12:14:07 +02:00
Timothy Flynn
c911781c21 Everywhere: Remove needless trailing semi-colons after functions
This is a new option in clang-format-16.
2023-07-08 10:32:56 +01:00
Tim Schumacher
874c7bba28 LibCore: Remove Stream.h 2023-02-13 00:50:07 +00:00
Tim Schumacher
606a3982f3 LibCore: Move Stream-based file into the Core namespace 2023-02-13 00:50:07 +00:00
Andrew Kaster
100fb38c3e Kernel+Userland: Move LibC/sys/ioctl_numbers to Kernel/API/Ioctl.h
This header has always been fundamentally a Kernel API file. Move it
where it belongs. Include it directly in Kernel files, and make
Userland applications include it via sys/ioctl.h rather than directly.
2023-01-21 10:43:59 -07:00
Lucas CHOLLET
0ab29cffd2 LibVirtGPU: Port to Core::Stream 2023-01-16 17:05:41 +00:00
Stephan Unverwerth
2658351fa6 LibVirtGPU: Adopt rendering code from VirGLDemo 2022-12-26 09:39:20 +01:00
Stephan Unverwerth
1ec791fcd0 LibVirtGPU: Adopt device initialization code from VirGLDemo 2022-12-26 09:39:20 +01:00
Stephan Unverwerth
086c7c4c88 LibVirtGPU: Create and initialize device from file descriptor 2022-12-26 09:39:20 +01:00
Stephan Unverwerth
4b792cb7be LibVirtGPU: Replace magic values with command bitfields 2022-12-26 09:39:20 +01:00
Stephan Unverwerth
93b5af932e LibVirtGPU: Add utility header for command flag bitfields 2022-12-26 09:39:20 +01:00
Stephan Unverwerth
65a1ebcccf LibVirtGPU: Add enum for Gallium texture formats 2022-12-26 09:39:20 +01:00
Stephan Unverwerth
0993aba321 LibVirtGPU: Add length verification to append_create_shader() 2022-12-26 09:39:20 +01:00
Stephan Unverwerth
140338670a LibVirtGPU: Make depth and color clearing separate functions 2022-12-26 09:39:20 +01:00
Stephan Unverwerth
03884fad74 LibVirtGPU: Remove hard coded primitive type in append_draw_vbo() 2022-12-26 09:39:20 +01:00
Stephan Unverwerth
b5acfba487 LibVirtGPU: Improve append_set_framebuffer_state_no_attach()
Remove hardcoded framebuffer size and add argument verification.
2022-12-26 09:39:20 +01:00
Stephan Unverwerth
4a4aa23aed LibVirtGPU: Remove hardcoded size from append_viewport() 2022-12-26 09:39:20 +01:00
Stephan Unverwerth
7a2b9ad164 LibVirtGPU: Drop gl_ prefix from CommandBufferBuilder methods 2022-12-26 09:39:20 +01:00
Stephan Unverwerth
b220ed6b5c LibVirtGPU: Use c++ style casts in CommandBuilder 2022-12-26 09:39:20 +01:00
Stephan Unverwerth
44b2a746ca LibVirtGPU: Improve type safety of encode_command()
ObjectType is now passed as an enum instead of a plain number. The
underlying type for both ObjectType and VirGLCommand have been reduced
to u8 to make sure they fit in the encoded command. Command length is
verified to not overflow u16.
2022-12-26 09:39:20 +01:00
Stephan Unverwerth
ce57174802 LibVirtGPU: Make BindTarget an enum and move it into VirtGPU::Protocol 2022-12-26 09:39:20 +01:00
Stephan Unverwerth
51ac0d73a3 LibVirtGPU: Move VirGLDemo protocol code into VirtGPU namespace 2022-12-26 09:39:20 +01:00
Stephan Unverwerth
a95eea5ae2 LibVirtGPU: Add newlines between CommandBuilder methods 2022-12-26 09:39:20 +01:00
Stephan Unverwerth
255b12ea97 LibVirtGPU: Remove unnecessary BufferBuilder constructor deletion
Since there is a non-default constructor this line is not needed.
2022-12-26 09:39:20 +01:00
Stephan Unverwerth
a34998fb76 LibVirtGPU: Adopt virgl protocol files from VirGLDemo 2022-12-26 09:39:20 +01:00
Stephan Unverwerth
bd7931ff23 LibGPU+LibVirtGPU: Allow loading the driver and instantiating the device
This adds LibVirtGPU to the list of allowed drivers in LibGPU and adds a
factory method to create the device to libVirtGPU.
2022-12-26 09:39:20 +01:00
Stephan Unverwerth
c52abe0bea LibVirtGPU: Add a new GPU device that talks to our VirtIO-GPU driver
At this moment this only contains function stubs.
2022-12-26 09:39:20 +01:00