From d6cb912d65c9f3790f0b93afa9fb185c739add22 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 16 Jun 2017 16:34:43 -0600 Subject: [PATCH] svga: add a few minor comments Trivial. --- src/gallium/drivers/svga/svga_resource_buffer_upload.c | 5 ++++- src/gallium/drivers/svga/svga_screen_cache.c | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/svga/svga_resource_buffer_upload.c b/src/gallium/drivers/svga/svga_resource_buffer_upload.c index 9d93b48fd36..1b82dbac0d0 100644 --- a/src/gallium/drivers/svga/svga_resource_buffer_upload.c +++ b/src/gallium/drivers/svga/svga_resource_buffer_upload.c @@ -138,7 +138,10 @@ svga_buffer_create_hw_storage(struct svga_screen *ss, } - +/** + * Allocate graphics memory for vertex/index/constant/etc buffer (not + * textures). + */ enum pipe_error svga_buffer_create_host_surface(struct svga_screen *ss, struct svga_buffer *sbuf) diff --git a/src/gallium/drivers/svga/svga_screen_cache.c b/src/gallium/drivers/svga/svga_screen_cache.c index 82d2ebce976..bf66fc60105 100644 --- a/src/gallium/drivers/svga/svga_screen_cache.c +++ b/src/gallium/drivers/svga/svga_screen_cache.c @@ -461,6 +461,7 @@ svga_screen_surface_create(struct svga_screen *svgascreen, key->cachable); if (cachable) { + /* Try to re-cycle a previously freed, cached surface */ if (key->format == SVGA3D_BUFFER) { SVGA3dSurfaceFlags hint_flag; @@ -521,6 +522,7 @@ svga_screen_surface_create(struct svga_screen *svgascreen, } if (!handle) { + /* Unable to recycle surface, allocate a new one */ unsigned usage = 0; if (!key->cachable) -- 2.30.2