diff options
author | Francisco Jerez <[email protected]> | 2012-04-30 20:20:29 +0200 |
---|---|---|
committer | Francisco Jerez <[email protected]> | 2012-05-11 12:39:41 +0200 |
commit | b8e808f1ef9462af8545999df514fddbbff34345 (patch) | |
tree | 6431be43337a12c166fae50e87e6f8b7e14c9d6c /src/gallium/include/pipe | |
parent | 82c90b2da8e236bc134cb2bd0ec4e09551b12164 (diff) |
gallium/tgsi: Add resource write-back support.
Define a new STORE opcode with a role dual to the LOAD opcode, and add
flags to specify that a shader resource is intended for writing.
Diffstat (limited to 'src/gallium/include/pipe')
-rw-r--r-- | src/gallium/include/pipe/p_shader_tokens.h | 6 | ||||
-rw-r--r-- | src/gallium/include/pipe/p_state.h | 1 |
2 files changed, 5 insertions, 2 deletions
diff --git a/src/gallium/include/pipe/p_shader_tokens.h b/src/gallium/include/pipe/p_shader_tokens.h index 3fc7a4715e3..d45a914924e 100644 --- a/src/gallium/include/pipe/p_shader_tokens.h +++ b/src/gallium/include/pipe/p_shader_tokens.h @@ -170,7 +170,8 @@ struct tgsi_declaration_semantic struct tgsi_declaration_resource { unsigned Resource : 8; /**< one of TGSI_TEXTURE_ */ unsigned Raw : 1; - unsigned Padding : 23; + unsigned Writable : 1; + unsigned Padding : 22; }; struct tgsi_declaration_sampler_view { @@ -406,8 +407,9 @@ struct tgsi_property_data { #define TGSI_OPCODE_ISSG 160 #define TGSI_OPCODE_LOAD 161 +#define TGSI_OPCODE_STORE 162 -#define TGSI_OPCODE_LAST 162 +#define TGSI_OPCODE_LAST 163 #define TGSI_SAT_NONE 0 /* do not saturate */ #define TGSI_SAT_ZERO_ONE 1 /* clamp to [0,1] */ diff --git a/src/gallium/include/pipe/p_state.h b/src/gallium/include/pipe/p_state.h index 788ded58dcd..7e741cfd988 100644 --- a/src/gallium/include/pipe/p_state.h +++ b/src/gallium/include/pipe/p_state.h @@ -338,6 +338,7 @@ struct pipe_surface unsigned height; /**< logical height in pixels */ unsigned usage; /**< bitmask of PIPE_BIND_x */ + unsigned writable:1; /**< writable shader resource */ union { struct { |