diff options
author | Christian König <[email protected]> | 2010-10-12 23:05:25 +0200 |
---|---|---|
committer | Christian König <[email protected]> | 2010-10-12 23:07:29 +0200 |
commit | 695cc370a280a637f411f5ff3877b3fd1c05e424 (patch) | |
tree | 69ae2a8fbecfa553faba59274688ffe11ee1a612 /src/gallium/include/pipe/p_defines.h | |
parent | f3e34ba6fba76870b1c91a27adb706d1b87aeec8 (diff) | |
parent | 48156b87bc9d3e09ec34372d69504a787332ea0b (diff) |
Merge branch 'master' of ssh://git.freedesktop.org/git/mesa/mesa into pipe-video
Conflicts:
configure.ac
src/gallium/drivers/nvfx/Makefile
src/gallium/include/pipe/p_defines.h
src/gallium/include/pipe/p_screen.h
src/gallium/include/state_tracker/dri1_api.h
src/gallium/include/state_tracker/drm_api.h
src/gallium/winsys/nouveau/drm/nouveau_drm_api.c
Diffstat (limited to 'src/gallium/include/pipe/p_defines.h')
-rw-r--r-- | src/gallium/include/pipe/p_defines.h | 146 |
1 files changed, 94 insertions, 52 deletions
diff --git a/src/gallium/include/pipe/p_defines.h b/src/gallium/include/pipe/p_defines.h index 28318183183..9d5700ef439 100644 --- a/src/gallium/include/pipe/p_defines.h +++ b/src/gallium/include/pipe/p_defines.h @@ -28,7 +28,7 @@ #ifndef PIPE_DEFINES_H #define PIPE_DEFINES_H -#include "p_format.h" +#include "p_compiler.h" #ifdef __cplusplus extern "C" { @@ -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 @@ -135,13 +135,15 @@ enum pipe_error { #define PIPE_STENCIL_OP_DECR_WRAP 6 #define PIPE_STENCIL_OP_INVERT 7 -/** Texture types */ +/** Texture types. + * See the documentation for info on PIPE_TEXTURE_RECT vs PIPE_TEXTURE_2D */ enum pipe_texture_target { PIPE_BUFFER = 0, PIPE_TEXTURE_1D = 1, PIPE_TEXTURE_2D = 2, PIPE_TEXTURE_3D = 3, PIPE_TEXTURE_CUBE = 4, + PIPE_TEXTURE_RECT = 5, PIPE_MAX_TEXTURE_TYPES }; @@ -189,9 +191,10 @@ enum pipe_texture_target { */ /** All color buffers currently bound */ #define PIPE_CLEAR_COLOR (1 << 0) +#define PIPE_CLEAR_DEPTH (1 << 1) +#define PIPE_CLEAR_STENCIL (1 << 2) /** Depth/stencil combined */ -#define PIPE_CLEAR_DEPTHSTENCIL (1 << 1) - +#define PIPE_CLEAR_DEPTHSTENCIL (PIPE_CLEAR_DEPTH | PIPE_CLEAR_STENCIL) /** * Transfer object usage flags @@ -284,11 +287,10 @@ enum pipe_transfer_usage { #define PIPE_BIND_VERTEX_BUFFER (1 << 3) /* set_vertex_buffers */ #define PIPE_BIND_INDEX_BUFFER (1 << 4) /* draw_elements */ #define PIPE_BIND_CONSTANT_BUFFER (1 << 5) /* set_constant_buffer */ -#define PIPE_BIND_BLIT_SOURCE (1 << 6) /* surface_copy */ -#define PIPE_BIND_BLIT_DESTINATION (1 << 7) /* surface_copy, fill */ #define PIPE_BIND_DISPLAY_TARGET (1 << 8) /* flush_front_buffer */ #define PIPE_BIND_TRANSFER_WRITE (1 << 9) /* get_transfer */ #define PIPE_BIND_TRANSFER_READ (1 << 10) /* get_transfer */ +#define PIPE_BIND_STREAM_OUTPUT (1 << 11) /* set_stream_output_buffers */ #define PIPE_BIND_CUSTOM (1 << 16) /* state-tracker/winsys usages */ /* The first two flags above were previously part of the amorphous @@ -323,6 +325,7 @@ enum pipe_transfer_usage { #define PIPE_USAGE_STATIC 2 /* same as immutable?? */ #define PIPE_USAGE_IMMUTABLE 3 /* no change after first upload */ #define PIPE_USAGE_STREAM 4 /* upload, draw, upload, draw */ +#define PIPE_USAGE_STAGING 5 /* supports data transfers from the GPU to the CPU */ /* These are intended to be used in calls to is_format_supported, but @@ -379,7 +382,11 @@ 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_SO_STATISTICS 5 +#define PIPE_QUERY_GPU_FINISHED 6 +#define PIPE_QUERY_TIMESTAMP_DISJOINT 7 +#define PIPE_QUERY_TYPES 8 /** @@ -413,47 +420,69 @@ 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_TEXTURE_SWIZZLE, + 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_BLEND_EQUATION_SEPARATE, + PIPE_CAP_SM3, /*< Shader Model, supported */ + PIPE_CAP_STREAM_OUTPUT, + /** Maximum texture image units accessible from vertex and fragment shaders + * combined */ + PIPE_CAP_MAX_COMBINED_SAMPLERS, + /** blend enables and write masks per rendertarget */ + PIPE_CAP_INDEP_BLEND_ENABLE, + /** different blend funcs per rendertarget */ + PIPE_CAP_INDEP_BLEND_FUNC, + PIPE_CAP_DEPTHSTENCIL_CLEAR_SEPARATE, + 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, + PIPE_CAP_DEPTH_CLAMP +}; +/* Shader caps not specific to any single stage */ +enum pipe_shader_cap +{ + PIPE_SHADER_CAP_MAX_INSTRUCTIONS, /* if 0, it means the stage is unsupported */ + PIPE_SHADER_CAP_MAX_ALU_INSTRUCTIONS, + PIPE_SHADER_CAP_MAX_TEX_INSTRUCTIONS, + PIPE_SHADER_CAP_MAX_TEX_INDIRECTIONS, + PIPE_SHADER_CAP_MAX_CONTROL_FLOW_DEPTH, + PIPE_SHADER_CAP_MAX_INPUTS, + PIPE_SHADER_CAP_MAX_CONSTS, + PIPE_SHADER_CAP_MAX_CONST_BUFFERS, + PIPE_SHADER_CAP_MAX_TEMPS, + PIPE_SHADER_CAP_MAX_ADDRS, + PIPE_SHADER_CAP_MAX_PREDS, + PIPE_SHADER_CAP_TGSI_CONT_SUPPORTED, +}; /** * Referenced query flags. @@ -487,6 +516,19 @@ enum pipe_video_profile PIPE_VIDEO_PROFILE_MPEG4_AVC_HIGH }; +/** + * Composite query types + */ +struct pipe_query_data_so_statistics +{ + uint64_t num_primitives_written; + uint64_t primitives_storage_needed; +}; +struct pipe_query_data_timestamp_disjoint +{ + uint64_t frequency; + boolean disjoint; +}; #ifdef __cplusplus } |