aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/svga/svga_context.c
diff options
context:
space:
mode:
authorNeha Bhende <[email protected]>2020-05-26 21:29:50 +0530
committerMarge Bot <[email protected]>2020-06-05 06:36:54 +0000
commitba37d408da30d87b6848d76242d9d797dbef80a0 (patch)
tree87447cb12f6f5b7ca80c69308ae636639842b4c0 /src/gallium/drivers/svga/svga_context.c
parentccb4ea5a43e89fcc93fff98c881639223f1538e5 (diff)
svga: Performance fixes
This is a squash commit of in house performance fixes and misc bug fixes for GL4.1 support. Performance fixes: * started using system memory for constant buffer to gain 3X performance boost with metro redux Misc bug fixes: * fixed usage of vertexid in shader * added empty control point phase in hull shader for zero ouput control point * misc shader signature fixes * fixed clip_distance input declaration * clearing the dirty bit for the surface while using direct map if surface is already flushed and there is no pending primitive This patch also uses SVGA_RETRY macro for commands retries. Part of it is already used in previous patch. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Charmaine Lee <[email protected]> Signed-off-by: Neha Bhende <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5317>
Diffstat (limited to 'src/gallium/drivers/svga/svga_context.c')
-rw-r--r--src/gallium/drivers/svga/svga_context.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gallium/drivers/svga/svga_context.c b/src/gallium/drivers/svga/svga_context.c
index 4ef99efe989..d80336cf785 100644
--- a/src/gallium/drivers/svga/svga_context.c
+++ b/src/gallium/drivers/svga/svga_context.c
@@ -75,7 +75,9 @@ svga_destroy(struct pipe_context *pipe)
/* free HW constant buffers */
for (shader = 0; shader < ARRAY_SIZE(svga->state.hw_draw.constbuf); shader++) {
- pipe_resource_reference(&svga->state.hw_draw.constbuf[shader], NULL);
+ for (i = 0; i < ARRAY_SIZE(svga->state.hw_draw.constbuf[0]); i++) {
+ pipe_resource_reference(&svga->state.hw_draw.constbuf[shader][i], NULL);
+ }
}
pipe->delete_blend_state(pipe, svga->noop_blend);