diff options
Diffstat (limited to 'src/gallium/include')
-rw-r--r-- | src/gallium/include/pipe/p_config.h | 5 | ||||
-rw-r--r-- | src/gallium/include/pipe/p_defines.h | 123 | ||||
-rw-r--r-- | src/gallium/include/pipe/p_screen.h | 5 | ||||
-rw-r--r-- | src/gallium/include/pipe/p_state.h | 13 | ||||
-rw-r--r-- | src/gallium/include/state_tracker/dri1_api.h | 1 | ||||
-rw-r--r-- | src/gallium/include/state_tracker/drm_api.h | 1 | ||||
-rw-r--r-- | src/gallium/include/state_tracker/graw.h | 23 | ||||
-rw-r--r-- | src/gallium/include/state_tracker/st_api.h | 4 |
8 files changed, 108 insertions, 67 deletions
diff --git a/src/gallium/include/pipe/p_config.h b/src/gallium/include/pipe/p_config.h index c5928dde47..b81702a4fa 100644 --- a/src/gallium/include/pipe/p_config.h +++ b/src/gallium/include/pipe/p_config.h @@ -165,6 +165,11 @@ #define PIPE_OS_UNIX #endif +#if defined(__CYGWIN__) +#define PIPE_OS_CYGWIN +#define PIPE_OS_UNIX +#endif + /* * Try to auto-detect the subsystem. * diff --git a/src/gallium/include/pipe/p_defines.h b/src/gallium/include/pipe/p_defines.h index a852ad97ca..b54a6ef824 100644 --- a/src/gallium/include/pipe/p_defines.h +++ b/src/gallium/include/pipe/p_defines.h @@ -119,11 +119,11 @@ enum pipe_error { #define PIPE_POLYGON_MODE_LINE 1 #define PIPE_POLYGON_MODE_POINT 2 -/** Polygon front/back window, also for culling */ -#define PIPE_WINDING_NONE 0 -#define PIPE_WINDING_CW 1 -#define PIPE_WINDING_CCW 2 -#define PIPE_WINDING_BOTH (PIPE_WINDING_CW | PIPE_WINDING_CCW) +/** Polygon face specification, eg for culling */ +#define PIPE_FACE_NONE 0 +#define PIPE_FACE_FRONT 1 +#define PIPE_FACE_BACK 2 +#define PIPE_FACE_FRONT_AND_BACK (PIPE_FACE_FRONT | PIPE_FACE_BACK) /** Stencil ops */ #define PIPE_STENCIL_OP_KEEP 0 @@ -377,7 +377,8 @@ enum pipe_transfer_usage { #define PIPE_QUERY_OCCLUSION_COUNTER 0 #define PIPE_QUERY_PRIMITIVES_GENERATED 1 #define PIPE_QUERY_PRIMITIVES_EMITTED 2 -#define PIPE_QUERY_TYPES 3 +#define PIPE_QUERY_TIME_ELAPSED 3 +#define PIPE_QUERY_TYPES 4 /** @@ -411,46 +412,76 @@ enum pipe_transfer_usage { * Implementation capabilities/limits which are queried through * pipe_screen::get_param() and pipe_screen::get_paramf(). */ -#define PIPE_CAP_MAX_TEXTURE_IMAGE_UNITS 1 -#define PIPE_CAP_NPOT_TEXTURES 2 -#define PIPE_CAP_TWO_SIDED_STENCIL 3 -#define PIPE_CAP_GLSL 4 /* XXX need something better */ -#define PIPE_CAP_DUAL_SOURCE_BLEND 5 -#define PIPE_CAP_ANISOTROPIC_FILTER 6 -#define PIPE_CAP_POINT_SPRITE 7 -#define PIPE_CAP_MAX_RENDER_TARGETS 8 -#define PIPE_CAP_OCCLUSION_QUERY 9 -#define PIPE_CAP_TEXTURE_SHADOW_MAP 10 -#define PIPE_CAP_MAX_TEXTURE_2D_LEVELS 11 -#define PIPE_CAP_MAX_TEXTURE_3D_LEVELS 12 -#define PIPE_CAP_MAX_TEXTURE_CUBE_LEVELS 13 -#define PIPE_CAP_MAX_LINE_WIDTH 14 -#define PIPE_CAP_MAX_LINE_WIDTH_AA 15 -#define PIPE_CAP_MAX_POINT_WIDTH 16 -#define PIPE_CAP_MAX_POINT_WIDTH_AA 17 -#define PIPE_CAP_MAX_TEXTURE_ANISOTROPY 18 -#define PIPE_CAP_MAX_TEXTURE_LOD_BIAS 19 -#define PIPE_CAP_GUARD_BAND_LEFT 20 /*< float */ -#define PIPE_CAP_GUARD_BAND_TOP 21 /*< float */ -#define PIPE_CAP_GUARD_BAND_RIGHT 22 /*< float */ -#define PIPE_CAP_GUARD_BAND_BOTTOM 23 /*< float */ -#define PIPE_CAP_TEXTURE_MIRROR_CLAMP 24 -#define PIPE_CAP_TEXTURE_MIRROR_REPEAT 25 -#define PIPE_CAP_MAX_VERTEX_TEXTURE_UNITS 26 -#define PIPE_CAP_TGSI_CONT_SUPPORTED 27 -#define PIPE_CAP_BLEND_EQUATION_SEPARATE 28 -#define PIPE_CAP_SM3 29 /*< Shader Model 3 supported */ -#define PIPE_CAP_MAX_PREDICATE_REGISTERS 30 -#define PIPE_CAP_MAX_COMBINED_SAMPLERS 31 /*< Maximum texture image units accessible from vertex - and fragment shaders combined */ -#define PIPE_CAP_MAX_CONST_BUFFERS 32 -#define PIPE_CAP_MAX_CONST_BUFFER_SIZE 33 /*< In bytes */ -#define PIPE_CAP_INDEP_BLEND_ENABLE 34 /*< blend enables and write masks per rendertarget */ -#define PIPE_CAP_INDEP_BLEND_FUNC 35 /*< different blend funcs per rendertarget */ -#define PIPE_CAP_TGSI_FS_COORD_ORIGIN_UPPER_LEFT 36 -#define PIPE_CAP_TGSI_FS_COORD_ORIGIN_LOWER_LEFT 37 -#define PIPE_CAP_TGSI_FS_COORD_PIXEL_CENTER_HALF_INTEGER 38 -#define PIPE_CAP_TGSI_FS_COORD_PIXEL_CENTER_INTEGER 39 +enum pipe_cap { + PIPE_CAP_MAX_TEXTURE_IMAGE_UNITS, + PIPE_CAP_NPOT_TEXTURES, + PIPE_CAP_TWO_SIDED_STENCIL, + PIPE_CAP_GLSL, /* XXX need something better */ + PIPE_CAP_DUAL_SOURCE_BLEND, + PIPE_CAP_ANISOTROPIC_FILTER, + PIPE_CAP_POINT_SPRITE, + PIPE_CAP_MAX_RENDER_TARGETS, + PIPE_CAP_OCCLUSION_QUERY, + PIPE_CAP_TIMER_QUERY, + PIPE_CAP_TEXTURE_SHADOW_MAP, + PIPE_CAP_MAX_TEXTURE_2D_LEVELS, + PIPE_CAP_MAX_TEXTURE_3D_LEVELS, + PIPE_CAP_MAX_TEXTURE_CUBE_LEVELS, + PIPE_CAP_MAX_LINE_WIDTH, + PIPE_CAP_MAX_LINE_WIDTH_AA, + PIPE_CAP_MAX_POINT_WIDTH, + PIPE_CAP_MAX_POINT_WIDTH_AA, + PIPE_CAP_MAX_TEXTURE_ANISOTROPY, + PIPE_CAP_MAX_TEXTURE_LOD_BIAS, + PIPE_CAP_GUARD_BAND_LEFT, /*< float */ + PIPE_CAP_GUARD_BAND_TOP, /*< float */ + PIPE_CAP_GUARD_BAND_RIGHT, /*< float */ + PIPE_CAP_GUARD_BAND_BOTTOM, /*< float */ + PIPE_CAP_TEXTURE_MIRROR_CLAMP, + PIPE_CAP_TEXTURE_MIRROR_REPEAT, + PIPE_CAP_MAX_VERTEX_TEXTURE_UNITS, + PIPE_CAP_TGSI_CONT_SUPPORTED, + PIPE_CAP_BLEND_EQUATION_SEPARATE, + PIPE_CAP_SM3, /*< Shader Model, supported */ + PIPE_CAP_MAX_PREDICATE_REGISTERS, + /** Maximum texture image units accessible from vertex and fragment shaders + * combined */ + PIPE_CAP_MAX_COMBINED_SAMPLERS, + PIPE_CAP_MAX_CONST_BUFFERS, + PIPE_CAP_MAX_CONST_BUFFER_SIZE, /*< In bytes */ + /** blend enables and write masks per rendertarget */ + PIPE_CAP_INDEP_BLEND_ENABLE, + /** different blend funcs per rendertarget */ + PIPE_CAP_INDEP_BLEND_FUNC, + PIPE_CAP_TGSI_FS_COORD_ORIGIN_UPPER_LEFT, + PIPE_CAP_TGSI_FS_COORD_ORIGIN_LOWER_LEFT, + PIPE_CAP_TGSI_FS_COORD_PIXEL_CENTER_HALF_INTEGER, + PIPE_CAP_TGSI_FS_COORD_PIXEL_CENTER_INTEGER, + + /* + * Shader limits. + */ + PIPE_CAP_MAX_FS_INSTRUCTIONS, + PIPE_CAP_MAX_FS_ALU_INSTRUCTIONS, + PIPE_CAP_MAX_FS_TEX_INSTRUCTIONS, + PIPE_CAP_MAX_FS_TEX_INDIRECTIONS, + PIPE_CAP_MAX_FS_CONTROL_FLOW_DEPTH, + PIPE_CAP_MAX_FS_INPUTS, + PIPE_CAP_MAX_FS_CONSTS, + PIPE_CAP_MAX_FS_TEMPS, + PIPE_CAP_MAX_FS_ADDRS, + PIPE_CAP_MAX_FS_PREDS, + PIPE_CAP_MAX_VS_INSTRUCTIONS, + PIPE_CAP_MAX_VS_ALU_INSTRUCTIONS, + PIPE_CAP_MAX_VS_TEX_INSTRUCTIONS, + PIPE_CAP_MAX_VS_TEX_INDIRECTIONS, + PIPE_CAP_MAX_VS_CONTROL_FLOW_DEPTH, + PIPE_CAP_MAX_VS_INPUTS, + PIPE_CAP_MAX_VS_CONSTS, + PIPE_CAP_MAX_VS_TEMPS, + PIPE_CAP_MAX_VS_ADDRS, + PIPE_CAP_MAX_VS_PREDS +}; /** diff --git a/src/gallium/include/pipe/p_screen.h b/src/gallium/include/pipe/p_screen.h index 9cb949a446..21f428ed4a 100644 --- a/src/gallium/include/pipe/p_screen.h +++ b/src/gallium/include/pipe/p_screen.h @@ -54,7 +54,6 @@ struct winsys_handle; /** Opaque type */ struct pipe_fence_handle; struct pipe_winsys; -struct pipe_texture; struct pipe_resource; struct pipe_surface; struct pipe_transfer; @@ -79,13 +78,13 @@ struct pipe_screen { * Query an integer-valued capability/parameter/limit * \param param one of PIPE_CAP_x */ - int (*get_param)( struct pipe_screen *, int param ); + int (*get_param)( struct pipe_screen *, enum pipe_cap param ); /** * Query a float-valued capability/parameter/limit * \param param one of PIPE_CAP_x */ - float (*get_paramf)( struct pipe_screen *, int param ); + float (*get_paramf)( struct pipe_screen *, enum pipe_cap param ); struct pipe_context * (*context_create)( struct pipe_screen *, void *priv ); diff --git a/src/gallium/include/pipe/p_state.h b/src/gallium/include/pipe/p_state.h index f9ad07d8f8..5255b2003f 100644 --- a/src/gallium/include/pipe/p_state.h +++ b/src/gallium/include/pipe/p_state.h @@ -79,12 +79,13 @@ struct pipe_rasterizer_state { unsigned flatshade:1; unsigned light_twoside:1; - unsigned front_winding:2; /**< PIPE_WINDING_x */ - unsigned cull_mode:2; /**< PIPE_WINDING_x */ - unsigned fill_cw:2; /**< PIPE_POLYGON_MODE_x */ - unsigned fill_ccw:2; /**< PIPE_POLYGON_MODE_x */ - unsigned offset_cw:1; - unsigned offset_ccw:1; + unsigned front_ccw:1; + unsigned cull_face:2; /**< PIPE_FACE_x */ + unsigned fill_front:2; /**< PIPE_POLYGON_MODE_x */ + unsigned fill_back:2; /**< PIPE_POLYGON_MODE_x */ + unsigned offset_point:1; + unsigned offset_line:1; + unsigned offset_tri:1; unsigned scissor:1; unsigned poly_smooth:1; unsigned poly_stipple_enable:1; diff --git a/src/gallium/include/state_tracker/dri1_api.h b/src/gallium/include/state_tracker/dri1_api.h index a48c5de5a0..0d702d9092 100644 --- a/src/gallium/include/state_tracker/dri1_api.h +++ b/src/gallium/include/state_tracker/dri1_api.h @@ -9,7 +9,6 @@ struct pipe_screen; struct pipe_winsys; -struct pipe_buffer; struct pipe_context; struct pipe_resource; diff --git a/src/gallium/include/state_tracker/drm_api.h b/src/gallium/include/state_tracker/drm_api.h index 3d8fdd86fc..8fd0995444 100644 --- a/src/gallium/include/state_tracker/drm_api.h +++ b/src/gallium/include/state_tracker/drm_api.h @@ -6,7 +6,6 @@ struct pipe_screen; struct pipe_winsys; -struct pipe_buffer; struct pipe_context; struct pipe_resource; diff --git a/src/gallium/include/state_tracker/graw.h b/src/gallium/include/state_tracker/graw.h index a58e18e473..e5b298e03d 100644 --- a/src/gallium/include/state_tracker/graw.h +++ b/src/gallium/include/state_tracker/graw.h @@ -17,20 +17,27 @@ #include "pipe/p_format.h" struct pipe_screen; - -struct pipe_screen *graw_init( void ); +struct pipe_context; /* Returns a handle to be used with flush_frontbuffer()/present(). * * Query format support with screen::is_format_supported and usage * XXX. */ -void *graw_create_window( int x, - int y, - unsigned width, - unsigned height, - enum pipe_format format ); +PUBLIC struct pipe_screen *graw_create_window_and_screen( int x, + int y, + unsigned width, + unsigned height, + enum pipe_format format, + void **handle); + +PUBLIC void graw_set_display_func( void (*func)( void ) ); +PUBLIC void graw_main_loop( void ); + +PUBLIC void *graw_parse_vertex_shader( struct pipe_context *pipe, + const char *text ); -void graw_destroy_window( void *handle ); +PUBLIC void *graw_parse_fragment_shader( struct pipe_context *pipe, + const char *text ); #endif diff --git a/src/gallium/include/state_tracker/st_api.h b/src/gallium/include/state_tracker/st_api.h index 002d1c6b84..21f2d639b1 100644 --- a/src/gallium/include/state_tracker/st_api.h +++ b/src/gallium/include/state_tracker/st_api.h @@ -61,7 +61,7 @@ enum st_texture_type { ST_TEXTURE_1D, ST_TEXTURE_2D, ST_TEXTURE_3D, - ST_TEXTURE_RECT, + ST_TEXTURE_RECT }; /** @@ -102,7 +102,7 @@ enum st_context_resource_type { ST_CONTEXT_RESOURCE_OPENGL_TEXTURE_CUBE_MAP_POSITIVE_Z, ST_CONTEXT_RESOURCE_OPENGL_TEXTURE_CUBE_MAP_NEGATIVE_Z, ST_CONTEXT_RESOURCE_OPENGL_RENDERBUFFER, - ST_CONTEXT_RESOURCE_OPENVG_PARENT_IMAGE, + ST_CONTEXT_RESOURCE_OPENVG_PARENT_IMAGE }; /** |