mesa: add PROGRAM_IMMEDIATE, PROGRAM_BUFFER
authorIlia Mirkin <imirkin@alum.mit.edu>
Mon, 18 Jan 2016 04:57:48 +0000 (23:57 -0500)
committerIlia Mirkin <imirkin@alum.mit.edu>
Sat, 30 Jan 2016 02:05:35 +0000 (21:05 -0500)
This makes PROGRAM_IMMEDIATE a first-class gl_register_file type, and
adds PROGRAM_BUFFER to the list. These are used purely inside
glsl_to_tgsi conversion.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/mesa/main/mtypes.h
src/mesa/state_tracker/st_glsl_to_tgsi.cpp

index f3102dc21e3430f069ba626cedbf60fc72be4a3b..101283cb1a450faf8c5416f6cd66e28d31cddd12 100644 (file)
@@ -1861,6 +1861,8 @@ typedef enum
    PROGRAM_SAMPLER,     /**< for shader samplers, compile-time only */
    PROGRAM_SYSTEM_VALUE,/**< InstanceId, PrimitiveID, etc. */
    PROGRAM_UNDEFINED,   /**< Invalid/TBD value */
+   PROGRAM_IMMEDIATE,   /**< Immediate value, used by TGSI */
+   PROGRAM_BUFFER,      /**< for shader buffers, compile-time only */
    PROGRAM_FILE_MAX
 } gl_register_file;
 
index f5b8c33622eb156782e97f08660c24297a247099..06207d06aa52f305ed88437cc0fe6fe1f8d819cc 100644 (file)
@@ -52,7 +52,6 @@
 #include "st_mesa_to_tgsi.h"
 
 
-#define PROGRAM_IMMEDIATE PROGRAM_FILE_MAX
 #define PROGRAM_ANY_CONST ((1 << PROGRAM_STATE_VAR) |    \
                            (1 << PROGRAM_CONSTANT) |     \
                            (1 << PROGRAM_UNIFORM))