diff options
Diffstat (limited to 'src/gallium/drivers/ilo/ilo_state.h')
-rw-r--r-- | src/gallium/drivers/ilo/ilo_state.h | 39 |
1 files changed, 21 insertions, 18 deletions
diff --git a/src/gallium/drivers/ilo/ilo_state.h b/src/gallium/drivers/ilo/ilo_state.h index a1d4b7bffcb..7343b20e357 100644 --- a/src/gallium/drivers/ilo/ilo_state.h +++ b/src/gallium/drivers/ilo/ilo_state.h @@ -29,6 +29,7 @@ #define ILO_STATE_H #include "pipe/p_state.h" +#include "util/u_dynarray.h" #include "ilo_common.h" @@ -349,25 +350,27 @@ struct ilo_fb_state { unsigned num_samples; }; +struct ilo_global_binding_cso { + struct pipe_resource *resource; + uint32_t *handle; +}; + +/* + * In theory, we would like a "virtual" bo that serves as the global memory + * region. The virtual bo would reserve a region in the GTT aperture, but the + * pages of it would come from those of the global bindings. + * + * The virtual bo would be created in launch_grid(). The global bindings + * would be added to the virtual bo. A SURFACE_STATE for the virtual bo would + * be created. The handles returned by set_global_binding() would be offsets + * into the virtual bo. + * + * But for now, we will create a SURFACE_STATE for each of the bindings. The + * handle of a global binding consists of the offset and the binding table + * index. + */ struct ilo_global_binding { - /* - * XXX These should not be treated as real resources (and there could be - * thousands of them). They should be treated as regions in GLOBAL - * resource, which is the only real resource. - * - * That is, a resource here should instead be - * - * struct ilo_global_region { - * struct pipe_resource base; - * int offset; - * int size; - * }; - * - * and it describes the region [offset, offset + size) in GLOBAL - * resource. - */ - struct pipe_resource *resources[PIPE_MAX_SHADER_RESOURCES]; - uint32_t *handles[PIPE_MAX_SHADER_RESOURCES]; + struct util_dynarray bindings; unsigned count; }; |