gallium: add PIPE_SHADER_CAP_GLSL_16BIT_TEMPS for LowerPrecisionTemporaries
[mesa.git] / src / gallium / drivers / svga / svga_tgsi_emit.h
index 83f0c8bd4d001bf4e88f6e2b37a4e9394899ce66..357d772e7a6c7a4402229ecbb0e169bfc803617b 100644 (file)
@@ -136,6 +136,9 @@ struct svga_shader_emitter
    int current_arl;
 
    unsigned pstipple_sampler_unit;
+
+   int num_samplers;
+   uint8_t sampler_target[PIPE_MAX_SAMPLERS];
 };
 
 
@@ -154,6 +157,9 @@ boolean
 svga_shader_emit_instructions(struct svga_shader_emitter *emit,
                               const struct tgsi_token *tokens);
 
+boolean
+svga_shader_emit_samplers_decl(struct svga_shader_emitter *emit);
+
 boolean
 svga_translate_decl_sm30(struct svga_shader_emitter *emit,
                          const struct tgsi_full_declaration *decl);
@@ -183,7 +189,7 @@ emit_instruction(struct svga_shader_emitter *emit,
 
 /** Generate a SVGA3dShaderInstToken for the given SVGA3D shader opcode */
 static inline SVGA3dShaderInstToken
-inst_token(unsigned opcode)
+inst_token(SVGA3dShaderOpCodeType opcode)
 {
    SVGA3dShaderInstToken inst;
 
@@ -199,7 +205,7 @@ inst_token(unsigned opcode)
  * with the predication flag set.
  */
 static inline SVGA3dShaderInstToken
-inst_token_predicated(unsigned opcode)
+inst_token_predicated(SVGA3dShaderOpCodeType opcode)
 {
    SVGA3dShaderInstToken inst;
 
@@ -216,7 +222,7 @@ inst_token_predicated(unsigned opcode)
  * using the given comparison operator (one of SVGA3DOPCOMP_xx).
  */
 static inline SVGA3dShaderInstToken
-inst_token_setp(unsigned operator)
+inst_token_setp(SVGA3dShaderOpCodeCompFnType operator)
 {
    SVGA3dShaderInstToken inst;
 
@@ -234,7 +240,7 @@ inst_token_setp(unsigned operator)
  * temp registers AND constants (see emit_def_const()).
  */
 static inline SVGA3dShaderDestToken
-dst_register(unsigned file, int number)
+dst_register(SVGA3dShaderRegType file, int number)
 {
    SVGA3dShaderDestToken dest;
 
@@ -272,7 +278,7 @@ writemask(SVGA3dShaderDestToken dest, unsigned mask)
 
 /** Create a SVGA3dShaderSrcToken given a register file and number */
 static inline SVGA3dShaderSrcToken
-src_token(unsigned file, int number)
+src_token(SVGA3dShaderRegType file, int number)
 {
    SVGA3dShaderSrcToken src;
 
@@ -296,7 +302,7 @@ src_token(unsigned file, int number)
 
 /** Create a src_register given a register file and register number */
 static inline struct src_register
-src_register(unsigned file, int number)
+src_register(SVGA3dShaderRegType file, int number)
 {
    struct src_register src;