From ec17bdcadeac50a232df039afcf5e006bb0e9858 Mon Sep 17 00:00:00 2001 From: Jonathan Gray Date: Sun, 22 Nov 2015 02:46:45 +0000 Subject: import Mesa 11.0.6 --- lib/mesa/scons/crossmingw.py | 6 +-- .../gallium/drivers/freedreno/a2xx/instr-a2xx.h | 51 ++++++++-------------- lib/mesa/src/gallium/drivers/softpipe/SConscript | 2 +- lib/mesa/src/mapi/glapi/SConscript | 12 +++-- lib/mesa/src/mapi/glapi/gen/SConscript | 4 +- 5 files changed, 31 insertions(+), 44 deletions(-) (limited to 'lib') diff --git a/lib/mesa/scons/crossmingw.py b/lib/mesa/scons/crossmingw.py index b2efccea7..34129450a 100644 --- a/lib/mesa/scons/crossmingw.py +++ b/lib/mesa/scons/crossmingw.py @@ -83,7 +83,7 @@ def shlib_emitter(target, source, env): no_import_lib = env.get('no_import_lib', 0) if not dll: - raise SCons.Errors.UserError("A shared library should have exactly one target with the suffix: %s" % env.subst("$SHLIBSUFFIX")) + raise SCons.Errors.UserError, "A shared library should have exactly one target with the suffix: %s" % env.subst("$SHLIBSUFFIX") if not no_import_lib and \ not env.FindIxes(target, 'LIBPREFIX', 'LIBSUFFIX'): @@ -128,9 +128,9 @@ def generate(env): if not path: path = [] if SCons.Util.is_String(path): - path = str.split(path, os.pathsep) + path = string.split(path, os.pathsep) - env['ENV']['PATH'] = str.join(os.pathsep, [dir] + path) + env['ENV']['PATH'] = string.join([dir] + path, os.pathsep) # Most of mingw is the same as gcc and friends... gnu_tools = ['gcc', 'g++', 'gnulink', 'ar', 'gas'] diff --git a/lib/mesa/src/gallium/drivers/freedreno/a2xx/instr-a2xx.h b/lib/mesa/src/gallium/drivers/freedreno/a2xx/instr-a2xx.h index 0078b24b5..0d6e138da 100644 --- a/lib/mesa/src/gallium/drivers/freedreno/a2xx/instr-a2xx.h +++ b/lib/mesa/src/gallium/drivers/freedreno/a2xx/instr-a2xx.h @@ -87,7 +87,6 @@ typedef enum { SIN = 48, COS = 49, RETAIN_PREV = 50, - SCALAR_NONE = 63, } instr_scalar_opc_t; typedef enum { @@ -121,7 +120,6 @@ typedef enum { KILLNEv = 27, DSTv = 28, MOVAv = 29, - VECTOR_NONE = 31, } instr_vector_opc_t; typedef struct PACKED { @@ -149,25 +147,15 @@ typedef struct PACKED { uint8_t const_1_rel_abs : 1; uint8_t const_0_rel_abs : 1; /* dword2: */ - union { - struct { - uint8_t src3_reg : 6; - uint8_t src3_reg_select : 1; - uint8_t src3_reg_abs : 1; - uint8_t src2_reg : 6; - uint8_t src2_reg_select : 1; - uint8_t src2_reg_abs : 1; - uint8_t src1_reg : 6; - uint8_t src1_reg_select : 1; - uint8_t src1_reg_abs : 1; - }; - /* constants have full 8-bit index */ - struct { - uint8_t src3_reg_byte : 8; - uint8_t src2_reg_byte : 8; - uint8_t src1_reg_byte : 8; - }; - }; + uint8_t src3_reg : 6; + uint8_t src3_reg_select : 1; + uint8_t src3_reg_abs : 1; + uint8_t src2_reg : 6; + uint8_t src2_reg_select : 1; + uint8_t src2_reg_abs : 1; + uint8_t src1_reg : 6; + uint8_t src1_reg_select : 1; + uint8_t src1_reg_abs : 1; instr_vector_opc_t vector_opc : 5; uint8_t src3_sel : 1; uint8_t src2_sel : 1; @@ -372,14 +360,16 @@ typedef struct PACKED { uint8_t signed_rf_mode_all : 1; uint8_t reserved1 : 1; instr_surf_fmt_t format : 6; - uint8_t reserved2 : 2; - uint8_t exp_adjust_all : 6; + uint8_t reserved2 : 1; + uint8_t exp_adjust_all : 7; uint8_t reserved3 : 1; uint8_t pred_select : 1; /* dword2: */ uint8_t stride : 8; - uint32_t offset : 22; - uint8_t reserved4 : 1; + /* possibly offset and reserved4 are swapped on a200? */ + uint8_t offset : 8; + uint8_t reserved4 : 8; + uint8_t reserved5 : 7; uint8_t pred_condition : 1; } instr_fetch_vtx_t; @@ -391,17 +381,10 @@ typedef union PACKED { instr_fetch_opc_t opc : 5; uint32_t dummy0 : 27; /* dword1: */ - uint32_t dummy1 : 31; - uint8_t pred_select : 1; + uint32_t dummy1 : 32; /* dword2: */ - uint32_t dummy2 : 31; - uint8_t pred_condition : 1; + uint32_t dummy2 : 32; }; } instr_fetch_t; -typedef union PACKED { - instr_alu_t alu; - instr_fetch_t fetch; -} instr_t; - #endif /* INSTR_H_ */ diff --git a/lib/mesa/src/gallium/drivers/softpipe/SConscript b/lib/mesa/src/gallium/drivers/softpipe/SConscript index 8ae53b676..dc3542c51 100644 --- a/lib/mesa/src/gallium/drivers/softpipe/SConscript +++ b/lib/mesa/src/gallium/drivers/softpipe/SConscript @@ -2,7 +2,7 @@ Import('*') env = env.Clone() -env.MSVC2013Compat() +env.MSVC2008Compat() softpipe = env.ConvenienceLibrary( target = 'softpipe', diff --git a/lib/mesa/src/mapi/glapi/SConscript b/lib/mesa/src/mapi/glapi/SConscript index a086f435e..8ded46f32 100644 --- a/lib/mesa/src/mapi/glapi/SConscript +++ b/lib/mesa/src/mapi/glapi/SConscript @@ -19,15 +19,18 @@ if env['platform'] == 'windows': '_GDI32_', # prevent gl* being declared __declspec(dllimport) in MS headers 'BUILD_GL32', # declare gl* as __declspec(dllexport) in Mesa headers 'KHRONOS_DLL_EXPORTS', # declare gl* as __declspec(dllexport) in Khronos headers - '_GLAPI_NO_EXPORTS', # prevent _glapi_* from being declared __declspec(dllimport) ]) + if env['gles']: + env.Append(CPPDEFINES = ['_GLAPI_DLL_EXPORTS']) + else: + # prevent _glapi_* from being declared __declspec(dllimport) + env.Append(CPPDEFINES = ['_GLAPI_NO_EXPORTS']) env.Append(CPPPATH = [ '#/src', '#/src/mapi', '#/src/mesa', - Dir('.'), # src/mapi/glapi build path - Dir('gen'), # src/mapi/glapi/gen build path + Dir('..'), # src/mapi build path ]) glapi_sources = [ @@ -49,7 +52,8 @@ for s in mapi_sources: # # Assembly sources # -if env['platform'] not in ('cygwin', 'darwin', 'windows'): +if (env['gcc'] or env['clang']) and \ + env['platform'] not in ('cygwin', 'darwin', 'windows'): GLAPI = '#src/mapi/glapi/' sources = [GLAPI + 'gen/gl_and_es_API.xml'] + env.Glob(GLAPI + 'gen/*.xml') diff --git a/lib/mesa/src/mapi/glapi/gen/SConscript b/lib/mesa/src/mapi/glapi/gen/SConscript index 942b55942..b9cdbbf36 100644 --- a/lib/mesa/src/mapi/glapi/gen/SConscript +++ b/lib/mesa/src/mapi/glapi/gen/SConscript @@ -28,7 +28,7 @@ env.CodeGenerate( ) env.CodeGenerate( - target = '../../../mapi/glapi/gen/glapitemp.h', + target = '../../../mapi/glapi/glapitemp.h', script = 'gl_apitemp.py', source = sources, command = python_cmd + ' $SCRIPT -f $SOURCE > $TARGET' @@ -51,7 +51,7 @@ env.CodeGenerate( env.CodeGenerate( target = '../../../mesa/main/enums.c', script = 'gl_enums.py', - source = '../registry/gl.xml', + source = sources, command = python_cmd + ' $SCRIPT -f $SOURCE > $TARGET' ) -- cgit v1.2.3