summaryrefslogtreecommitdiffstats
path: root/src/gallium/include
diff options
context:
space:
mode:
authorChristian König <[email protected]>2011-04-23 14:27:40 +0200
committerChristian König <[email protected]>2011-04-23 14:27:40 +0200
commitfa31b1095eeea97695125ad5770239805bed37da (patch)
tree6c421666719a9a1afc419de33d06f4e66584a8a1 /src/gallium/include
parent24d76d2966a5c666c9627034e6751621b17024c8 (diff)
parent15eaf8297ecb39337109b95480e61f37a6b20f0a (diff)
Merge remote branch 'origin/master' into pipe-video
Conflicts: configs/linux-dri src/gallium/drivers/r600/r600_pipe.c src/gallium/drivers/r600/r600_state.c src/gallium/include/pipe/p_format.h src/gallium/tests/graw/fragment-shader/frag-abs.sh src/gallium/tests/graw/fragment-shader/frag-add.sh src/gallium/tests/graw/fragment-shader/frag-cb-1d.sh src/gallium/tests/graw/fragment-shader/frag-cb-2d.sh src/gallium/tests/graw/fragment-shader/frag-dp3.sh src/gallium/tests/graw/fragment-shader/frag-dp4.sh src/gallium/tests/graw/fragment-shader/frag-dst.sh src/gallium/tests/graw/fragment-shader/frag-ex2.sh src/gallium/tests/graw/fragment-shader/frag-face.sh src/gallium/tests/graw/fragment-shader/frag-flr.sh src/gallium/tests/graw/fragment-shader/frag-frc.sh src/gallium/tests/graw/fragment-shader/frag-kil.sh src/gallium/tests/graw/fragment-shader/frag-lg2.sh src/gallium/tests/graw/fragment-shader/frag-lit.sh src/gallium/tests/graw/fragment-shader/frag-lrp.sh src/gallium/tests/graw/fragment-shader/frag-mad-immx.sh src/gallium/tests/graw/fragment-shader/frag-mad.sh src/gallium/tests/graw/fragment-shader/frag-max.sh src/gallium/tests/graw/fragment-shader/frag-min.sh src/gallium/tests/graw/fragment-shader/frag-mov.sh src/gallium/tests/graw/fragment-shader/frag-mul.sh src/gallium/tests/graw/fragment-shader/frag-rcp.sh src/gallium/tests/graw/fragment-shader/frag-rsq.sh src/gallium/tests/graw/fragment-shader/frag-sge.sh src/gallium/tests/graw/fragment-shader/frag-slt.sh src/gallium/tests/graw/fragment-shader/frag-srcmod-abs.sh src/gallium/tests/graw/fragment-shader/frag-srcmod-absneg.sh src/gallium/tests/graw/fragment-shader/frag-srcmod-neg.sh src/gallium/tests/graw/fragment-shader/frag-srcmod-swz.sh src/gallium/tests/graw/fragment-shader/frag-sub.sh src/gallium/tests/graw/fragment-shader/frag-tempx.sh src/gallium/tests/graw/fragment-shader/frag-xpd.sh src/gallium/tests/graw/vertex-shader/vert-abs.sh src/gallium/tests/graw/vertex-shader/vert-add.sh src/gallium/tests/graw/vertex-shader/vert-arl.sh src/gallium/tests/graw/vertex-shader/vert-arr.sh src/gallium/tests/graw/vertex-shader/vert-cb-1d.sh src/gallium/tests/graw/vertex-shader/vert-cb-2d.sh src/gallium/tests/graw/vertex-shader/vert-dp3.sh src/gallium/tests/graw/vertex-shader/vert-dp4.sh src/gallium/tests/graw/vertex-shader/vert-dst.sh src/gallium/tests/graw/vertex-shader/vert-ex2.sh src/gallium/tests/graw/vertex-shader/vert-flr.sh src/gallium/tests/graw/vertex-shader/vert-frc.sh src/gallium/tests/graw/vertex-shader/vert-lg2.sh src/gallium/tests/graw/vertex-shader/vert-lit.sh src/gallium/tests/graw/vertex-shader/vert-lrp.sh src/gallium/tests/graw/vertex-shader/vert-mad.sh src/gallium/tests/graw/vertex-shader/vert-max.sh src/gallium/tests/graw/vertex-shader/vert-min.sh src/gallium/tests/graw/vertex-shader/vert-mov.sh src/gallium/tests/graw/vertex-shader/vert-mul.sh src/gallium/tests/graw/vertex-shader/vert-rcp.sh src/gallium/tests/graw/vertex-shader/vert-rsq.sh src/gallium/tests/graw/vertex-shader/vert-sge.sh src/gallium/tests/graw/vertex-shader/vert-slt.sh src/gallium/tests/graw/vertex-shader/vert-srcmod-abs.sh src/gallium/tests/graw/vertex-shader/vert-srcmod-absneg.sh src/gallium/tests/graw/vertex-shader/vert-srcmod-neg.sh src/gallium/tests/graw/vertex-shader/vert-srcmod-swz.sh src/gallium/tests/graw/vertex-shader/vert-sub.sh src/gallium/tests/graw/vertex-shader/vert-xpd.sh src/gallium/tools/trace/dump.py src/gallium/tools/trace/format.py src/gallium/tools/trace/model.py src/gallium/tools/trace/parse.py
Diffstat (limited to 'src/gallium/include')
-rw-r--r--src/gallium/include/pipe/p_compiler.h14
-rw-r--r--src/gallium/include/pipe/p_defines.h126
-rw-r--r--src/gallium/include/pipe/p_format.h32
-rw-r--r--src/gallium/include/pipe/p_state.h2
4 files changed, 99 insertions, 75 deletions
diff --git a/src/gallium/include/pipe/p_compiler.h b/src/gallium/include/pipe/p_compiler.h
index 3441db685ce..8c788f4bb0e 100644
--- a/src/gallium/include/pipe/p_compiler.h
+++ b/src/gallium/include/pipe/p_compiler.h
@@ -292,12 +292,14 @@ void _ReadWriteBarrier(void);
* Note that profile guided optimization can offer better results, but
* needs an appropriate coverage suite and does not inform human readers.
*/
-#ifdef __GNUC__
-#define likely(x) __builtin_expect(!!(x), 1)
-#define unlikely(x) __builtin_expect(!!(x), 0)
-#else
-#define likely(x) !!(x)
-#define unlikely(x) !!(x)
+#ifndef likely
+# if defined(__GNUC__)
+# define likely(x) __builtin_expect(!!(x), 1)
+# define unlikely(x) __builtin_expect(!!(x), 0)
+# else
+# define likely(x) (x)
+# define unlikely(x) (x)
+# endif
#endif
diff --git a/src/gallium/include/pipe/p_defines.h b/src/gallium/include/pipe/p_defines.h
index e3cc28ba476..75df89f2acb 100644
--- a/src/gallium/include/pipe/p_defines.h
+++ b/src/gallium/include/pipe/p_defines.h
@@ -414,78 +414,80 @@ enum pipe_transfer_usage {
* pipe_screen::get_param() and pipe_screen::get_paramf().
*/
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,
- PIPE_CAP_PRIMITIVE_RESTART,
+ PIPE_CAP_MAX_TEXTURE_IMAGE_UNITS = 0,
+ PIPE_CAP_NPOT_TEXTURES = 1,
+ PIPE_CAP_TWO_SIDED_STENCIL = 2,
+ PIPE_CAP_GLSL = 3, /* XXX need something better */
+ PIPE_CAP_DUAL_SOURCE_BLEND = 4,
+ PIPE_CAP_ANISOTROPIC_FILTER = 5,
+ PIPE_CAP_POINT_SPRITE = 6,
+ PIPE_CAP_MAX_RENDER_TARGETS = 7,
+ PIPE_CAP_OCCLUSION_QUERY = 8,
+ PIPE_CAP_TIMER_QUERY = 9,
+ PIPE_CAP_TEXTURE_SHADOW_MAP = 10,
+ PIPE_CAP_TEXTURE_SWIZZLE = 11,
+ PIPE_CAP_MAX_TEXTURE_2D_LEVELS = 12,
+ PIPE_CAP_MAX_TEXTURE_3D_LEVELS = 13,
+ PIPE_CAP_MAX_TEXTURE_CUBE_LEVELS = 14,
+ PIPE_CAP_MAX_LINE_WIDTH = 15,
+ PIPE_CAP_MAX_LINE_WIDTH_AA = 16,
+ PIPE_CAP_MAX_POINT_WIDTH = 17,
+ PIPE_CAP_MAX_POINT_WIDTH_AA = 18,
+ PIPE_CAP_MAX_TEXTURE_ANISOTROPY = 19,
+ PIPE_CAP_MAX_TEXTURE_LOD_BIAS = 20,
+ PIPE_CAP_GUARD_BAND_LEFT = 21, /*< float */
+ PIPE_CAP_GUARD_BAND_TOP = 22, /*< float */
+ PIPE_CAP_GUARD_BAND_RIGHT = 23, /*< float */
+ PIPE_CAP_GUARD_BAND_BOTTOM = 24, /*< float */
+ PIPE_CAP_TEXTURE_MIRROR_CLAMP = 25,
+ PIPE_CAP_TEXTURE_MIRROR_REPEAT = 26,
+ PIPE_CAP_MAX_VERTEX_TEXTURE_UNITS = 27,
+ PIPE_CAP_BLEND_EQUATION_SEPARATE = 28,
+ PIPE_CAP_SM3 = 29, /*< Shader Model, supported */
+ PIPE_CAP_STREAM_OUTPUT = 30,
+ PIPE_CAP_PRIMITIVE_RESTART = 31,
/** Maximum texture image units accessible from vertex and fragment shaders
* combined */
- PIPE_CAP_MAX_COMBINED_SAMPLERS,
+ PIPE_CAP_MAX_COMBINED_SAMPLERS = 32,
/** blend enables and write masks per rendertarget */
- PIPE_CAP_INDEP_BLEND_ENABLE,
+ PIPE_CAP_INDEP_BLEND_ENABLE = 33,
/** different blend funcs per rendertarget */
- PIPE_CAP_INDEP_BLEND_FUNC,
- PIPE_CAP_DEPTHSTENCIL_CLEAR_SEPARATE,
- PIPE_CAP_ARRAY_TEXTURES,
- 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,
- PIPE_CAP_SHADER_STENCIL_EXPORT,
- PIPE_CAP_TGSI_INSTANCEID,
- PIPE_CAP_VERTEX_ELEMENT_INSTANCE_DIVISOR,
+ PIPE_CAP_INDEP_BLEND_FUNC = 34,
+ PIPE_CAP_DEPTHSTENCIL_CLEAR_SEPARATE = 35,
+ PIPE_CAP_ARRAY_TEXTURES = 36,
+ PIPE_CAP_TGSI_FS_COORD_ORIGIN_UPPER_LEFT = 37,
+ PIPE_CAP_TGSI_FS_COORD_ORIGIN_LOWER_LEFT = 38,
+ PIPE_CAP_TGSI_FS_COORD_PIXEL_CENTER_HALF_INTEGER = 39,
+ PIPE_CAP_TGSI_FS_COORD_PIXEL_CENTER_INTEGER = 40,
+ PIPE_CAP_DEPTH_CLAMP = 41,
+ PIPE_CAP_SHADER_STENCIL_EXPORT = 42,
+ PIPE_CAP_TGSI_INSTANCEID = 43,
+ PIPE_CAP_VERTEX_ELEMENT_INSTANCE_DIVISOR = 44,
+ PIPE_CAP_FRAGMENT_COLOR_CLAMP_CONTROL = 45,
+ PIPE_CAP_MIXED_COLORBUFFER_FORMATS = 46,
};
/* 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_MAX_INSTRUCTIONS = 0, /* if 0, it means the stage is unsupported */
+ PIPE_SHADER_CAP_MAX_ALU_INSTRUCTIONS = 1,
+ PIPE_SHADER_CAP_MAX_TEX_INSTRUCTIONS = 2,
+ PIPE_SHADER_CAP_MAX_TEX_INDIRECTIONS = 3,
+ PIPE_SHADER_CAP_MAX_CONTROL_FLOW_DEPTH = 4,
+ PIPE_SHADER_CAP_MAX_INPUTS = 5,
+ PIPE_SHADER_CAP_MAX_CONSTS = 6,
+ PIPE_SHADER_CAP_MAX_CONST_BUFFERS = 7,
+ PIPE_SHADER_CAP_MAX_TEMPS = 8,
+ PIPE_SHADER_CAP_MAX_ADDRS = 9,
+ PIPE_SHADER_CAP_MAX_PREDS = 10,
/* boolean caps */
- PIPE_SHADER_CAP_TGSI_CONT_SUPPORTED,
- PIPE_SHADER_CAP_INDIRECT_INPUT_ADDR,
- PIPE_SHADER_CAP_INDIRECT_OUTPUT_ADDR,
- PIPE_SHADER_CAP_INDIRECT_TEMP_ADDR,
- PIPE_SHADER_CAP_INDIRECT_CONST_ADDR,
- PIPE_SHADER_CAP_SUBROUTINES, /* BGNSUB, ENDSUB, CAL, RET */
+ PIPE_SHADER_CAP_TGSI_CONT_SUPPORTED = 11,
+ PIPE_SHADER_CAP_INDIRECT_INPUT_ADDR = 12,
+ PIPE_SHADER_CAP_INDIRECT_OUTPUT_ADDR = 13,
+ PIPE_SHADER_CAP_INDIRECT_TEMP_ADDR = 14,
+ PIPE_SHADER_CAP_INDIRECT_CONST_ADDR = 15,
+ PIPE_SHADER_CAP_SUBROUTINES = 16, /* BGNSUB, ENDSUB, CAL, RET */
};
diff --git a/src/gallium/include/pipe/p_format.h b/src/gallium/include/pipe/p_format.h
index 542931ec1d8..c9f75c019ef 100644
--- a/src/gallium/include/pipe/p_format.h
+++ b/src/gallium/include/pipe/p_format.h
@@ -211,17 +211,35 @@ enum pipe_format {
PIPE_FORMAT_LATC2_UNORM = 145,
PIPE_FORMAT_LATC2_SNORM = 146,
- PIPE_FORMAT_YV12 = 147,
- PIPE_FORMAT_YV16 = 148,
- PIPE_FORMAT_IYUV = 149, /**< aka I420 */
- PIPE_FORMAT_NV12 = 150,
- PIPE_FORMAT_NV21 = 151,
+ PIPE_FORMAT_A8_SNORM = 147,
+ PIPE_FORMAT_L8_SNORM = 148,
+ PIPE_FORMAT_L8A8_SNORM = 149,
+ PIPE_FORMAT_I8_SNORM = 150,
+ PIPE_FORMAT_A16_SNORM = 151,
+ PIPE_FORMAT_L16_SNORM = 152,
+ PIPE_FORMAT_L16A16_SNORM = 153,
+ PIPE_FORMAT_I16_SNORM = 154,
+
+ PIPE_FORMAT_A16_FLOAT = 155,
+ PIPE_FORMAT_L16_FLOAT = 156,
+ PIPE_FORMAT_L16A16_FLOAT = 157,
+ PIPE_FORMAT_I16_FLOAT = 158,
+ PIPE_FORMAT_A32_FLOAT = 159,
+ PIPE_FORMAT_L32_FLOAT = 160,
+ PIPE_FORMAT_L32A32_FLOAT = 161,
+ PIPE_FORMAT_I32_FLOAT = 162,
+
+ PIPE_FORMAT_YV12 = 163,
+ PIPE_FORMAT_YV16 = 164,
+ PIPE_FORMAT_IYUV = 165, /**< aka I420 */
+ PIPE_FORMAT_NV12 = 166,
+ PIPE_FORMAT_NV21 = 167,
PIPE_FORMAT_AYUV = PIPE_FORMAT_A8R8G8B8_UNORM,
PIPE_FORMAT_VUYA = PIPE_FORMAT_B8G8R8A8_UNORM,
PIPE_FORMAT_XYUV = PIPE_FORMAT_X8R8G8B8_UNORM,
PIPE_FORMAT_VUYX = PIPE_FORMAT_B8G8R8X8_UNORM,
- PIPE_FORMAT_IA44 = 152,
- PIPE_FORMAT_AI44 = 153,
+ PIPE_FORMAT_IA44 = 168,
+ PIPE_FORMAT_AI44 = 169,
PIPE_FORMAT_COUNT
};
diff --git a/src/gallium/include/pipe/p_state.h b/src/gallium/include/pipe/p_state.h
index cf6c5b50268..f6ad4560f16 100644
--- a/src/gallium/include/pipe/p_state.h
+++ b/src/gallium/include/pipe/p_state.h
@@ -81,6 +81,8 @@ struct pipe_rasterizer_state
{
unsigned flatshade:1;
unsigned light_twoside:1;
+ unsigned clamp_vertex_color:1;
+ unsigned clamp_fragment_color:1;
unsigned front_ccw:1;
unsigned cull_face:2; /**< PIPE_FACE_x */
unsigned fill_front:2; /**< PIPE_POLYGON_MODE_x */