mesa: add _mesa_program_state_value_size() helper
[mesa.git] / src / mesa / state_tracker / st_glsl_to_tgsi_private.h
index 19dde16ed9183b5ead197fad32e526425d004b5c..0b24e2ea7749e403a59082bccb54254461ec6b2f 100644 (file)
 #ifndef ST_GLSL_TO_TGSI_PRIVATE_H
 #define ST_GLSL_TO_TGSI_PRIVATE_H
 
-#include <mesa/main/mtypes.h>
-#include <compiler/glsl_types.h>
-#include <compiler/glsl/ir.h>
-#include <tgsi/tgsi_info.h>
+#include "mesa/main/mtypes.h"
+#include "program/prog_parameter.h"
+#include "compiler/glsl_types.h"
+#include "compiler/glsl/ir.h"
+#include "tgsi/tgsi_info.h"
 #include <ostream>
 
 int swizzle_for_size(int size);
@@ -50,6 +51,7 @@ public:
    st_src_reg();
    st_src_reg(const st_src_reg &reg);
    void operator=(const st_src_reg &reg);
+   void reset();
 
    explicit st_src_reg(st_dst_reg reg);
 
@@ -144,6 +146,8 @@ public:
    unsigned tex_offset_num_offset:3;
    unsigned dead_mask:4; /**< Used in dead code elimination */
    unsigned buffer_access:3; /**< bitmask of TGSI_MEMORY_x bits */
+   unsigned read_only:1;
+   unsigned gather_component:2; /* 0, 1, 2, 3 */
 
    const struct tgsi_opcode_info *info;
 
@@ -178,6 +182,10 @@ is_resource_instruction(unsigned opcode)
    case TGSI_OPCODE_ATOMUMAX:
    case TGSI_OPCODE_ATOMIMIN:
    case TGSI_OPCODE_ATOMIMAX:
+   case TGSI_OPCODE_ATOMFADD:
+   case TGSI_OPCODE_ATOMINC_WRAP:
+   case TGSI_OPCODE_ATOMDEC_WRAP:
+   case TGSI_OPCODE_IMG2HND:
       return true;
    default:
       return false;