summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2016-08-25 18:04:51 -0600
committerBrian Paul <[email protected]>2016-08-26 14:20:19 -0600
commitbb7f094b3711614953ee699950c7b728efc48c54 (patch)
treee406040fcd81098cb8e6506694d8d0dc8e847f5d /src
parentdcf63339e7f95c206f05d64fa5df27340188ac12 (diff)
svga: add some comments in the svga_surface struct
Give more info about backing resources/surfaces. Reviewed-by: Neha Bhende <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/svga/svga_surface.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/gallium/drivers/svga/svga_surface.h b/src/gallium/drivers/svga/svga_surface.h
index c166791e1e7..2f003b22cc6 100644
--- a/src/gallium/drivers/svga/svga_surface.h
+++ b/src/gallium/drivers/svga/svga_surface.h
@@ -45,6 +45,12 @@ struct svga_surface
struct pipe_surface base;
struct svga_host_surface_cache_key key;
+
+ /*
+ * Note that the handle may point at a secondary / backing resource
+ * created by svga_texture_view_surface() which is something other
+ * than svga_texture(base->texture)->handle.
+ */
struct svga_winsys_surface *handle;
unsigned real_layer;
@@ -55,6 +61,16 @@ struct svga_surface
/* VGPU10 */
SVGA3dRenderTargetViewId view_id;
+
+ /*
+ * As with 'handle' above, this may point to a secondary / backing resource.
+ * We can't have one resource bound as both a render target and a shader
+ * resource at the same time. But we sometimes want to do that, such as
+ * for mipmap generation where we sample from one level and render into
+ * another.
+ * In this situation, the backed surface is the render target while the
+ * original surface is the shader resource.
+ */
struct svga_surface *backed;
};