diff options
author | Christian König <[email protected]> | 2011-02-24 22:02:42 +0100 |
---|---|---|
committer | Christian König <[email protected]> | 2011-02-24 22:02:42 +0100 |
commit | b922a0ce12916a91cfc3e56714913fcf63279ff2 (patch) | |
tree | e24fa039925220882d155ccb987f7914e83f4372 /src/gallium/include | |
parent | f013b4f8f1329982727691a55cc263e3011d02bf (diff) | |
parent | c0ad70ae31ee5501281b434d56e389fc92b13a3a (diff) |
Merge remote branch 'origin/master' into pipe-video
Conflicts:
configure.ac
src/gallium/auxiliary/Makefile
src/gallium/auxiliary/SConscript
src/gallium/drivers/r600/r600_asm.c
src/gallium/drivers/r600/r600_asm.h
src/gallium/drivers/r600/r600_shader.c
src/gallium/drivers/r600/r600_state_inlines.h
src/gallium/drivers/r600/r600_texture.c
Diffstat (limited to 'src/gallium/include')
-rw-r--r-- | src/gallium/include/pipe/p_context.h | 8 | ||||
-rw-r--r-- | src/gallium/include/pipe/p_defines.h | 30 | ||||
-rw-r--r-- | src/gallium/include/pipe/p_format.h | 10 | ||||
-rw-r--r-- | src/gallium/include/pipe/p_shader_tokens.h | 30 | ||||
-rw-r--r-- | src/gallium/include/pipe/p_state.h | 10 |
5 files changed, 74 insertions, 14 deletions
diff --git a/src/gallium/include/pipe/p_context.h b/src/gallium/include/pipe/p_context.h index 589cac2ddd3..24ee3fe1175 100644 --- a/src/gallium/include/pipe/p_context.h +++ b/src/gallium/include/pipe/p_context.h @@ -399,6 +399,14 @@ struct pipe_context { unsigned stride, unsigned layer_stride); + + /* Notify a driver that a content of a user buffer has been changed. + * The changed range is [offset, offset+size-1]. + * The new width0 of the buffer is offset+size. */ + void (*redefine_user_buffer)(struct pipe_context *, + struct pipe_resource *, + unsigned offset, + unsigned size); }; diff --git a/src/gallium/include/pipe/p_defines.h b/src/gallium/include/pipe/p_defines.h index a7f8503251b..8cf738fa2c0 100644 --- a/src/gallium/include/pipe/p_defines.h +++ b/src/gallium/include/pipe/p_defines.h @@ -225,13 +225,13 @@ enum pipe_transfer_usage { /** * Discards the memory within the mapped region. * - * It should not be used with PIPE_TRANSFER_CPU_READ. + * It should not be used with PIPE_TRANSFER_READ. * * See also: * - OpenGL's ARB_map_buffer_range extension, MAP_INVALIDATE_RANGE_BIT flag. - * - Direct3D's D3DLOCK_DISCARD flag. */ - PIPE_TRANSFER_DISCARD = (1 << 8), + PIPE_TRANSFER_DISCARD = (1 << 8), /* DEPRECATED */ + PIPE_TRANSFER_DISCARD_RANGE = (1 << 8), /** * Fail if the resource cannot be mapped immediately. @@ -246,7 +246,7 @@ enum pipe_transfer_usage { /** * Do not attempt to synchronize pending operations on the resource when mapping. * - * It should not be used with PIPE_TRANSFER_CPU_READ. + * It should not be used with PIPE_TRANSFER_READ. * * See also: * - OpenGL's ARB_map_buffer_range extension, MAP_UNSYNCHRONIZED_BIT flag. @@ -260,13 +260,28 @@ enum pipe_transfer_usage { * Written ranges will be notified later with * pipe_context::transfer_flush_region. * - * It should not be used with PIPE_TRANSFER_CPU_READ. + * It should not be used with PIPE_TRANSFER_READ. * * See also: * - pipe_context::transfer_flush_region * - OpenGL's ARB_map_buffer_range extension, MAP_FLUSH_EXPLICIT_BIT flag. */ - PIPE_TRANSFER_FLUSH_EXPLICIT = (1 << 11) + PIPE_TRANSFER_FLUSH_EXPLICIT = (1 << 11), + + /** + * Discards all memory backing the resource. + * + * It should not be used with PIPE_TRANSFER_READ. + * + * This is equivalent to: + * - OpenGL's ARB_map_buffer_range extension, MAP_INVALIDATE_BUFFER_BIT + * - BufferData(NULL) on a GL buffer + * - Direct3D's D3DLOCK_DISCARD flag. + * - WDDM's D3DDDICB_LOCKFLAGS.Discard flag. + * - D3D10 DDI's D3D10_DDI_MAP_WRITE_DISCARD flag + * - D3D10's D3D10_MAP_WRITE_DISCARD flag. + */ + PIPE_TRANSFER_DISCARD_WHOLE_RESOURCE = (1 << 12) }; @@ -380,7 +395,8 @@ enum pipe_transfer_usage { #define PIPE_QUERY_SO_STATISTICS 5 #define PIPE_QUERY_GPU_FINISHED 6 #define PIPE_QUERY_TIMESTAMP_DISJOINT 7 -#define PIPE_QUERY_TYPES 8 +#define PIPE_QUERY_OCCLUSION_PREDICATE 8 +#define PIPE_QUERY_TYPES 9 /** diff --git a/src/gallium/include/pipe/p_format.h b/src/gallium/include/pipe/p_format.h index 3aa11be4b5b..e2cc32222de 100644 --- a/src/gallium/include/pipe/p_format.h +++ b/src/gallium/include/pipe/p_format.h @@ -33,6 +33,16 @@ extern "C" { #endif + +enum pipe_type { + PIPE_TYPE_UNORM = 0, + PIPE_TYPE_SNORM, + PIPE_TYPE_SINT, + PIPE_TYPE_UINT, + PIPE_TYPE_FLOAT, + PIPE_TYPE_COUNT +}; + /** * Texture/surface image formats (preliminary) */ diff --git a/src/gallium/include/pipe/p_shader_tokens.h b/src/gallium/include/pipe/p_shader_tokens.h index 0a9e14154d7..d3a3632654c 100644 --- a/src/gallium/include/pipe/p_shader_tokens.h +++ b/src/gallium/include/pipe/p_shader_tokens.h @@ -75,6 +75,7 @@ enum tgsi_file_type { TGSI_FILE_SYSTEM_VALUE =9, TGSI_FILE_IMMEDIATE_ARRAY =10, TGSI_FILE_TEMPORARY_ARRAY =11, + TGSI_FILE_RESOURCE =12, TGSI_FILE_COUNT /**< how many TGSI_FILE_ types */ }; @@ -153,6 +154,14 @@ struct tgsi_declaration_semantic unsigned Padding : 8; }; +struct tgsi_declaration_resource { + unsigned Resource : 8; /**< one of TGSI_TEXTURE_ */ + unsigned ReturnTypeX : 6; /**< one of enum pipe_type */ + unsigned ReturnTypeY : 6; /**< one of enum pipe_type */ + unsigned ReturnTypeZ : 6; /**< one of enum pipe_type */ + unsigned ReturnTypeW : 6; /**< one of enum pipe_type */ +}; + #define TGSI_IMM_FLOAT32 0 #define TGSI_IMM_UINT32 1 #define TGSI_IMM_INT32 2 @@ -339,7 +348,22 @@ struct tgsi_property_data { #define TGSI_OPCODE_CASE 142 #define TGSI_OPCODE_DEFAULT 143 #define TGSI_OPCODE_ENDSWITCH 144 -#define TGSI_OPCODE_LAST 145 + +/* resource related opcodes */ +#define TGSI_OPCODE_LOAD 145 +#define TGSI_OPCODE_LOAD_MS 146 +#define TGSI_OPCODE_SAMPLE 147 +#define TGSI_OPCODE_SAMPLE_B 148 +#define TGSI_OPCODE_SAMPLE_C 149 +#define TGSI_OPCODE_SAMPLE_C_LZ 150 +#define TGSI_OPCODE_SAMPLE_D 151 +#define TGSI_OPCODE_SAMPLE_L 152 +#define TGSI_OPCODE_GATHER4 153 +#define TGSI_OPCODE_RESINFO 154 +#define TGSI_OPCODE_SAMPLE_POS 155 +#define TGSI_OPCODE_SAMPLE_INFO 156 + +#define TGSI_OPCODE_LAST 157 #define TGSI_SAT_NONE 0 /* do not saturate */ #define TGSI_SAT_ZERO_ONE 1 /* clamp to [0,1] */ @@ -406,7 +430,9 @@ struct tgsi_instruction_label #define TGSI_TEXTURE_SHADOW1D 6 #define TGSI_TEXTURE_SHADOW2D 7 #define TGSI_TEXTURE_SHADOWRECT 8 -#define TGSI_TEXTURE_COUNT 9 +#define TGSI_TEXTURE_1D_ARRAY 9 +#define TGSI_TEXTURE_2D_ARRAY 10 +#define TGSI_TEXTURE_COUNT 11 struct tgsi_instruction_texture { diff --git a/src/gallium/include/pipe/p_state.h b/src/gallium/include/pipe/p_state.h index 226ae8667b7..cf6c5b50268 100644 --- a/src/gallium/include/pipe/p_state.h +++ b/src/gallium/include/pipe/p_state.h @@ -62,6 +62,7 @@ extern "C" { #define PIPE_MAX_GEOMETRY_SAMPLERS 16 #define PIPE_MAX_SHADER_INPUTS 32 #define PIPE_MAX_SHADER_OUTPUTS 32 +#define PIPE_MAX_SHADER_RESOURCES 32 #define PIPE_MAX_TEXTURE_LEVELS 16 #define PIPE_MAX_SO_BUFFERS 4 @@ -389,11 +390,11 @@ struct pipe_stream_output_state struct pipe_transfer { struct pipe_resource *resource; /**< resource to transfer to/from */ - unsigned level; + unsigned level; /**< texture mipmap level */ enum pipe_transfer_usage usage; - struct pipe_box box; - unsigned stride; - unsigned layer_stride; + struct pipe_box box; /**< region of the resource to access */ + unsigned stride; /**< row stride in bytes */ + unsigned layer_stride; /**< image/layer stride in bytes */ void *data; }; @@ -407,7 +408,6 @@ struct pipe_transfer struct pipe_vertex_buffer { unsigned stride; /**< stride to same attrib in next vertex, in bytes */ - unsigned max_index; /**< number of vertices in this buffer */ unsigned buffer_offset; /**< offset to start of data in buffer, in bytes */ struct pipe_resource *buffer; /**< the actual buffer */ }; |