diff options
author | Jonathan Marek <[email protected]> | 2019-01-16 16:06:11 -0500 |
---|---|---|
committer | Rob Clark <[email protected]> | 2019-01-21 09:21:51 -0500 |
commit | 6ef7700ac61f30a3136937722a54e98314f85bbc (patch) | |
tree | 738fbe43aee005526dfc86d4aea04998e2005191 /src/gallium/drivers | |
parent | 0a793c78a35ecadad088e34fcc1088f5126e636d (diff) |
freedreno: a2xx: cleanup init_shader_const
Only 3 vertices are used so we can drop the data for vertex 4
It doesn't make sense to have 1.1 for some coordinates, use 1.0 instead
Signed-off-by: Jonathan Marek <[email protected]>
Reviewed-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r-- | src/gallium/drivers/freedreno/a2xx/fd2_context.c | 17 | ||||
-rw-r--r-- | src/gallium/drivers/freedreno/a2xx/fd2_draw.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/freedreno/a2xx/fd2_gmem.c | 6 |
3 files changed, 11 insertions, 14 deletions
diff --git a/src/gallium/drivers/freedreno/a2xx/fd2_context.c b/src/gallium/drivers/freedreno/a2xx/fd2_context.c index 081b0119cb5..760ad17732a 100644 --- a/src/gallium/drivers/freedreno/a2xx/fd2_context.c +++ b/src/gallium/drivers/freedreno/a2xx/fd2_context.c @@ -46,17 +46,14 @@ static struct pipe_resource * create_solid_vertexbuf(struct pipe_context *pctx) { static const float init_shader_const[] = { - /* for clear/gmem2mem: */ - -1.000000, +1.000000, +1.000000, +1.100000, - +1.000000, +1.000000, -1.000000, -1.100000, - +1.000000, +1.100000, -1.100000, +1.000000, - /* for mem2gmem: (vertices) */ - -1.000000, +1.000000, +1.000000, +1.000000, - +1.000000, +1.000000, -1.000000, -1.000000, - +1.000000, +1.000000, -1.000000, +1.000000, + /* for clear/gmem2mem/mem2gmem (vertices): */ + -1.000000, +1.000000, +1.000000, + +1.000000, +1.000000, +1.000000, + -1.000000, -1.000000, +1.000000, /* for mem2gmem: (tex coords) */ - +0.000000, +0.000000, +1.000000, +0.000000, - +0.000000, +1.000000, +1.000000, +1.000000, + +0.000000, +0.000000, + +1.000000, +0.000000, + +0.000000, +1.000000, }; struct pipe_resource *prsc = pipe_buffer_create(pctx->screen, PIPE_BIND_CUSTOM, PIPE_USAGE_IMMUTABLE, sizeof(init_shader_const)); diff --git a/src/gallium/drivers/freedreno/a2xx/fd2_draw.c b/src/gallium/drivers/freedreno/a2xx/fd2_draw.c index 6dac8ca6a9d..81137705180 100644 --- a/src/gallium/drivers/freedreno/a2xx/fd2_draw.c +++ b/src/gallium/drivers/freedreno/a2xx/fd2_draw.c @@ -207,7 +207,7 @@ fd2_clear(struct fd_context *ctx, unsigned buffers, FD_DIRTY_FRAMEBUFFER | FD_DIRTY_SCISSOR)); fd2_emit_vertex_bufs(ring, 0x9c, (struct fd2_vertex_buf[]) { - { .prsc = fd2_ctx->solid_vertexbuf, .size = 48 }, + { .prsc = fd2_ctx->solid_vertexbuf, .size = 36 }, }, 1); OUT_PKT3(ring, CP_SET_CONSTANT, 2); diff --git a/src/gallium/drivers/freedreno/a2xx/fd2_gmem.c b/src/gallium/drivers/freedreno/a2xx/fd2_gmem.c index e98ae7334ac..263e9d77eb0 100644 --- a/src/gallium/drivers/freedreno/a2xx/fd2_gmem.c +++ b/src/gallium/drivers/freedreno/a2xx/fd2_gmem.c @@ -120,7 +120,7 @@ fd2_emit_tile_gmem2mem(struct fd_batch *batch, struct fd_tile *tile) struct pipe_framebuffer_state *pfb = &batch->framebuffer; fd2_emit_vertex_bufs(ring, 0x9c, (struct fd2_vertex_buf[]) { - { .prsc = fd2_ctx->solid_vertexbuf, .size = 48 }, + { .prsc = fd2_ctx->solid_vertexbuf, .size = 36 }, }, 1); OUT_PKT3(ring, CP_SET_CONSTANT, 2); @@ -254,8 +254,8 @@ fd2_emit_tile_mem2gmem(struct fd_batch *batch, struct fd_tile *tile) float x0, y0, x1, y1; fd2_emit_vertex_bufs(ring, 0x9c, (struct fd2_vertex_buf[]) { - { .prsc = fd2_ctx->solid_vertexbuf, .size = 48, .offset = 0x30 }, - { .prsc = fd2_ctx->solid_vertexbuf, .size = 32, .offset = 0x60 }, + { .prsc = fd2_ctx->solid_vertexbuf, .size = 36, }, + { .prsc = fd2_ctx->solid_vertexbuf, .size = 24, .offset = 36 }, }, 2); /* write texture coordinates to vertexbuf: */ |