X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fgallium%2Fdrivers%2Fsvga%2Fsvga_context.h;h=9a46de643fd20b1c1d159a7996b5ca63390506bf;hb=c7f5c9a3dc6350252e73b541bb85ab3ed9e64a9c;hp=fa7f6cb3bb9becd3cfdf835c0e3074e852635089;hpb=9b21b3c52a8a7d58d08151d1a6bf25c472dec213;p=mesa.git diff --git a/src/gallium/drivers/svga/svga_context.h b/src/gallium/drivers/svga/svga_context.h index fa7f6cb3bb9..9a46de643fd 100644 --- a/src/gallium/drivers/svga/svga_context.h +++ b/src/gallium/drivers/svga/svga_context.h @@ -37,6 +37,7 @@ #define SVGA_TEX_UNITS 8 +#define SVGA_MAX_POINTSIZE 80.0 struct draw_vertex_shader; struct svga_shader_result; @@ -115,7 +116,6 @@ struct svga_depth_stencil_state { /* SVGA3D has one ref/mask/writemask triple shared between front & * back face stencil. We really need two: */ - unsigned stencil_ref:8; unsigned stencil_mask:8; unsigned stencil_writemask:8; @@ -145,8 +145,6 @@ struct svga_rasterizer_state { float slopescaledepthbias; float depthbias; float pointsize; - float pointsize_min; - float pointsize_max; unsigned hw_unfilled:16; /* PIPE_POLYGON_MODE_x */ unsigned need_pipeline:16; /* which prims do we need help for? */ @@ -171,6 +169,11 @@ struct svga_sampler_state { unsigned view_max_lod; }; +struct svga_velems_state { + unsigned count; + struct pipe_vertex_element velem[PIPE_MAX_ATTRIBS]; +}; + /* Use to calculate differences between state emitted to hardware and * current driver-calculated state. */ @@ -180,14 +183,14 @@ struct svga_state const struct svga_depth_stencil_state *depth; const struct svga_rasterizer_state *rast; const struct svga_sampler_state *sampler[PIPE_MAX_SAMPLERS]; + const struct svga_velems_state *velems; - struct pipe_texture *texture[PIPE_MAX_SAMPLERS]; /* or texture ID's? */ + struct pipe_sampler_view *sampler_views[PIPE_MAX_SAMPLERS]; /* or texture ID's? */ struct svga_fragment_shader *fs; struct svga_vertex_shader *vs; struct pipe_vertex_buffer vb[PIPE_MAX_ATTRIBS]; - struct pipe_vertex_element ve[PIPE_MAX_ATTRIBS]; - struct pipe_buffer *cb[PIPE_SHADER_TYPES]; + struct pipe_resource *cb[PIPE_SHADER_TYPES]; struct pipe_framebuffer_state framebuffer; float depthscale; @@ -200,12 +203,12 @@ struct svga_state struct pipe_poly_stipple poly_stipple; struct pipe_scissor_state scissor; struct pipe_blend_color blend_color; + struct pipe_stencil_ref stencil_ref; struct pipe_clip_state clip; struct pipe_viewport_state viewport; unsigned num_samplers; - unsigned num_textures; - unsigned num_vertex_elements; + unsigned num_sampler_views; unsigned num_vertex_buffers; unsigned reduced_prim; @@ -251,7 +254,7 @@ struct svga_hw_clear_state struct svga_hw_view_state { - struct pipe_texture *texture; + struct pipe_resource *texture; struct svga_sampler_view *v; unsigned min_lod; unsigned max_lod; @@ -266,8 +269,6 @@ struct svga_hw_draw_state unsigned ts[16][TS_MAX]; float cb[PIPE_SHADER_TYPES][CB_MAX][4]; - unsigned shader_id[PIPE_SHADER_TYPES]; - struct svga_shader_result *fs; struct svga_shader_result *vs; struct svga_hw_view_state views[PIPE_MAX_SAMPLERS]; @@ -329,10 +330,6 @@ struct svga_context unsigned texture_timestamp; - /* Internally generated shaders: - */ - unsigned white_fs_id; - /* */ struct svga_sw_state sw; @@ -383,6 +380,7 @@ struct svga_context #define SVGA_NEW_VS_RESULT 0x1000000 #define SVGA_NEW_ZERO_STRIDE 0x2000000 #define SVGA_NEW_TEXTURE_FLAGS 0x4000000 +#define SVGA_NEW_STENCIL_REF 0x8000000 @@ -432,6 +430,10 @@ void svga_context_flush( struct svga_context *svga, void svga_hwtnl_flush_retry( struct svga_context *svga ); +struct pipe_context * +svga_context_create(struct pipe_screen *screen, + void *priv); + /*********************************************************************** * Inline conversion functions. These are better-typed than the