diff options
author | Kenneth Graunke <[email protected]> | 2018-07-09 15:15:52 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2019-02-21 10:26:07 -0800 |
commit | 6794f1ffb9cacacdb6e674857882855e4f694524 (patch) | |
tree | 91d2c8be0eea90229d591ee5dec417655468ed88 /src/gallium/drivers/iris/iris_resource.h | |
parent | a3f77eceb4d08fbb83c3a853f339cb77d9b46aa4 (diff) |
iris: rearrange iris_resource.h
Diffstat (limited to 'src/gallium/drivers/iris/iris_resource.h')
-rw-r--r-- | src/gallium/drivers/iris/iris_resource.h | 34 |
1 files changed, 23 insertions, 11 deletions
diff --git a/src/gallium/drivers/iris/iris_resource.h b/src/gallium/drivers/iris/iris_resource.h index 22817193795..41edc51e217 100644 --- a/src/gallium/drivers/iris/iris_resource.h +++ b/src/gallium/drivers/iris/iris_resource.h @@ -27,6 +27,11 @@ #include "util/u_inlines.h" #include "intel/isl/isl.h" +/** + * Resources represent a GPU buffer object or image (mipmap tree). + * + * They contain the storage (BO) and layout information (ISL surface). + */ struct iris_resource { struct pipe_resource base; struct isl_surf surf; @@ -42,17 +47,10 @@ struct iris_state_ref { uint32_t offset; }; -enum isl_format iris_isl_format_for_pipe_format(enum pipe_format pf); - -void iris_init_screen_resource_functions(struct pipe_screen *pscreen); - -static inline struct iris_bo * -iris_resource_bo(struct pipe_resource *p_res) -{ - struct iris_resource *res = (void *) p_res; - return res->bo; -} - +/** + * A view of a surface that can be bound to a color render target or + * depth/stencil attachment. + */ struct iris_surface { struct pipe_surface pipe; struct isl_view view; @@ -61,6 +59,9 @@ struct iris_surface { struct iris_state_ref surface_state; }; +/** + * Transfer object - information about a buffer mapping. + */ struct iris_transfer { struct pipe_transfer base; struct pipe_debug_callback *dbg; @@ -73,4 +74,15 @@ struct iris_transfer { void (*unmap)(struct iris_transfer *); }; +static inline struct iris_bo * +iris_resource_bo(struct pipe_resource *p_res) +{ + struct iris_resource *res = (void *) p_res; + return res->bo; +} + +enum isl_format iris_isl_format_for_pipe_format(enum pipe_format pf); + +void iris_init_screen_resource_functions(struct pipe_screen *pscreen); + #endif |