summaryrefslogtreecommitdiff
path: root/src/gallium/state_trackers/vega/paint.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/state_trackers/vega/paint.c')
-rw-r--r--src/gallium/state_trackers/vega/paint.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/gallium/state_trackers/vega/paint.c b/src/gallium/state_trackers/vega/paint.c
index 04a6ba9cdc..d8f6299b2d 100644
--- a/src/gallium/state_trackers/vega/paint.c
+++ b/src/gallium/state_trackers/vega/paint.c
@@ -34,6 +34,7 @@
#include "pipe/p_compiler.h"
#include "pipe/p_inlines.h"
+#include "util/u_format.h"
#include "util/u_memory.h"
#include "util/u_math.h"
@@ -76,7 +77,8 @@ struct vg_paint {
struct pipe_sampler_state sampler;
} pattern;
- struct pipe_constant_buffer cbuf;
+ /* XXX next 3 all unneded? */
+ struct pipe_buffer *cbuf;
struct pipe_shader_state fs_state;
void *fs;
};
@@ -151,10 +153,9 @@ static INLINE struct pipe_texture *create_gradient_texture(struct vg_paint *p)
templ.target = PIPE_TEXTURE_1D;
templ.format = PIPE_FORMAT_A8R8G8B8_UNORM;
templ.last_level = 0;
- templ.width[0] = 1024;
- templ.height[0] = 1;
- templ.depth[0] = 1;
- pf_get_block(PIPE_FORMAT_A8R8G8B8_UNORM, &templ.block);
+ templ.width0 = 1024;
+ templ.height0 = 1;
+ templ.depth0 = 1;
templ.tex_usage = PIPE_TEXTURE_USAGE_SAMPLER;
tex = screen->texture_create(screen, &templ);
@@ -328,8 +329,8 @@ static INLINE void paint_pattern_buffer(struct vg_paint *paint, void *buffer)
map[4] = 0.f;
map[5] = 1.f;
- map[6] = paint->pattern.texture->width[0];
- map[7] = paint->pattern.texture->height[0];
+ map[6] = paint->pattern.texture->width0;
+ map[7] = paint->pattern.texture->height0;
{
struct matrix mat;
memcpy(&mat, &ctx->state.vg.fill_paint_to_user_matrix,