[Mesa-dev] [PATCH 12/14] svga: add some comments in the svga_surface struct
Brian Paul
brianp at vmware.com
Fri Aug 26 15:27:16 UTC 2016
Give more info about backing resources/surfaces.
---
src/gallium/drivers/svga/svga_surface.h | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/src/gallium/drivers/svga/svga_surface.h b/src/gallium/drivers/svga/svga_surface.h
index c166791..2f003b2 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;
};
--
1.9.1
More information about the mesa-dev
mailing list