4 Commits

Author SHA1 Message Date
Brandon DeRosier
c49cfdc9a9 [Flutter GPU] Texture binding, index binding, attachments, depth state. (flutter/engine#48386)
Now rendering textured 3D models!

* Combined depth+stencil attachment.
* Allow for multiple color attachments.
* Add blend mode configuration.
* Fix uniform ordering for vertex shaders.
* Texture binding and sampling options.
* Index buffer binding.
* Depth configuration.
2023-11-26 19:47:16 -08:00
Brandon DeRosier
05f43a96aa [Flutter GPU] Raster encoding. First triangle! (flutter/engine#48314)
First triangle, in the framework! 🎉 

Adds shader libraries, pipelines, command buffers, render passes, etc.

* Light pipelines/shader objects. No optimization yet, pipeline warming
to come.
* "Dynamic" command style. Don't re-send bindings if you don't need to.
Essentially: https://github.com/flutter/flutter/issues/133179
* No need to explicitly encode passes.
* Minimal descriptor usage.
* Nothing is async, except for the optional command buffer completion
callback.

It took a bunch of experimenting to get here, but I think things are
starting to look pretty neat. :)

Todo:
* Land the shader bundle format/remove the testing hacks & fixtures that
piggyback off of the runtime effect system.
* Add remaining calls for blend config, clearing bindings, etc.
* Inconsistent error handling patterns that need cleanup.
* Maybe: Surface exceptions for validation errors.
* Handle the texture usage bitmask more elegantly.
2023-11-24 19:02:58 -08:00
Brandon DeRosier
f553fe0023 [Flutter GPU] Add Textures. (flutter/engine#48118) 2023-11-16 22:28:54 -08:00
Brandon DeRosier
fa96666e03 [Flutter GPU] Add DeviceBuffer. (flutter/engine#47699)
Part of http://flutter.dev/go/impeller-dart

Resolves https://github.com/flutter/flutter/issues/130924.
Resolves https://github.com/flutter/flutter/issues/130925.

Create and upload data to host visible device buffers. Commands should allow for binding either HostBuffers (which eventually resolve to DeviceBuffers) or DeviceBuffers. There's a `Buffer` mixin to allow for expressing this in `BufferView`, but this may end up changing once I actually add Commands and need to solve the puzzle.
2023-11-11 00:56:51 +00:00