Commit Graph
159 Commits
Author SHA1 Message Date
nicehack d1e3469ca5 Merge pull request #927 from nice0hack/master
Add wgpu graphics server
2026-08-17 21:52:40 +03:00
Dmitry Stepanov 5112072d1e bump msrv + clippy fixes 2026-07-04 20:54:03 +03:00
Dmitry Stepanov 7f33a13ff9 merged TypeUuidProvider trait into Reflect 2026-05-28 21:50:17 +03:00
June e8740b6452 Fix read_pixels_of_type UB: use bytemuck::cast_slice (#918)
* fix: eliminate UB in read_pixels_of_type via bytemuck::cast_slice

The previous implementation used Vec::from_raw_parts to reinterpret a
Vec<u8> as Vec<T>, then mem::forget to suppress the original Vec's
destructor. This was UB for two reasons:
1. mem::forget receives an invalid value (already-transferred ownership)
2. Vec<T> deallocates with align_of::<T>(), but the memory was allocated
   with align_of::<u8>() = 1, violating alloc/dealloc layout invariants

Replace with bytemuck::cast_slice + to_vec(), which safely casts the
byte slice and copies into a properly-aligned Vec<T>. The Pod bound
already guarantees valid bit patterns for any byte sequence.

Closes #827

* fix: zero-copy TypedPixels<T> wrapper preserves original byte layout

Per @mrDIMAS review: avoid the .to_vec() copy by introducing a
TypedPixels<T> proxy struct that owns the original Vec<u8> (preserving
its allocation layout for correct deallocation) and exposes &[T] via
Deref + bytemuck::cast_slice. Mirrors the BytesStorage pattern used in
fyrox-impl/src/scene/mesh/buffer.rs.

The single caller (HDR luminance histogram) uses &pixels as a slice,
which works unchanged via deref coercion.
2026-05-14 10:48:13 +03:00
Dmitry Stepanov 4a0602ab25 bump version for the future release
- helps to catch bug reports from the "nightly" version of the engine
2026-03-30 20:50:58 +03:00
Dmitry Stepanov 9e9e2d7032 1.0.1 + changelog 2026-03-28 09:39:38 +03:00
Dmitry Stepanov 496414ee33 bump version 2026-02-12 19:08:48 +03:00
Dmitry Stepanov 4de934e11f 1.0.0-rc.2 2026-02-05 22:04:37 +03:00
Dmitry Stepanov 586616185e make shader entities inspectable 2025-12-17 21:43:12 +03:00
Dmitry Stepanov 4bf226e778 added missing docs 2025-11-10 18:47:46 +03:00
Dmitry Stepanov f11587d345 GraphicsServer::begin_scope 2025-11-08 20:17:56 +03:00
Dmitry Stepanov cbce959830 ability to specify debug groups for graphics commands 2025-11-08 12:54:07 +03:00
b-guild deca3f7ad7 impl Display and impl Error for various errors 2025-10-23 11:10:48 -07:00
Dmitry Stepanov ef39d2aada updated msrv 2025-10-22 20:27:20 +03:00
b-guild 89a3228e6b Clarifying fyrox-graphics and rendering code in fyrox-impl 2025-08-29 00:11:20 -07:00
b-guild 4a90e18b2c Merge branch 'master' into graphics 2025-08-24 12:48:58 -07:00
b-guild c14a52a6e7 Clarifying fyrox-graphics 2025-08-24 12:46:19 -07:00
Dmitry Stepanov a5460b6af9 ability to create gpu program from shaders 2025-08-24 11:03:22 +03:00
Dmitry Stepanov f97851f11d updated deps 2025-08-10 10:24:13 +03:00
Dmitry Stepanov 738a7168c0 removed useless warnings + removed dead code + updated deps 2025-08-08 23:21:29 +03:00
Dmitry Stepanov 5cd9cef224 fixed code snippets in the docs 2025-06-29 18:36:25 +03:00
Dmitry Stepanov 67d0f94405 use f32 to calculate memory usage in megabytes 2025-06-20 21:43:46 +03:00
Dmitry Stepanov dc760fad78 pretty printing for graphics server memory usage 2025-06-19 23:58:39 +03:00
Dmitry Stepanov ea3d0914ac ability to fetch memory usage by the graphics server 2025-06-19 23:52:04 +03:00
Dmitry Stepanov dbf8b90eee prefilter environment map to be physically correct 2025-06-14 21:32:26 +03:00
Dmitry Stepanov 4dda250466 name for gpu buffers 2025-06-14 19:38:43 +03:00
Dmitry Stepanov d9744687c2 named gpu textures
- makes debugging easier
- part of named resources refactoring
2025-06-14 11:32:31 +03:00
Dmitry Stepanov a2732a7792 ability to specify the face of the cube map in frame buffer attachment 2025-06-12 09:56:04 +03:00
Dmitry Stepanov 49c8b1aeda RG16F texture format 2025-06-08 21:37:39 +03:00
Dmitry Stepanov d477b5cb11 GraphicsServer::generate_mipmap 2025-06-07 21:58:50 +03:00
Dmitry Stepanov dae9a67050 ability to specify mip level when for frame buffer attachments 2025-06-07 10:49:45 +03:00
Dmitry Stepanov 4ff8c26017 GraphicsServer::create_cube_render_target 2025-06-01 11:29:34 +03:00
Dmitry Stepanov 4877afb072 fixed cube texture to use only one size parameter instead width+height
- width+height makes no sense for cube textures anyway because width must be equal to height, otherwise it is not a cube and pretty much any gapi will reject such textures
2025-05-31 22:00:26 +03:00
Dmitry Stepanov 0e3bd07c38 1.0.0-rc.1 2025-05-29 18:58:18 +03:00
Dmitry Stepanov 82e53ba5d7 moved opengl-specific code to fyrox-graphics-gl 2025-05-25 16:32:36 +03:00
Dmitry Stepanov 4a76a43992 refactored ui renderer to use materials 2025-05-24 19:19:49 +03:00
Dmitry Stepanov 78859fc807 fyrox_widgetData built-in property group 2025-05-24 10:51:22 +03:00
b-guild b45f85f551 Fixing potential panic in patch_error_message 2025-04-12 16:06:05 -07:00
Dmitry Stepanov 10a4dc048b use trait upcasting and remove as_any for ResourceData
- bumped msrv to 1.86
2025-04-06 18:56:17 +03:00
Dmitry Stepanov 6d2874b8d5 fixed clippy warnings 2025-04-06 17:11:55 +03:00
Dmitry Stepanov 65c08a5483 GpuShader entity
- a step toward render pipeline object
2025-03-23 20:56:54 +03:00
Dmitry Stepanov fc13cbb5a6 fixed doc tests 2025-03-23 15:21:14 +03:00
Dmitry Stepanov 6af1955203 added docs 2025-03-23 09:35:56 +03:00
Dmitry Stepanov 140243840d moved sampler enums to the respective module 2025-03-22 18:44:33 +03:00
Dmitry Stepanov 098897d31d use sampler+texture pair instead of old-fashioned combined texture
- makes gpu texture immutable
- changes in sampler properties of client-side textures results in full re-creation of the sampler on the renderer side
- a step furher toward better modern gapi support
2025-03-22 18:30:22 +03:00
Dmitry Stepanov ca46993f35 defaults for gpu sampler 2025-03-22 18:28:07 +03:00
Dmitry Stepanov 5d78995cbb fixed incorrect sampler params 2025-03-22 09:44:05 +03:00
Dmitry Stepanov cabd1f72bd added gpu sampler to fyrox-graphics 2025-03-21 22:04:55 +03:00
Dmitry Stepanov 548b4e0989 removed wasm-unsupported set_border_color of gpu texture 2025-03-20 23:04:38 +03:00
Dmitry Stepanov 46f4491b24 removed get_image+read_pixels methods from gpu texture
- `get_image` relied on wasm-unsupported `glGetTextImage`
- `read_pixels` was moved to the frame buffer, because this function was wrongly placed in the first place
- `read_pixels` api was improved to be able to read from different attachments
2025-03-20 22:07:03 +03:00