summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/vc4/vc4_context.h
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2014-07-21 11:27:35 -0700
committerEric Anholt <[email protected]>2014-08-11 14:45:28 -0700
commita8f2bf0f51222a96a49dfb3d6f9b36d3e54d08cd (patch)
tree5f7ab98c9ba5a69d761b253560908ac9c2358a81 /src/gallium/drivers/vc4/vc4_context.h
parent6a5ece12aac0f079dff3aaf00b2ec5c420b9b1f8 (diff)
vc4: Rewrite the kernel ABI to support texture uniform relocation.
This required building a shader parser that would walk the program to find where the texturing-related uniforms are in the uniforms stream. Note that as of this commit, a new kernel is required for rendering on actual VC4 hardware (currently that commit is named "drm/vc4: Introduce shader validation and better command stream validation.", but is likely to be squashed as part of an eventual merge of the kernel driver).
Diffstat (limited to 'src/gallium/drivers/vc4/vc4_context.h')
-rw-r--r--src/gallium/drivers/vc4/vc4_context.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gallium/drivers/vc4/vc4_context.h b/src/gallium/drivers/vc4/vc4_context.h
index ee9ddcfd82b..010727ff4de 100644
--- a/src/gallium/drivers/vc4/vc4_context.h
+++ b/src/gallium/drivers/vc4/vc4_context.h
@@ -70,6 +70,7 @@ struct vc4_shader_uniform_info {
enum quniform_contents *contents;
uint32_t *data;
uint32_t count;
+ uint32_t num_texture_samples;
};
struct vc4_compiled_shader {
@@ -120,6 +121,7 @@ struct vc4_context {
struct vc4_cl bcl;
struct vc4_cl rcl;
struct vc4_cl shader_rec;
+ struct vc4_cl uniforms;
struct vc4_cl bo_handles;
#ifdef USE_VC4_SIMULATOR
struct vc4_cl bo_pointers;
@@ -195,12 +197,11 @@ int vc4_simulator_flush(struct vc4_context *vc4,
struct drm_vc4_submit_cl *args,
struct vc4_surface *color_surf);
-void vc4_get_uniform_bo(struct vc4_context *vc4,
+void vc4_write_uniforms(struct vc4_context *vc4,
struct vc4_compiled_shader *shader,
struct vc4_constbuf_stateobj *cb,
struct vc4_texture_stateobj *texstate,
- int shader_index, struct vc4_bo **out_bo,
- uint32_t *out_offset);
+ int shader_index);
void vc4_flush(struct pipe_context *pctx);
void vc4_emit_state(struct pipe_context *pctx);