mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-07 11:20:09 +00:00
8207c548cc
This reverts most of commit f420c143e0
again because it turns out GPUs like combined images and samplers.
But: The one thing we don't revert is allowing the C code to select any
combination of sampler and image:
gsk_vulkan_render_get_image_descriptor() now takes a 2nd argument
specifying the sampler.
This allows the same flexibility as before, we just combine things
early.
This change was inspired by
https://developer.nvidia.com/blog/vulkan-dos-donts/
10 lines
281 B
GLSL
10 lines
281 B
GLSL
layout(set = 0, binding = 0) uniform sampler2D textures[50000];
|
|
layout(set = 1, binding = 0) readonly buffer FloatBuffers {
|
|
float floats[];
|
|
} buffers[50000];
|
|
|
|
#define get_sampler(id) textures[id]
|
|
#define get_buffer(id) buffers[id]
|
|
#define get_float(id) get_buffer(0).floats[id]
|
|
|