summaryrefslogtreecommitdiffstats
path: root/video/out/gpu/ra.h
diff options
context:
space:
mode:
Diffstat (limited to 'video/out/gpu/ra.h')
-rw-r--r--video/out/gpu/ra.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/video/out/gpu/ra.h b/video/out/gpu/ra.h
index 7a2fa0e11c..15fa782bdd 100644
--- a/video/out/gpu/ra.h
+++ b/video/out/gpu/ra.h
@@ -26,6 +26,9 @@ struct ra {
// time.
size_t max_shmem;
+ // Maximum push constant size. Set by the RA backend at init time.
+ size_t max_pushc_size;
+
// Set of supported texture formats. Must be added by RA backend at init time.
// If there are equivalent formats with different caveats, the preferred
// formats should have a lower index. (E.g. GLES3 should put rg8 before la.)
@@ -245,6 +248,7 @@ struct ra_renderpass_params {
// Uniforms, including texture/sampler inputs.
struct ra_renderpass_input *inputs;
int num_inputs;
+ size_t push_constants_size; // must be <= ra.max_pushc_size and a multiple of 4
// Highly implementation-specific byte array storing a compiled version
// of the program. Can be used to speed up shader compilation. A backend
@@ -317,6 +321,7 @@ struct ra_renderpass_run_params {
// even if they do not change.
struct ra_renderpass_input_val *values;
int num_values;
+ void *push_constants; // must be set if params.push_constants_size > 0
// --- pass->params.type==RA_RENDERPASS_TYPE_RASTER only
@@ -387,6 +392,10 @@ struct ra_fns {
// but must be implemented if RA_CAP_BUF_RO is supported.
struct ra_layout (*uniform_layout)(struct ra_renderpass_input *inp);
+ // Returns the layout requirements of a push constant element. Optional,
+ // but must be implemented if ra.max_pushc_size > 0.
+ struct ra_layout (*push_constant_layout)(struct ra_renderpass_input *inp);
+
// Clear the dst with the given color (rgba) and within the given scissor.
// dst must have dst->params.render_dst==true. Content outside of the
// scissor is preserved.