summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/vega/shader.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/state_trackers/vega/shader.c')
-rw-r--r--src/gallium/state_trackers/vega/shader.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/vega/shader.c b/src/gallium/state_trackers/vega/shader.c
index 3d397f9ed4c..db410e3dadb 100644
--- a/src/gallium/state_trackers/vega/shader.c
+++ b/src/gallium/state_trackers/vega/shader.c
@@ -50,6 +50,7 @@ struct shader {
struct vg_paint *paint;
struct vg_image *image;
+ struct matrix modelview;
struct matrix paint_matrix;
VGboolean drawing_image;
@@ -299,6 +300,7 @@ void shader_bind(struct shader *shader)
renderer_validate_for_shader(ctx->renderer,
(const struct pipe_sampler_state **) samplers,
sampler_views, num_samplers,
+ &shader->modelview,
shader->fs, (const void *) shader->constants, param_bytes);
}
@@ -328,6 +330,15 @@ void shader_set_image(struct shader *shader, struct vg_image *img)
}
/**
+ * Set the transformation to map a vertex to the surface coordinates.
+ */
+void shader_set_surface_matrix(struct shader *shader,
+ const struct matrix *mat)
+{
+ shader->modelview = *mat;
+}
+
+/**
* Set the transformation to map a pixel to the paint coordinates.
*/
void shader_set_paint_matrix(struct shader *shader, const struct matrix *mat)