diff options
author | Chia-I Wu <[email protected]> | 2015-06-11 07:36:28 +0800 |
---|---|---|
committer | Chia-I Wu <[email protected]> | 2015-06-15 01:23:23 +0800 |
commit | 117926debb72e5027faae885f9aa7f1ca61f6a9c (patch) | |
tree | f7ae8f50d1d8448807735f94657e73c294621b45 /src/gallium/drivers/ilo/ilo_state.h | |
parent | 54e0a8ed5dcaaa0ef483d5960ae86f88e0bf8990 (diff) |
ilo: merge ilo_state_3d*.[ch] to ilo_state.[ch]
With most code replaced to ilo_state_*, what was left did not belong there
anymore.
Diffstat (limited to 'src/gallium/drivers/ilo/ilo_state.h')
-rw-r--r-- | src/gallium/drivers/ilo/ilo_state.h | 74 |
1 files changed, 73 insertions, 1 deletions
diff --git a/src/gallium/drivers/ilo/ilo_state.h b/src/gallium/drivers/ilo/ilo_state.h index e4c6f281a5c..90514d52224 100644 --- a/src/gallium/drivers/ilo/ilo_state.h +++ b/src/gallium/drivers/ilo/ilo_state.h @@ -28,7 +28,6 @@ #ifndef ILO_STATE_H #define ILO_STATE_H -#include "core/ilo_state_3d.h" #include "core/ilo_state_cc.h" #include "core/ilo_state_raster.h" #include "core/ilo_state_sampler.h" @@ -46,6 +45,19 @@ #include "ilo_common.h" /** + * \see brw_context.h + */ +#define ILO_MAX_DRAW_BUFFERS 8 +#define ILO_MAX_CONST_BUFFERS (1 + 12) +#define ILO_MAX_SAMPLER_VIEWS 16 +#define ILO_MAX_SAMPLERS 16 +#define ILO_MAX_SO_BINDINGS 64 +#define ILO_MAX_SO_BUFFERS 4 +#define ILO_MAX_VIEWPORTS 1 + +#define ILO_MAX_SURFACES 256 + +/** * States that we track. * * XXX Do we want to count each sampler or vertex buffer as a state? If that @@ -131,6 +143,7 @@ enum ilo_dirty_flags { }; struct ilo_context; +struct ilo_shader_state; struct ilo_ve_state { unsigned vb_mapping[PIPE_MAX_ATTRIBS]; @@ -143,6 +156,24 @@ struct ilo_ve_state { struct ilo_state_vf vf; }; +struct ilo_vb_state { + struct pipe_vertex_buffer states[PIPE_MAX_ATTRIBS]; + uint32_t enabled_mask; +}; + +struct ilo_ib_state { + struct pipe_resource *buffer; + const void *user_buffer; + unsigned offset; + unsigned index_size; + + /* these are not valid until the state is finalized */ + struct pipe_resource *hw_resource; + unsigned hw_index_size; + /* an offset to be added to pipe_draw_info::start */ + int64_t draw_start_offset; +}; + struct ilo_cbuf_cso { struct pipe_resource *resource; struct ilo_state_surface_buffer_info info; @@ -188,6 +219,14 @@ struct ilo_view_state { unsigned count; }; +struct ilo_so_state { + struct pipe_stream_output_target *states[ILO_MAX_SO_BUFFERS]; + unsigned count; + unsigned append_bitmask; + + bool enabled; +}; + struct ilo_rasterizer_state { struct pipe_rasterizer_state state; @@ -208,6 +247,39 @@ struct ilo_viewport_state { uint32_t vp_data[20 * ILO_MAX_VIEWPORTS]; }; +struct ilo_surface_cso { + struct pipe_surface base; + + bool is_rt; + union { + struct ilo_state_surface rt; + struct ilo_state_zs zs; + } u; +}; + +struct ilo_fb_state { + struct pipe_framebuffer_state state; + + struct ilo_state_surface null_rt; + struct ilo_state_zs null_zs; + + struct ilo_fb_blend_caps { + bool is_unorm; + bool is_integer; + bool force_dst_alpha_one; + + bool can_logicop; + bool can_blend; + bool can_alpha_test; + } blend_caps[PIPE_MAX_COLOR_BUFS]; + + unsigned num_samples; + + bool has_integer_rt; + bool has_hiz; + enum gen_depth_format depth_offset_format; +}; + struct ilo_dsa_state { struct ilo_state_cc_depth_info depth; |