Mesa (master): i965: Split out brw_stage _populate_key into their own functions
Module: Mesa Branch: master Commit: 28510d69ff8fc03bc1693be2b7a02bc68791dd2f URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=28510d69ff8fc03bc1693be2b7a02bc68791dd2f Author: Carl Worth cwo...@cworth.org Date: Mon Feb 23 14:44:39 2015 -0800 i965: Split out brw_stage_populate_key into their own functions This commit splits portions of the existing brw_upload_vs_prog and brw_upload_gs_prog function into new brw_vs_populate_key and brw_gs_populate_key functions. This follows the same style as is already present for all other stages, (see brw_wm_populate_key, etc.). This commit is intended to have no functional change. It exists in preparation for some upcoming code movement in preparation for the shader cache. Reviewed-by: Ian Romanick ian.d.roman...@intel.com Reviewed-by: Kenneth Graunke kenn...@whitecape.org --- src/mesa/drivers/dri/i965/brw_ff_gs.c |7 ++-- src/mesa/drivers/dri/i965/brw_gs.c| 39 ++ src/mesa/drivers/dri/i965/brw_vs.c| 58 - 3 files changed, 64 insertions(+), 40 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_ff_gs.c b/src/mesa/drivers/dri/i965/brw_ff_gs.c index 016fcdf..14ae4c1 100644 --- a/src/mesa/drivers/dri/i965/brw_ff_gs.c +++ b/src/mesa/drivers/dri/i965/brw_ff_gs.c @@ -147,8 +147,9 @@ static void compile_ff_gs_prog(struct brw_context *brw, ralloc_free(mem_ctx); } -static void populate_key(struct brw_context *brw, - struct brw_ff_gs_prog_key *key) +static void +brw_ff_gs_populate_key(struct brw_context *brw, + struct brw_ff_gs_prog_key *key) { static const unsigned swizzle_for_offset[4] = { BRW_SWIZZLE4(0, 1, 2, 3), @@ -235,7 +236,7 @@ brw_upload_ff_gs_prog(struct brw_context *brw) /* Populate the key: */ - populate_key(brw, key); + brw_ff_gs_populate_key(brw, key); if (brw-ff_gs.prog_active != key.need_gs_prog) { brw-ctx.NewDriverState |= BRW_NEW_FF_GS_PROG_DATA; diff --git a/src/mesa/drivers/dri/i965/brw_gs.c b/src/mesa/drivers/dri/i965/brw_gs.c index ffe7476..e233049 100644 --- a/src/mesa/drivers/dri/i965/brw_gs.c +++ b/src/mesa/drivers/dri/i965/brw_gs.c @@ -288,6 +288,30 @@ do_gs_prog(struct brw_context *brw, return true; } +static void +brw_gs_populate_key(struct brw_context *brw, +struct brw_gs_prog_key *key) +{ + struct gl_context *ctx = brw-ctx; + struct brw_stage_state *stage_state = brw-gs.base; + struct brw_geometry_program *gp = + (struct brw_geometry_program *) brw-geometry_program; + struct gl_program *prog = gp-program.Base; + + memset(key, 0, sizeof(*key)); + + key-base.program_string_id = gp-id; + brw_setup_vue_key_clip_info(brw, key-base, + gp-program.Base.UsesClipDistanceOut); + + /* _NEW_TEXTURE */ + brw_populate_sampler_prog_key_data(ctx, prog, stage_state-sampler_count, + key-base.tex); + + /* BRW_NEW_VUE_MAP_VS */ + key-input_varyings = brw-vue_map_vs.slots_valid; +} + void brw_upload_gs_prog(struct brw_context *brw) { @@ -327,20 +351,7 @@ brw_upload_gs_prog(struct brw_context *brw) return; } - struct gl_program *prog = gp-program.Base; - - memset(key, 0, sizeof(key)); - - key.base.program_string_id = gp-id; - brw_setup_vue_key_clip_info(brw, key.base, - gp-program.Base.UsesClipDistanceOut); - - /* _NEW_TEXTURE */ - brw_populate_sampler_prog_key_data(ctx, prog, stage_state-sampler_count, - key.base.tex); - - /* BRW_NEW_VUE_MAP_VS */ - key.input_varyings = brw-vue_map_vs.slots_valid; + brw_gs_populate_key(brw, key); if (!brw_search_cache(brw-cache, BRW_CACHE_GS_PROG, key, sizeof(key), diff --git a/src/mesa/drivers/dri/i965/brw_vs.c b/src/mesa/drivers/dri/i965/brw_vs.c index bf16f34..9069596 100644 --- a/src/mesa/drivers/dri/i965/brw_vs.c +++ b/src/mesa/drivers/dri/i965/brw_vs.c @@ -401,64 +401,76 @@ brw_setup_vue_key_clip_info(struct brw_context *brw, } } -void -brw_upload_vs_prog(struct brw_context *brw) +static void +brw_vs_populate_key(struct brw_context *brw, +struct brw_vs_prog_key *key) { struct gl_context *ctx = brw-ctx; - struct brw_vs_prog_key key; /* BRW_NEW_VERTEX_PROGRAM */ struct brw_vertex_program *vp = (struct brw_vertex_program *)brw-vertex_program; struct gl_program *prog = (struct gl_program *) brw-vertex_program; int i; - if (!brw_state_dirty(brw, -_NEW_BUFFERS | -_NEW_LIGHT | -_NEW_POINT | -_NEW_POLYGON | -_NEW_TEXTURE | -_NEW_TRANSFORM, -BRW_NEW_VERTEX_PROGRAM | -BRW_NEW_VS_ATTRIB_WORKAROUNDS)) - return; - - memset(key, 0, sizeof(key)); + memset
Mesa (master): i965: Split out per-stage dirty-bit checking into separate functions
Module: Mesa Branch: master Commit: a57672f18deca3060eab129a77cf84f5e420bac8 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=a57672f18deca3060eab129a77cf84f5e420bac8 Author: Carl Worth cwo...@cworth.org Date: Fri Mar 20 12:01:33 2015 -0700 i965: Split out per-stage dirty-bit checking into separate functions The dirty-bit checking from each brw_upload_stage_prog function is split out into its a new brw_stage_state_dirty function. This commit is intended to have no functional change. It exists in preparation for some upcoming code movement in preparation for the shader cache. Reviewed-by: Ian Romanick ian.d.roman...@intel.com Reviewed-by: Kenneth Graunke kenn...@whitecape.org --- src/mesa/drivers/dri/i965/brw_ff_gs.c | 16 +- src/mesa/drivers/dri/i965/brw_gs.c| 16 +- src/mesa/drivers/dri/i965/brw_vs.c| 24 + src/mesa/drivers/dri/i965/brw_wm.c| 38 +++-- 4 files changed, 59 insertions(+), 35 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_ff_gs.c b/src/mesa/drivers/dri/i965/brw_ff_gs.c index 14ae4c1..b3cbbe8 100644 --- a/src/mesa/drivers/dri/i965/brw_ff_gs.c +++ b/src/mesa/drivers/dri/i965/brw_ff_gs.c @@ -147,6 +147,16 @@ static void compile_ff_gs_prog(struct brw_context *brw, ralloc_free(mem_ctx); } +static bool +brw_ff_gs_state_dirty(struct brw_context *brw) +{ + return brw_state_dirty(brw, + _NEW_LIGHT, + BRW_NEW_PRIMITIVE | + BRW_NEW_TRANSFORM_FEEDBACK | + BRW_NEW_VS_PROG_DATA); +} + static void brw_ff_gs_populate_key(struct brw_context *brw, struct brw_ff_gs_prog_key *key) @@ -227,11 +237,7 @@ brw_upload_ff_gs_prog(struct brw_context *brw) { struct brw_ff_gs_prog_key key; - if (!brw_state_dirty(brw, -_NEW_LIGHT, -BRW_NEW_PRIMITIVE | -BRW_NEW_TRANSFORM_FEEDBACK | -BRW_NEW_VS_PROG_DATA)) + if (!brw_ff_gs_state_dirty(brw)) return; /* Populate the key: diff --git a/src/mesa/drivers/dri/i965/brw_gs.c b/src/mesa/drivers/dri/i965/brw_gs.c index e233049..6f7f129 100644 --- a/src/mesa/drivers/dri/i965/brw_gs.c +++ b/src/mesa/drivers/dri/i965/brw_gs.c @@ -288,6 +288,16 @@ do_gs_prog(struct brw_context *brw, return true; } +static bool +brw_gs_state_dirty(struct brw_context *brw) +{ + return brw_state_dirty(brw, + _NEW_TEXTURE, + BRW_NEW_GEOMETRY_PROGRAM | + BRW_NEW_TRANSFORM_FEEDBACK | + BRW_NEW_VUE_MAP_VS); +} + static void brw_gs_populate_key(struct brw_context *brw, struct brw_gs_prog_key *key) @@ -322,11 +332,7 @@ brw_upload_gs_prog(struct brw_context *brw) struct brw_geometry_program *gp = (struct brw_geometry_program *) brw-geometry_program; - if (!brw_state_dirty(brw, -_NEW_TEXTURE, -BRW_NEW_GEOMETRY_PROGRAM | -BRW_NEW_TRANSFORM_FEEDBACK | -BRW_NEW_VUE_MAP_VS)) + if (!brw_gs_state_dirty(brw)) return; if (gp == NULL) { diff --git a/src/mesa/drivers/dri/i965/brw_vs.c b/src/mesa/drivers/dri/i965/brw_vs.c index 9069596..2846ff6 100644 --- a/src/mesa/drivers/dri/i965/brw_vs.c +++ b/src/mesa/drivers/dri/i965/brw_vs.c @@ -401,6 +401,20 @@ brw_setup_vue_key_clip_info(struct brw_context *brw, } } +static bool +brw_vs_state_dirty(struct brw_context *brw) +{ + return brw_state_dirty(brw, + _NEW_BUFFERS | + _NEW_LIGHT | + _NEW_POINT | + _NEW_POLYGON | + _NEW_TEXTURE | + _NEW_TRANSFORM, + BRW_NEW_VERTEX_PROGRAM | + BRW_NEW_VS_ATTRIB_WORKAROUNDS); +} + static void brw_vs_populate_key(struct brw_context *brw, struct brw_vs_prog_key *key) @@ -459,15 +473,7 @@ brw_upload_vs_prog(struct brw_context *brw) struct brw_vertex_program *vp = (struct brw_vertex_program *)brw-vertex_program; - if (!brw_state_dirty(brw, -_NEW_BUFFERS | -_NEW_LIGHT | -_NEW_POINT | -_NEW_POLYGON | -_NEW_TEXTURE | -_NEW_TRANSFORM, -BRW_NEW_VERTEX_PROGRAM | -BRW_NEW_VS_ATTRIB_WORKAROUNDS)) + if (!brw_vs_state_dirty(brw)) return; brw_vs_populate_key(brw, key); diff --git a/src/mesa/drivers/dri/i965/brw_wm.c b/src/mesa/drivers/dri/i965/brw_wm.c index a0eda3a8..b85f236 100644 --- a/src/mesa/drivers/dri/i965/brw_wm.c +++ b/src/mesa/drivers/dri/i965/brw_wm.c @@ -421,6 +421,27
Mesa (master): i965: Rename do_stage_prog to brw_compile_stage_prog ( and export)
Module: Mesa Branch: master Commit: b9b66985c3d33fa0db2b49c0e0231aa6d341e183 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=b9b66985c3d33fa0db2b49c0e0231aa6d341e183 Author: Carl Worth cwo...@cworth.org Date: Fri Mar 20 12:10:49 2015 -0700 i965: Rename do_stage_prog to brw_compile_stage_prog (and export) This is in preparation for these functions to be called from other files. This commit is intended to have no functional change. It exists in preparation for some upcoming code movement in preparation for the shader cache. Reviewed-by: Ian Romanick ian.d.roman...@intel.com Reviewed-by: Kenneth Graunke kenn...@whitecape.org --- src/mesa/drivers/dri/i965/brw_ff_gs.c |7 --- src/mesa/drivers/dri/i965/brw_ff_gs.h |4 src/mesa/drivers/dri/i965/brw_fs.cpp |2 +- src/mesa/drivers/dri/i965/brw_gs.c| 18 +- src/mesa/drivers/dri/i965/brw_gs.h|7 +++ src/mesa/drivers/dri/i965/brw_vs.c| 18 +- src/mesa/drivers/dri/i965/brw_vs.h|6 ++ src/mesa/drivers/dri/i965/brw_wm.c| 13 +++-- src/mesa/drivers/dri/i965/brw_wm.h|8 9 files changed, 51 insertions(+), 32 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_ff_gs.c b/src/mesa/drivers/dri/i965/brw_ff_gs.c index b3cbbe8..e6f837c 100644 --- a/src/mesa/drivers/dri/i965/brw_ff_gs.c +++ b/src/mesa/drivers/dri/i965/brw_ff_gs.c @@ -45,8 +45,9 @@ #include util/ralloc.h -static void compile_ff_gs_prog(struct brw_context *brw, - struct brw_ff_gs_prog_key *key) +void +brw_compile_ff_gs_prog(struct brw_context *brw, + struct brw_ff_gs_prog_key *key) { struct brw_ff_gs_compile c; const GLuint *program; @@ -253,7 +254,7 @@ brw_upload_ff_gs_prog(struct brw_context *brw) if (!brw_search_cache(brw-cache, BRW_CACHE_FF_GS_PROG, key, sizeof(key), brw-ff_gs.prog_offset, brw-ff_gs.prog_data)) { -compile_ff_gs_prog( brw, key ); + brw_compile_ff_gs_prog(brw, key); } } } diff --git a/src/mesa/drivers/dri/i965/brw_ff_gs.h b/src/mesa/drivers/dri/i965/brw_ff_gs.h index e4afdab..3dd045f 100644 --- a/src/mesa/drivers/dri/i965/brw_ff_gs.h +++ b/src/mesa/drivers/dri/i965/brw_ff_gs.h @@ -115,4 +115,8 @@ void gen6_brw_upload_ff_gs_prog(struct brw_context *brw); void brw_upload_ff_gs_prog(struct brw_context *brw); +void +brw_compile_ff_gs_prog(struct brw_context *brw, + struct brw_ff_gs_prog_key *key); + #endif diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp index 9c2ccce..f30176c 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp @@ -4152,7 +4152,7 @@ brw_fs_precompile(struct gl_context *ctx, uint32_t old_prog_offset = brw-wm.base.prog_offset; struct brw_wm_prog_data *old_prog_data = brw-wm.prog_data; - bool success = do_wm_prog(brw, shader_prog, bfp, key); + bool success = brw_compile_wm_prog(brw, shader_prog, bfp, key); brw-wm.base.prog_offset = old_prog_offset; brw-wm.prog_data = old_prog_data; diff --git a/src/mesa/drivers/dri/i965/brw_gs.c b/src/mesa/drivers/dri/i965/brw_gs.c index 6f7f129..bea90d8 100644 --- a/src/mesa/drivers/dri/i965/brw_gs.c +++ b/src/mesa/drivers/dri/i965/brw_gs.c @@ -34,11 +34,11 @@ #include brw_ff_gs.h -static bool -do_gs_prog(struct brw_context *brw, - struct gl_shader_program *prog, - struct brw_geometry_program *gp, - struct brw_gs_prog_key *key) +bool +brw_compile_gs_prog(struct brw_context *brw, +struct gl_shader_program *prog, +struct brw_geometry_program *gp, +struct brw_gs_prog_key *key) { struct brw_stage_state *stage_state = brw-gs.base; struct brw_gs_compile c; @@ -326,6 +326,7 @@ void brw_upload_gs_prog(struct brw_context *brw) { struct gl_context *ctx = brw-ctx; + struct gl_shader_program **current = ctx-_Shader-CurrentProgram; struct brw_stage_state *stage_state = brw-gs.base; struct brw_gs_prog_key key; /* BRW_NEW_GEOMETRY_PROGRAM */ @@ -362,9 +363,8 @@ brw_upload_gs_prog(struct brw_context *brw) if (!brw_search_cache(brw-cache, BRW_CACHE_GS_PROG, key, sizeof(key), stage_state-prog_offset, brw-gs.prog_data)) { - bool success = - do_gs_prog(brw, ctx-_Shader-CurrentProgram[MESA_SHADER_GEOMETRY], gp, -key); + bool success = brw_compile_gs_prog(brw, current[MESA_SHADER_GEOMETRY], + gp, key); assert(success); (void)success; } @@ -400,7 +400,7 @@ brw_gs_precompile(struct gl_context *ctx, */ key.input_varyings = gp-Base.InputsRead; - success = do_gs_prog(brw, shader_prog, bgp, key); + success = brw_compile_gs_prog(brw, shader_prog, bgp, key
Mesa (master): i965: Perform program state upload outside of atom handling
Module: Mesa Branch: master Commit: 4a6c6c49a7236b1471df143a697195f0c11eb23c URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=4a6c6c49a7236b1471df143a697195f0c11eb23c Author: Carl Worth cwo...@cworth.org Date: Wed Feb 11 13:53:31 2015 -0800 i965: Perform program state upload outside of atom handling Across the board of the various generations, the intial few atoms in all of the atom lists are basically the same, (performing uploads for the various programs). The only difference is that prior to gen6 there's an ff_gs upload in place of the later gs upload. In this commit, instead of using the atom lists for this program state upload, we add a new function brw_upload_programs that calls into the per-stage upload functions which in turn check dirty bits and return immediately if nothing needs to be done. This commit is intended to have no functional change. The motivation is that future code, (such as the shader cache), wants to have a single function within which to perform various operations before and after program upload, (with some local variables holding state across the upload). It may be worth looking at whether some of the other functionality currently handled via atoms might also be more cleanly handled in a similar fashion. Reviewed-by: Kenneth Graunke kenn...@whitecape.org --- src/mesa/drivers/dri/i965/brw_ff_gs.c| 20 ++-- src/mesa/drivers/dri/i965/brw_ff_gs.h|3 ++ src/mesa/drivers/dri/i965/brw_gs.c | 22 + src/mesa/drivers/dri/i965/brw_gs.h |5 +++ src/mesa/drivers/dri/i965/brw_state.h|7 src/mesa/drivers/dri/i965/brw_state_upload.c | 35 ++-- src/mesa/drivers/dri/i965/brw_vs.c | 31 -- src/mesa/drivers/dri/i965/brw_vs.h |3 ++ src/mesa/drivers/dri/i965/brw_wm.c | 44 +++--- src/mesa/drivers/dri/i965/brw_wm.h |3 ++ 10 files changed, 89 insertions(+), 84 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_ff_gs.c b/src/mesa/drivers/dri/i965/brw_ff_gs.c index 653c4b6..828e383 100644 --- a/src/mesa/drivers/dri/i965/brw_ff_gs.c +++ b/src/mesa/drivers/dri/i965/brw_ff_gs.c @@ -221,10 +221,18 @@ static void populate_key(struct brw_context *brw, /* Calculate interpolants for triangle and line rasterization. */ -static void +void brw_upload_ff_gs_prog(struct brw_context *brw) { struct brw_ff_gs_prog_key key; + + if (!brw_state_dirty(brw, +_NEW_LIGHT, +BRW_NEW_PRIMITIVE | +BRW_NEW_TRANSFORM_FEEDBACK | +BRW_NEW_VS_PROG_DATA)) + return; + /* Populate the key: */ populate_key(brw, key); @@ -247,13 +255,3 @@ void gen6_brw_upload_ff_gs_prog(struct brw_context *brw) { brw_upload_ff_gs_prog(brw); } - -const struct brw_tracked_state brw_ff_gs_prog = { - .dirty = { - .mesa = _NEW_LIGHT, - .brw = BRW_NEW_PRIMITIVE | - BRW_NEW_TRANSFORM_FEEDBACK | - BRW_NEW_VS_PROG_DATA, - }, - .emit = brw_upload_ff_gs_prog -}; diff --git a/src/mesa/drivers/dri/i965/brw_ff_gs.h b/src/mesa/drivers/dri/i965/brw_ff_gs.h index a538948..e4afdab 100644 --- a/src/mesa/drivers/dri/i965/brw_ff_gs.h +++ b/src/mesa/drivers/dri/i965/brw_ff_gs.h @@ -112,4 +112,7 @@ void gen6_sol_program(struct brw_ff_gs_compile *c, unsigned num_verts, bool check_edge_flag); void gen6_brw_upload_ff_gs_prog(struct brw_context *brw); +void +brw_upload_ff_gs_prog(struct brw_context *brw); + #endif diff --git a/src/mesa/drivers/dri/i965/brw_gs.c b/src/mesa/drivers/dri/i965/brw_gs.c index c7ebe5f..1fba76a 100644 --- a/src/mesa/drivers/dri/i965/brw_gs.c +++ b/src/mesa/drivers/dri/i965/brw_gs.c @@ -292,8 +292,7 @@ do_gs_prog(struct brw_context *brw, return true; } - -static void +void brw_upload_gs_prog(struct brw_context *brw) { struct gl_context *ctx = brw-ctx; @@ -303,6 +302,13 @@ brw_upload_gs_prog(struct brw_context *brw) struct brw_geometry_program *gp = (struct brw_geometry_program *) brw-geometry_program; + if (!brw_state_dirty(brw, +_NEW_TEXTURE, +BRW_NEW_GEOMETRY_PROGRAM | +BRW_NEW_TRANSFORM_FEEDBACK | +BRW_NEW_VUE_MAP_VS)) + return; + if (gp == NULL) { /* No geometry shader. Vertex data just passes straight through. */ if (brw-state.dirty.brw BRW_NEW_VUE_MAP_VS) { @@ -358,18 +364,6 @@ brw_upload_gs_prog(struct brw_context *brw) } } - -const struct brw_tracked_state brw_gs_prog = { - .dirty = { - .mesa = _NEW_TEXTURE, - .brw = BRW_NEW_GEOMETRY_PROGRAM | - BRW_NEW_TRANSFORM_FEEDBACK | - BRW_NEW_VUE_MAP_VS, - }, - .emit = brw_upload_gs_prog -}; - - bool brw_gs_precompile(struct gl_context *ctx, struct gl_shader_program
Mesa (master): Revert use of Mesa IR optimizer for ARB_fragment_programs
Module: Mesa Branch: master Commit: 55a57834bf912916a5e07486b32f1778b35657f6 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=55a57834bf912916a5e07486b32f1778b35657f6 Author: Carl Worth cwo...@cworth.org Date: Thu Feb 12 10:14:24 2015 -0800 Revert use of Mesa IR optimizer for ARB_fragment_programs Commit f82f2fb3dc770902f1657ab1c22e6004faa3afab added use of the Mesa IR optimizer for both ARB_fragment_program and ARB_vertex_program, but only justified the vertex-program portions with measured performance improvements. Meanwhile, the optimizer was seen to generate hundreds of unused immediates without discarding them, causing failures. Discard the use of the optimizer for now to fix the regression. (In the future, we anticpate things moving from Mesa IR to NIR for better optimization anyway.) Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=82477 Reviewed-by: Ian Romanick ian.d.roman...@intel.com CC: 10.3 10.4 10.5 mesa-sta...@lists.freedesktop.org --- src/mesa/program/arbprogparse.c |3 --- 1 file changed, 3 deletions(-) diff --git a/src/mesa/program/arbprogparse.c b/src/mesa/program/arbprogparse.c index 7dec399..53a6f37 100644 --- a/src/mesa/program/arbprogparse.c +++ b/src/mesa/program/arbprogparse.c @@ -85,9 +85,6 @@ _mesa_parse_arb_fragment_program(struct gl_context* ctx, GLenum target, return; } - if ((ctx-_Shader-Flags GLSL_NO_OPT) == 0) - _mesa_optimize_program(ctx, prog); - free(program-Base.String); /* Copy the relevant contents of the arb_program struct into the ___ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit
Mesa (master): util/u_atomic: Add new macro p_atomic_add
Module: Mesa Branch: master Commit: b16de0b713fb4d5d1c5600d126e4ce945fc27303 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=b16de0b713fb4d5d1c5600d126e4ce945fc27303 Author: Carl Worth cwo...@cworth.org Date: Thu Feb 5 15:36:59 2015 -0800 util/u_atomic: Add new macro p_atomic_add This provides for atomic addition, which will be used by an upcoming shader-cache patch. A simple test is added to make check as well. Note: The various O/S functions differ on whether they return the original value or the value after the addition, so I did not provide an add_return() macro which would be sensitive to that difference. Reviewed-by: Matt Turner matts...@gmail.com Reviewed-by: Aaron Watry awa...@gmail.com Reviewed-by: José Fonseca jfons...@vmware.com --- src/util/u_atomic.h | 16 src/util/u_atomic_test.c |5 + 2 files changed, 21 insertions(+) diff --git a/src/util/u_atomic.h b/src/util/u_atomic.h index cf7fff3..e123e17 100644 --- a/src/util/u_atomic.h +++ b/src/util/u_atomic.h @@ -39,6 +39,7 @@ #define p_atomic_dec_zero(v) (__sync_sub_and_fetch((v), 1) == 0) #define p_atomic_inc(v) (void) __sync_add_and_fetch((v), 1) #define p_atomic_dec(v) (void) __sync_sub_and_fetch((v), 1) +#define p_atomic_add(v, i) (void) __sync_add_and_fetch((v), (i)) #define p_atomic_inc_return(v) __sync_add_and_fetch((v), 1) #define p_atomic_dec_return(v) __sync_sub_and_fetch((v), 1) #define p_atomic_cmpxchg(v, old, _new) \ @@ -60,6 +61,7 @@ #define p_atomic_dec_zero(_v) (p_atomic_dec_return(_v) == 0) #define p_atomic_inc(_v) ((void) p_atomic_inc_return(_v)) #define p_atomic_dec(_v) ((void) p_atomic_dec_return(_v)) +#define p_atomic_add(_v, _i) (*(_v) = *(_v) + (_i)) #define p_atomic_inc_return(_v) (++(*(_v))) #define p_atomic_dec_return(_v) (--(*(_v))) #define p_atomic_cmpxchg(_v, _old, _new) (*(_v) == (_old) ? (*(_v) = (_new), (_old)) : *(_v)) @@ -144,6 +146,13 @@ char _InterlockedCompareExchange8(char volatile *Destination8, char Exchange8, c sizeof *(_v) == sizeof(__int64) ? InterlockedDecrement64 ((__int64 *)(_v)) : \ (assert(!should not get here), 0)) +#define p_atomic_add(_v, _i) (\ + sizeof *(_v) == sizeof(char)? _InterlockedExchangeAdd8 ((char *) (_v), (_i)) : \ + sizeof *(_v) == sizeof(short) ? _InterlockedExchangeAdd16((short *) (_v), (_i)) : \ + sizeof *(_v) == sizeof(long)? _InterlockedExchangeAdd ((long *) (_v), (_i)) : \ + sizeof *(_v) == sizeof(__int64) ? InterlockedExchangeAdd64((__int64 *)(_v), (_i)) : \ + (assert(!should not get here), 0)) + #define p_atomic_cmpxchg(_v, _old, _new) (\ sizeof *(_v) == sizeof(char)? _InterlockedCompareExchange8 ((char *) (_v), (char) (_new), (char) (_old)) : \ sizeof *(_v) == sizeof(short) ? _InterlockedCompareExchange16((short *) (_v), (short) (_new), (short) (_old)) : \ @@ -198,6 +207,13 @@ char _InterlockedCompareExchange8(char volatile *Destination8, char Exchange8, c sizeof(*v) == sizeof(uint64_t) ? atomic_dec_64_nv((uint64_t *)(v)) : \ (assert(!should not get here), 0)) +#define p_atomic_add(v, i) ((void) \ + sizeof(*v) == sizeof(uint8_t) ? atomic_add_8 ((uint8_t *)(v), (i)) : \ + sizeof(*v) == sizeof(uint16_t) ? atomic_add_16((uint16_t *)(v), (i)) : \ + sizeof(*v) == sizeof(uint32_t) ? atomic_add_32((uint32_t *)(v), (i)) : \ + sizeof(*v) == sizeof(uint64_t) ? atomic_add_64((uint64_t *)(v), (i)) : \ +(assert(!should not get here), 0)) + #define p_atomic_cmpxchg(v, old, _new) ((typeof(*v)) \ sizeof(*v) == sizeof(uint8_t) ? atomic_cas_8 ((uint8_t *)(v), (uint8_t )(old), (uint8_t )(_new)) : \ sizeof(*v) == sizeof(uint16_t) ? atomic_cas_16((uint16_t *)(v), (uint16_t)(old), (uint16_t)(_new)) : \ diff --git a/src/util/u_atomic_test.c b/src/util/u_atomic_test.c index 4845e75..c506275 100644 --- a/src/util/u_atomic_test.c +++ b/src/util/u_atomic_test.c @@ -97,6 +97,11 @@ assert(v == ones p_atomic_dec_return); \ assert(r == v p_atomic_dec_return); \ \ + v = 23; \ + p_atomic_add(v, 42); \ + r = p_atomic_read(v); \ + assert(r == 65 p_atomic_add); \ + \ (void) r; \ (void) b; \ } ___ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit
Mesa (master): Rename sha1.c and sha1.h to mesa-sha1.c and mesa-sha1.h
Module: Mesa Branch: master Commit: 3b8ccca8a3b5e03829fba7cdb57b49fc10917954 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=3b8ccca8a3b5e03829fba7cdb57b49fc10917954 Author: Carl Worth cwo...@cworth.org Date: Mon Jan 19 10:49:41 2015 -0800 Rename sha1.c and sha1.h to mesa-sha1.c and mesa-sha1.h The filename of sha1.h was conflicting with the system-provided sha1.h, (and in some confiurations, our sha1.c was unsuccessfully attemping to include sha1.h and sha1.h as two different files). Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=88523 --- src/util/Makefile.sources|4 ++-- src/util/{sha1.c = mesa-sha1.c} |2 +- src/util/{sha1.h = mesa-sha1.h} |0 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/util/Makefile.sources b/src/util/Makefile.sources index 52ae5cc..5ec3fe1 100644 --- a/src/util/Makefile.sources +++ b/src/util/Makefile.sources @@ -1,6 +1,6 @@ MESA_UTIL_SHADER_CACHE_FILES := \ - sha1.c \ - sha1.h + mesa-sha1.c \ + mesa-sha1.h MESA_UTIL_FILES := \ format_srgb.h \ diff --git a/src/util/sha1.c b/src/util/mesa-sha1.c similarity index 99% rename from src/util/sha1.c rename to src/util/mesa-sha1.c index 27ba93b..fa28193 100644 --- a/src/util/sha1.c +++ b/src/util/mesa-sha1.c @@ -24,7 +24,7 @@ * DEALINGS IN THE SOFTWARE. */ -#include sha1.h +#include mesa-sha1.h #if defined(HAVE_SHA1_IN_LIBMD) /* Use libmd for SHA1 */ \ || defined(HAVE_SHA1_IN_LIBC) /* Use libc for SHA1 */ diff --git a/src/util/sha1.h b/src/util/mesa-sha1.h similarity index 100% rename from src/util/sha1.h rename to src/util/mesa-sha1.h ___ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit
Mesa (master): configure: Add machinery for --enable-shader-cache ( and --disable-shader-cache)
Module: Mesa Branch: master Commit: 59216f53ecb3076b64a0e55856382029919ba738 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=59216f53ecb3076b64a0e55856382029919ba738 Author: Carl Worth cwo...@cworth.org Date: Wed Jan 14 15:53:00 2015 -0800 configure: Add machinery for --enable-shader-cache (and --disable-shader-cache) We don't actually have the code for the shader cache just yet, but this configure machinery puts everything in place so that the shader cache can be optionally compiled in. Specifically, if the user passes no option (neither --disable-shader-cache, nor --enable-shader-cache), then this feature will be automatically detected based on the presence of a usable SHA-1 library. If no suitable library can be found, then the shader cache will be automatically disabled, (and reported in the final output from configure). The user can force the shader-cache feature to not be compiled, (even if a SHA-1 library is detected), by passing --disable-shader-cache. This will prevent the compiled Mesa libraries from depending on any library for SHA-1 implementation. Finally, the user can also force the shader cache on with --enable-shader-cache. This will cause configure to trigger a fatal error if no sutiable SHA-1 implementation can be found for the shader-cache feature. Bug fix by José Fonseca jfons...@vmware.com: Fix to put conditional assignment in Makefile.am, not Makefile.sources to avoid breaking scons build. Note: As recommended by José, with this commit the scons build will not compile any of the SHA-1-using code. This is waiting for someone to write SConstruct detection of the available SHA-1 libraries, (and set the appropriate HAVE_SHA1_* variables). Reviewed-by: Matt Turner matts...@gmail.com --- configure.ac | 23 ++- src/util/Makefile.am |4 ++-- src/util/Makefile.sources |2 +- src/util/SConscript |5 + 4 files changed, 30 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index 5b867de..a4c5c74 100644 --- a/configure.ac +++ b/configure.ac @@ -1043,11 +1043,26 @@ if test x$with_sha1 = xlibcrypto; then fi fi AC_MSG_CHECKING([for SHA1 implementation]) -AM_CONDITIONAL([HAVE_SHA1], [test x$with_sha1 != x]) AC_MSG_RESULT([$with_sha1]) AC_SUBST(SHA1_LIBS) AC_SUBST(SHA1_CFLAGS) +# Allow user to configure out the shader-cache feature +AC_ARG_ENABLE([shader-cache], +AS_HELP_STRING([--disable-shader-cache], [Disable binary shader cache]), +[enable_shader_cache=$enableval], +[if test x$with_sha1 != x; then +enable_shader_cache=yes + else +enable_shader_cache=no + fi]) +if test x$with_sha1 = x; then +if test x$enable_shader_cache = xyes; then +AC_MSG_ERROR([Cannot enable shader cache (no SHA-1 implementation found)]) +fi +fi +AM_CONDITIONAL([ENABLE_SHADER_CACHE], [test x$enable_shader_cache = xyes]) + # Check for libdrm PKG_CHECK_MODULES([LIBDRM], [libdrm = $LIBDRM_REQUIRED], [have_libdrm=yes], [have_libdrm=no]) @@ -2490,6 +2505,12 @@ else echo Gallium: no fi +dnl Shader cache +echo +echo Shader cache:$enable_shader_cache +if test x$enable_shader_cache = xyes; then +echo With SHA1 from: $with_sha1 +fi dnl Libraries echo diff --git a/src/util/Makefile.am b/src/util/Makefile.am index 03b619e..7512138 100644 --- a/src/util/Makefile.am +++ b/src/util/Makefile.am @@ -38,8 +38,8 @@ libmesautil_la_SOURCES = \ $(MESA_UTIL_FILES) \ $(MESA_UTIL_GENERATED_FILES) -if HAVE_SHA1 -libmesautil_la_SOURCES += $(MESA_UTIL_SHA1_FILES) +if ENABLE_SHADER_CACHE +libmesautil_la_SOURCES += $(MESA_UTIL_SHADER_CACHE_FILES) endif libmesautil_la_LIBADD = $(SHA1_LIBS) diff --git a/src/util/Makefile.sources b/src/util/Makefile.sources index 4e54c74..52ae5cc 100644 --- a/src/util/Makefile.sources +++ b/src/util/Makefile.sources @@ -1,4 +1,4 @@ -MESA_UTIL_SHA1_FILES := \ +MESA_UTIL_SHADER_CACHE_FILES := \ sha1.c \ sha1.h diff --git a/src/util/SConscript b/src/util/SConscript index 34b9a2d..28fedd8 100644 --- a/src/util/SConscript +++ b/src/util/SConscript @@ -29,6 +29,11 @@ mesautil_sources = ( source_lists['MESA_UTIL_GENERATED_FILES'] ) +# XXX We don't yet have scons support for detecting any of the various +# HAVE_SHA1_* definitions, so for now simply disable the shader cache. +if False: +mesautil_sources += source_lists['MESA_UTIL_SHADER_CACHE_FILES'] + mesautil = env.ConvenienceLibrary( target = 'mesautil', source = mesautil_sources, ___ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit
Mesa (master): glsl: Add unit tests for blob.c
Module: Mesa Branch: master Commit: 977ddecb69549c472233082095ba5a833b04291c URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=977ddecb69549c472233082095ba5a833b04291c Author: Carl Worth cwo...@cworth.org Date: Mon Dec 15 15:58:34 2014 -0800 glsl: Add unit tests for blob.c In addition to exercising all of the functions in blob.h, this includes a stress test that forces some reallocing, and also tests to verify the alignment and overrun-detection code in blob.c. --- src/glsl/Makefile.am |7 + src/glsl/tests/.gitignore |1 + src/glsl/tests/blob_test.c | 320 3 files changed, 328 insertions(+) diff --git a/src/glsl/Makefile.am b/src/glsl/Makefile.am index b2b74a9..01123bc 100644 --- a/src/glsl/Makefile.am +++ b/src/glsl/Makefile.am @@ -42,6 +42,7 @@ include Makefile.sources TESTS = glcpp/tests/glcpp-test \ glcpp/tests/glcpp-test-cr-lf\ + tests/blob-test \ tests/general-ir-test \ tests/optimization-test \ tests/sampler-types-test\ @@ -55,12 +56,18 @@ noinst_LTLIBRARIES = libglsl.la libglcpp.la check_PROGRAMS = \ glcpp/glcpp \ glsl_test \ + tests/blob-test \ tests/general-ir-test \ tests/sampler-types-test\ tests/uniform-initializer-test noinst_PROGRAMS = glsl_compiler +tests_blob_test_SOURCES = \ + tests/blob_test.c +tests_blob_test_LDADD =\ + $(top_builddir)/src/glsl/libglsl.la + tests_general_ir_test_SOURCES =\ $(top_srcdir)/src/mesa/main/imports.c \ $(top_srcdir)/src/mesa/program/prog_hash_table.c\ diff --git a/src/glsl/tests/.gitignore b/src/glsl/tests/.gitignore index 15ce248..13dcdc4 100644 --- a/src/glsl/tests/.gitignore +++ b/src/glsl/tests/.gitignore @@ -1,3 +1,4 @@ +blob-test ralloc-test uniform-initializer-test sampler-types-test diff --git a/src/glsl/tests/blob_test.c b/src/glsl/tests/blob_test.c new file mode 100644 index 000..4806029 --- /dev/null +++ b/src/glsl/tests/blob_test.c @@ -0,0 +1,320 @@ +/* + * Copyright © 2014 Intel Corporation + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the Software), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + */ + +/* A collection of unit tests for blob.c */ + +#include stdio.h +#include stdlib.h +#include stdbool.h +#include string.h + +#include util/ralloc.h +#include blob.h + +#define bytes_test_str bytes_test +#define reserve_test_str reserve_test + +/* This placeholder must be the same length as the next overwrite_test_str */ +#define placeholder_strXX +#define overwrite_test_str overwrite_test +#define uint32_test0x12345678 +#define uint32_placeholder 0xDEADBEEF +#define uint32_overwrite 0xA1B2C3D4 +#define uint64_test0x1234567890ABCDEF +#define string_test_strstring_test + +bool error = false; + +static void +expect_equal(uint64_t expected, uint64_t actual, const char *test) +{ + if (actual != expected) { + fprintf (stderr, Error: Test '%s' failed: Expected=%ld, Actual=%ld\n, + test, expected, actual); + error = true; + } +} + +static void +expect_unequal(uint64_t expected, uint64_t actual, const char *test) +{ + if (actual == expected) { + fprintf (stderr, Error: Test '%s' failed: Result=%ld, but expected something different.\n, + test, actual); + error = true; + } +} + +static void +expect_equal_str(const char *expected, const char *actual, const char *test) +{ + if (strcmp(expected, actual)) { + fprintf (stderr
Mesa (master): glsl: Add blob.c---a simple interface for serializing data
Module: Mesa Branch: master Commit: 1c9877327ead37b7dd5a0ca3a8c7912e924328e5 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=1c9877327ead37b7dd5a0ca3a8c7912e924328e5 Author: Carl Worth cwo...@cworth.org Date: Thu Dec 4 14:16:47 2014 -0800 glsl: Add blob.c---a simple interface for serializing data This new interface allows for writing a series of objects to a chunk of memory (a blob).. The allocated memory is maintained within the blob itself, (and re-allocated by doubling when necessary). There are also functions for reading objects from a blob as well. If code attempts to read beyond the available memory, the read functions return 0 values (or its moral equivalent) without reading past the allocated memory. Once the caller is done with the reads, it can check blob-overrun to ensure whether any invalid values were previously returned due to attempts to read too far. Reviewed-by: Jason Ekstrand jason.ekstr...@intel.com --- src/glsl/Makefile.sources |2 + src/glsl/blob.c | 300 + src/glsl/blob.h | 246 + 3 files changed, 548 insertions(+) diff --git a/src/glsl/Makefile.sources b/src/glsl/Makefile.sources index a951ca7..6237627 100644 --- a/src/glsl/Makefile.sources +++ b/src/glsl/Makefile.sources @@ -65,6 +65,8 @@ LIBGLSL_FILES = \ $(GLSL_SRCDIR)/ast_function.cpp \ $(GLSL_SRCDIR)/ast_to_hir.cpp \ $(GLSL_SRCDIR)/ast_type.cpp \ + $(GLSL_SRCDIR)/blob.c \ + $(GLSL_SRCDIR)/blob.h \ $(GLSL_SRCDIR)/builtin_functions.cpp \ $(GLSL_SRCDIR)/builtin_type_macros.h \ $(GLSL_SRCDIR)/builtin_types.cpp \ diff --git a/src/glsl/blob.c b/src/glsl/blob.c new file mode 100644 index 000..a4003cf --- /dev/null +++ b/src/glsl/blob.c @@ -0,0 +1,300 @@ +/* + * Copyright © 2014 Intel Corporation + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the Software), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + */ + +#include string.h + +#include main/macros.h +#include util/ralloc.h +#include blob.h + +#define BLOB_INITIAL_SIZE 4096 + +/* Ensure that \blob will be able to fit an additional object of size + * \additional. The growing (if any) will occur by doubling the existing + * allocation. + */ +static bool +grow_to_fit(struct blob *blob, size_t additional) +{ + size_t to_allocate; + uint8_t *new_data; + + if (blob-size + additional = blob-allocated) + return true; + + if (blob-allocated == 0) + to_allocate = BLOB_INITIAL_SIZE; + else + to_allocate = blob-allocated * 2; + + to_allocate = MAX2(to_allocate, blob-allocated + additional); + + new_data = reralloc_size(blob, blob-data, to_allocate); + if (new_data == NULL) + return false; + + blob-data = new_data; + blob-allocated = to_allocate; + + return true; +} + +/* Align the blob-size so that reading or writing a value at (blob-data + + * blob-size) will result in an access aligned to a granularity of \alignment + * bytes. + * + * \return True unless allocation fails + */ +static bool +align_blob(struct blob *blob, size_t alignment) +{ + const size_t new_size = ALIGN(blob-size, alignment); + + if (! grow_to_fit (blob, new_size - blob-size)) + return false; + + blob-size = new_size; + + return true; +} + +static void +align_blob_reader(struct blob_reader *blob, size_t alignment) +{ + blob-current = blob-data + ALIGN(blob-current - blob-data, alignment); +} + +struct blob * +blob_create(void *mem_ctx) +{ + struct blob *blob; + + blob = ralloc(mem_ctx, struct blob); + if (blob == NULL) + return NULL; + + blob-data = NULL; + blob-allocated = 0; + blob-size = 0; + + return blob; +} + +bool +blob_write_bytes(struct blob *blob, const void *bytes, size_t to_write) +{ + if (! grow_to_fit(blob, to_write)) + return false; + + memcpy(blob-data + blob-size, bytes, to_write); + blob-size += to_write; + + return true
Mesa (master): util: Make unreachable at least be an assert
Module: Mesa Branch: master Commit: 62d5b4b03aa63582cf0801d306d7ca055cca40a0 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=62d5b4b03aa63582cf0801d306d7ca055cca40a0 Author: Carl Worth cwo...@cworth.org Date: Fri Dec 5 08:05:44 2014 -0800 util: Make unreachable at least be an assert Previously, if __builtin_unreachable() was unavailable, the unreachable macro was defined to do nothing. We do better here, by at least still making it an assert. Reviewed-by: Ian Romanick ian.d.roman...@intel.com --- src/util/macros.h |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/macros.h b/src/util/macros.h index 5fc6729..eec8b93 100644 --- a/src/util/macros.h +++ b/src/util/macros.h @@ -82,7 +82,7 @@ do {\ #endif #ifndef unreachable -#define unreachable(str) +#define unreachable(str) assert(!str) #endif /** ___ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit
Mesa (master): mesa: Add mesa SHA-1 functions
Module: Mesa Branch: master Commit: a24bdce46f95cbe9efd3b26f157d1eb36584861f URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=a24bdce46f95cbe9efd3b26f157d1eb36584861f Author: Carl Worth cwo...@cworth.org Date: Fri Dec 12 13:55:30 2014 -0800 mesa: Add mesa SHA-1 functions The upcoming shader cache uses the SHA-1 algorithm for cryptographic naming. These new mesa_sha1 functions are implemented with any one of several differeny cryptographics libraries. This code was copied from the xserver repository, (where it has apparently been functioning well on a variety of operating systems), and comes licensed with a license identical to that of Mesa. Bug fixes by José Fonseca jfons...@vmware.com: Fix to put conditional assignment in Makefile.am, not Makefile.sources to avoid breaking scons build. Fix include file for CryptoAPI section. Fix missing cast in openssl section. Reviewed-by: Matt Turner matts...@gmail.com --- configure.ac | 124 ++ src/util/Makefile.am |7 + src/util/Makefile.sources |4 + src/util/sha1.c | 316 + src/util/sha1.h | 53 5 files changed, 504 insertions(+) diff --git a/configure.ac b/configure.ac index e9d73e4..5b867de 100644 --- a/configure.ac +++ b/configure.ac @@ -9,6 +9,7 @@ dnl Copyright © 2009-2014 Jon TURNEY dnl Copyright © 2011-2012 Benjamin Franzke dnl Copyright © 2008-2014 David Airlie dnl Copyright © 2009-2013 Brian Paul +dnl Copyright © 2003-2007 Keith Packard, Daniel Stone dnl dnl Permission is hereby granted, free of charge, to any person obtaining a dnl copy of this software and associated documentation files (the Software), @@ -924,6 +925,129 @@ fi AC_SUBST([MESA_LLVM]) +# SHA1 hashing +AC_ARG_WITH([sha1], + [AS_HELP_STRING([--with-sha1=libc|libmd|libnettle|libgcrypt|libcrypto|libsha1|CommonCrypto|CryptoAPI], +[choose SHA1 implementation])]) +case x$with_sha1 in +x | xlibc | xlibmd | xlibnettle | xlibgcrypt | xlibcrypto | xlibsha1 | xCommonCrypto | xCryptoAPI) + ;; +*) +AC_MSG_ERROR([Illegal value for --with-sha1: $with_sha1]) +esac + +AC_CHECK_FUNC([SHA1Init], [HAVE_SHA1_IN_LIBC=yes]) +if test x$with_sha1 = x test x$HAVE_SHA1_IN_LIBC = xyes; then + with_sha1=libc +fi +if test x$with_sha1 = xlibc test x$HAVE_SHA1_IN_LIBC != xyes; then + AC_MSG_ERROR([sha1 in libc requested but not found]) +fi +if test x$with_sha1 = xlibc; then + AC_DEFINE([HAVE_SHA1_IN_LIBC], [1], + [Use libc SHA1 functions]) + SHA1_LIBS= +fi +AC_CHECK_FUNC([CC_SHA1_Init], [HAVE_SHA1_IN_COMMONCRYPTO=yes]) +if test x$with_sha1 = x test x$HAVE_SHA1_IN_COMMONCRYPTO = xyes; then + with_sha1=CommonCrypto +fi +if test x$with_sha1 = xCommonCrypto test x$HAVE_SHA1_IN_COMMONCRYPTO != xyes; then + AC_MSG_ERROR([CommonCrypto requested but not found]) +fi +if test x$with_sha1 = xCommonCrypto; then + AC_DEFINE([HAVE_SHA1_IN_COMMONCRYPTO], [1], + [Use CommonCrypto SHA1 functions]) + SHA1_LIBS= +fi +dnl stdcall functions cannot be tested with AC_CHECK_LIB +AC_CHECK_HEADER([wincrypt.h], [HAVE_SHA1_IN_CRYPTOAPI=yes], [], [#include windows.h]) +if test x$with_sha1 = x test x$HAVE_SHA1_IN_CRYPTOAPI = xyes; then + with_sha1=CryptoAPI +fi +if test x$with_sha1 = xCryptoAPI test x$HAVE_SHA1_IN_CRYPTOAPI != xyes; then + AC_MSG_ERROR([CryptoAPI requested but not found]) +fi +if test x$with_sha1 = xCryptoAPI; then + AC_DEFINE([HAVE_SHA1_IN_CRYPTOAPI], [1], + [Use CryptoAPI SHA1 functions]) + SHA1_LIBS= +fi +AC_CHECK_LIB([md], [SHA1Init], [HAVE_LIBMD=yes]) +if test x$with_sha1 = x test x$HAVE_LIBMD = xyes; then + with_sha1=libmd +fi +if test x$with_sha1 = xlibmd test x$HAVE_LIBMD != xyes; then + AC_MSG_ERROR([libmd requested but not found]) +fi +if test x$with_sha1 = xlibmd; then + AC_DEFINE([HAVE_SHA1_IN_LIBMD], [1], + [Use libmd SHA1 functions]) + SHA1_LIBS=-lmd +fi +PKG_CHECK_MODULES([LIBSHA1], [libsha1], [HAVE_LIBSHA1=yes], [HAVE_LIBSHA1=no]) +if test x$with_sha1 = x test x$HAVE_LIBSHA1 = xyes; then + with_sha1=libsha1 +fi +if test x$with_sha1 = xlibsha1 test x$HAVE_LIBSHA1 != xyes; then + AC_MSG_ERROR([libsha1 requested but not found]) +fi +if test x$with_sha1 = xlibsha1; then + AC_DEFINE([HAVE_SHA1_IN_LIBSHA1], [1], + [Use libsha1 for SHA1]) + SHA1_LIBS=-lsha1 +fi +AC_CHECK_LIB([nettle], [nettle_sha1_init], [HAVE_LIBNETTLE=yes]) +if test x$with_sha1 = x test x$HAVE_LIBNETTLE = xyes; then + with_sha1=libnettle +fi +if test x$with_sha1 = xlibnettle test x$HAVE_LIBNETTLE != xyes; then + AC_MSG_ERROR([libnettle requested but not found]) +fi +if test x$with_sha1 = xlibnettle; then + AC_DEFINE([HAVE_SHA1_IN_LIBNETTLE], [1], + [Use libnettle SHA1 functions]) + SHA1_LIBS=-lnettle +fi +AC_CHECK_LIB([gcrypt], [gcry_md_open
Mesa (master): mesa: Add iterate method for string_to_uint_map
Module: Mesa Branch: master Commit: 165575d0a8ca2af582a7c78776a4a76a84cc2ed8 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=165575d0a8ca2af582a7c78776a4a76a84cc2ed8 Author: Tapani Pälli tapani.pa...@intel.com Date: Mon Jun 2 15:05:51 2014 +0300 mesa: Add iterate method for string_to_uint_map The upcoming shader cache needs this to be able to cache hash data from the gl_shader_program structure. Edited-by: Carl Worth cwo...@cworth.org: There is an internal implementation detail that the hash table underlying the struct string_to_uint_map stores each value internally as (value+1). The user needn't be very concerned with this (other than knowing that a value of UINT_MAX cannot be stored) since put() adds 1 and get() subtracts 1. So in this commit, rather than call the user's function directly with hash_table_call_foreach, we call through a wrapper that fixes up the off-by-one values before the caller's callback sees them. And with this wrapper in place, we also give a better signature to the callback function being passed to iterate(), so that this callback function can actually expect a char* and an unsigned argument, (rather than a couple of void* ). Reviewed-by: Ian Romanick ian.d.roman...@intel.com Reviewed-by: Tapani Pälli tapani.pa...@intel.com --- src/mesa/program/hash_table.h | 34 ++ 1 file changed, 34 insertions(+) diff --git a/src/mesa/program/hash_table.h b/src/mesa/program/hash_table.h index e95fc49..eed2e55 100644 --- a/src/mesa/program/hash_table.h +++ b/src/mesa/program/hash_table.h @@ -198,6 +198,11 @@ string_to_uint_map_dtor(struct string_to_uint_map *); #ifdef __cplusplus } +struct string_map_iterate_wrapper_closure { + void (*callback)(const char *key, unsigned value, void *closure); + void *closure; +}; + /** * Map from a string (name) to an unsigned integer value * @@ -229,6 +234,24 @@ public: } /** +* Runs a passed callback for the hash +*/ + void iterate(void (*func)(const char *, unsigned, void *), void *closure) + { + struct string_map_iterate_wrapper_closure *wrapper; + + wrapper = (struct string_map_iterate_wrapper_closure *) + malloc(sizeof(struct string_map_iterate_wrapper_closure)); + if (wrapper == NULL) + return; + + wrapper-callback = func; + wrapper-closure = closure; + + hash_table_call_foreach(this-ht, subtract_one_wrapper, wrapper); + } + + /** * Get the value associated with a particular key * * \return @@ -281,6 +304,17 @@ private: free((char *)key); } + static void subtract_one_wrapper(const void *key, void *data, void *closure) + { + struct string_map_iterate_wrapper_closure *wrapper = + (struct string_map_iterate_wrapper_closure *) closure; + unsigned value = (intptr_t) data; + + value -= 1; + + wrapper-callback((const char *) key, value, wrapper-closure); + } + struct hash_table *ht; }; ___ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit
Mesa (master): glsl: Add blob_overwrite_bytes and blob_overwrite_uint32
Module: Mesa Branch: master Commit: ffcad3a54839bd6704b4cac5dfe9f52a4f299dae URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=ffcad3a54839bd6704b4cac5dfe9f52a4f299dae Author: Tapani Pälli tapani.pa...@intel.com Date: Wed Nov 12 23:16:51 2014 -0800 glsl: Add blob_overwrite_bytes and blob_overwrite_uint32 These functions are useful when serializing an unknown number of items to a blob. The caller can first save the current offset, write a placeholder uint32, write out (and count) the items, then use blob_overwrite_uint32 with the saved offset to replace the placeholder value. Then, when deserializing, the reader will first read the count and know how many subsequent items to expect. (I wrote this code after reading a very similar patch written by Tapani when he wrote serialization code for IR. Since I re-used the idea of his code so directly, I've credited him as the author of this code. --Carl) Reviewed-by: Jason Ekstrand jason.ekstr...@intel.com --- src/glsl/blob.c | 23 +++ src/glsl/blob.h | 43 +++ 2 files changed, 66 insertions(+) diff --git a/src/glsl/blob.c b/src/glsl/blob.c index a4003cf..dd4341b 100644 --- a/src/glsl/blob.c +++ b/src/glsl/blob.c @@ -101,6 +101,21 @@ blob_create(void *mem_ctx) } bool +blob_overwrite_bytes(struct blob *blob, + size_t offset, + const void *bytes, + size_t to_write) +{ + /* Detect an attempt to overwrite data out of bounds. */ + if (offset 0 || blob-size - offset to_write) + return false; + + memcpy(blob-data + offset, bytes, to_write); + + return true; +} + +bool blob_write_bytes(struct blob *blob, const void *bytes, size_t to_write) { if (! grow_to_fit(blob, to_write)) @@ -135,6 +150,14 @@ blob_write_uint32(struct blob *blob, uint32_t value) } bool +blob_overwrite_uint32 (struct blob *blob, + size_t offset, + uint32_t value) +{ + return blob_overwrite_bytes(blob, offset, value, sizeof(value)); +} + +bool blob_write_uint64(struct blob *blob, uint64_t value) { align_blob(blob, sizeof(value)); diff --git a/src/glsl/blob.h b/src/glsl/blob.h index af32d22..ec903ec 100644 --- a/src/glsl/blob.h +++ b/src/glsl/blob.h @@ -108,6 +108,24 @@ uint8_t * blob_reserve_bytes (struct blob *blob, size_t to_write); /** + * Overwrite some data previously written to the blob. + * + * Writes data to an existing portion of the blob at an offset of \offset. + * This data range must have previously been written to the blob by one of the + * blob_write_* calls. + * + * For example usage, see blob_overwrite_uint32 + * + * \return True unless the requested offset or offset+to_write lie outside + * the current blob's size. + */ +bool +blob_overwrite_bytes (struct blob *blob, + size_t offset, + const void *bytes, + size_t to_write); + +/** * Add a uint32_t to a blob. * * \note This function will only write to a uint32_t-aligned offset from the @@ -121,6 +139,31 @@ bool blob_write_uint32 (struct blob *blob, uint32_t value); /** + * Overwrite a uint32_t previously written to the blob. + * + * Writes a uint32_t value to an existing portion of the blob at an offset of + * \offset. This data range must have previously been written to the blob by + * one of the blob_write_* calls. + * + * + * The expected usage is something like the following pattern: + * + * size_t offset; + * + * offset = blob-size; + * blob_write_uint32 (blob, 0); // placeholder + * ... various blob write calls, writing N items ... + * blob_overwrite_uint32 (blob, offset, N); + * + * \return True unless the requested position or position+to_write lie outside + * the current blob's size. + */ +bool +blob_overwrite_uint32 (struct blob *blob, + size_t offset, + uint32_t value); + +/** * Add a uint64_t to a blob. * * \note This function will only write to a uint64_t-aligned offset from the ___ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit
Mesa (master): configure: Add copyright and license block to configure.ac
Module: Mesa Branch: master Commit: 670826b431202fa7cceab9ca86fa21747a1be16c URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=670826b431202fa7cceab9ca86fa21747a1be16c Author: Carl Worth cwo...@cworth.org Date: Thu Dec 11 14:33:44 2014 -0800 configure: Add copyright and license block to configure.ac Prior to copying in code from the xserver configure.ac file, it makes sense to have the license of this file clearly marked, (to show that it's licensed identically to the configure.ac file from the xserver repository). And since the text of the license refers to the above copyright notice it also makes sense to have an actual copyright attribution in place. I generated this list of names by looking at the output of: git shortlog -n --format=%aD -- configure.ac (and arbitrarily stopping for contributors with fewer than 15 commits). Then for each name, I looked for existing Copyright attributions in the mesa source tree with the same name, (and using Intel Corporation as the copyright holder where I knew that was appropriate). --- configure.ac | 31 +++ 1 file changed, 31 insertions(+) diff --git a/configure.ac b/configure.ac index c72fe92..e9d73e4 100644 --- a/configure.ac +++ b/configure.ac @@ -1,3 +1,34 @@ +dnl Copyright © 2011-2014 Intel Corporation +dnl Copyright © 2011-2014 Emil Velikov emil.l.veli...@gmail.com +dnl Copyright © 2007-2010 Dan Nicholson +dnl Copyright © 2010-2014 Marek Olšák mar...@gmail.com +dnl Copyright © 2010-2014 Christian König +dnl Copyright © 2012-2014 Tom Stellard tstel...@gmail.com +dnl Copyright © 2009-2012 Jakob Bornecrantz +dnl Copyright © 2009-2014 Jon TURNEY +dnl Copyright © 2011-2012 Benjamin Franzke +dnl Copyright © 2008-2014 David Airlie +dnl Copyright © 2009-2013 Brian Paul +dnl +dnl Permission is hereby granted, free of charge, to any person obtaining a +dnl copy of this software and associated documentation files (the Software), +dnl to deal in the Software without restriction, including without limitation +dnl the rights to use, copy, modify, merge, publish, distribute, sublicense, +dnl and/or sell copies of the Software, and to permit persons to whom the +dnl Software is furnished to do so, subject to the following conditions: +dnl +dnl The above copyright notice and this permission notice (including the next +dnl paragraph) shall be included in all copies or substantial portions of the +dnl Software. +dnl +dnl THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +dnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +dnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +dnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +dnl DEALINGS IN THE SOFTWARE. +dnl dnl Process this file with autoconf to create configure. AC_PREREQ([2.60]) ___ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit
Mesa (master): glsl: Add convenience function get_sampler_instance
Module: Mesa Branch: master Commit: f87ffd5cc32dbfaff0a110fd7a94a92866c95f3b URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=f87ffd5cc32dbfaff0a110fd7a94a92866c95f3b Author: Carl Worth cwo...@cworth.org Date: Wed Oct 22 16:58:26 2014 -0700 glsl: Add convenience function get_sampler_instance This is similar to the existing functions get_instance, get_array_instance, etc. for getting a type singleton. The new get_sampler_instance() function will be used by the upcoming shader cache. Reviewed-by: Ian Romanick ian.d.roman...@intel.com Reviewed-by: Matt Turner matts...@gmail.com --- src/glsl/glsl_types.cpp | 111 +++ src/glsl/glsl_types.h |9 2 files changed, 120 insertions(+) diff --git a/src/glsl/glsl_types.cpp b/src/glsl/glsl_types.cpp index 0d2eb7c..b4223f4 100644 --- a/src/glsl/glsl_types.cpp +++ b/src/glsl/glsl_types.cpp @@ -474,6 +474,117 @@ glsl_type::get_instance(unsigned base_type, unsigned rows, unsigned columns) return error_type; } +const glsl_type * +glsl_type::get_sampler_instance(enum glsl_sampler_dim dim, +bool shadow, +bool array, +glsl_base_type type) +{ + switch (type) { + case GLSL_TYPE_FLOAT: + switch (dim) { + case GLSL_SAMPLER_DIM_1D: + if (shadow) +return (array ? sampler1DArrayShadow_type : sampler1DShadow_type); + else +return (array ? sampler1DArray_type : sampler1D_type); + case GLSL_SAMPLER_DIM_2D: + if (shadow) +return (array ? sampler2DArrayShadow_type : sampler2DShadow_type); + else +return (array ? sampler2DArray_type : sampler2D_type); + case GLSL_SAMPLER_DIM_3D: + if (shadow || array) +return error_type; + else +return sampler3D_type; + case GLSL_SAMPLER_DIM_CUBE: + if (shadow) +return (array ? samplerCubeArrayShadow_type : samplerCubeShadow_type); + else +return (array ? samplerCubeArray_type : samplerCube_type); + case GLSL_SAMPLER_DIM_RECT: + if (array) +return error_type; + if (shadow) +return sampler2DRectShadow_type; + else +return sampler2DRect_type; + case GLSL_SAMPLER_DIM_BUF: + if (shadow || array) +return error_type; + else +return samplerBuffer_type; + case GLSL_SAMPLER_DIM_MS: + if (shadow) +return error_type; + return (array ? sampler2DMSArray_type : sampler2DMS_type); + case GLSL_SAMPLER_DIM_EXTERNAL: + if (shadow || array) +return error_type; + else +return samplerExternalOES_type; + } + case GLSL_TYPE_INT: + if (shadow) + return error_type; + switch (dim) { + case GLSL_SAMPLER_DIM_1D: + return (array ? isampler1DArray_type : isampler1D_type); + case GLSL_SAMPLER_DIM_2D: + return (array ? isampler2DArray_type : isampler2D_type); + case GLSL_SAMPLER_DIM_3D: + if (array) +return error_type; + return isampler3D_type; + case GLSL_SAMPLER_DIM_CUBE: + return (array ? isamplerCubeArray_type : isamplerCube_type); + case GLSL_SAMPLER_DIM_RECT: + if (array) +return error_type; + return isampler2DRect_type; + case GLSL_SAMPLER_DIM_BUF: + if (array) +return error_type; + return isamplerBuffer_type; + case GLSL_SAMPLER_DIM_MS: + return (array ? isampler2DMSArray_type : isampler2DMS_type); + case GLSL_SAMPLER_DIM_EXTERNAL: + return error_type; + } + case GLSL_TYPE_UINT: + if (shadow) + return error_type; + switch (dim) { + case GLSL_SAMPLER_DIM_1D: + return (array ? usampler1DArray_type : usampler1D_type); + case GLSL_SAMPLER_DIM_2D: + return (array ? usampler2DArray_type : usampler2D_type); + case GLSL_SAMPLER_DIM_3D: + if (array) +return error_type; + return usampler3D_type; + case GLSL_SAMPLER_DIM_CUBE: + return (array ? usamplerCubeArray_type : usamplerCube_type); + case GLSL_SAMPLER_DIM_RECT: + if (array) +return error_type; + return usampler2DRect_type; + case GLSL_SAMPLER_DIM_BUF: + if (array) +return error_type; + return usamplerBuffer_type; + case GLSL_SAMPLER_DIM_MS: + return (array ? usampler2DMSArray_type : usampler2DMS_type); + case GLSL_SAMPLER_DIM_EXTERNAL: + return error_type; + } + default: + return error_type; + } + + unreachable(switch statement above should be complete); +} const glsl_type * glsl_type::get_array_instance(const glsl_type *base, unsigned array_size) diff --git a/src/glsl/glsl_types.h b/src/glsl
Mesa (master): build: Rename md5 to checksums as part of .PHONY target
Module: Mesa Branch: master Commit: 7528f6fd178ef10b7fde8e66c57bec38127471fd URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=7528f6fd178ef10b7fde8e66c57bec38127471fd Author: Carl Worth cwo...@cworth.org Date: Tue Aug 26 16:13:14 2014 -0700 build: Rename md5 to checksums as part of .PHONY target In commit 46d03d37bf3a75e86f9f8ab56c6a939d04f23383 I renamed a Makefile target from md5 to checksums, (as we switched from MD5 checksums to SHA-256 checksums, so the more general name is more future proof). But that commit missed one mention of md5 as a dependency of the .PHONY target. Rename that here as well. --- Makefile.am |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index c9aadc8..453e5f6 100644 --- a/Makefile.am +++ b/Makefile.am @@ -102,4 +102,4 @@ checksums: $(ARCHIVES) @-sha256sum $(PACKAGE_NAME).tar.bz2 @-sha256sum $(PACKAGE_NAME).zip -.PHONY: tarballs md5 +.PHONY: tarballs checksums ___ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit
Mesa (master): Eliminate several cases of multiplication in arguments to calloc
Module: Mesa Branch: master Commit: c35f14f36880eb20f5e54480444e343520e9bec5 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=c35f14f36880eb20f5e54480444e343520e9bec5 Author: Carl Worth cwo...@cworth.org Date: Wed Sep 3 14:18:18 2014 -0700 Eliminate several cases of multiplication in arguments to calloc In commit 32f2fd1c5d6088692551c80352b7d6fa35b0cd09, several calls to _mesa_calloc(x) were replaced with calls to calloc(1, x). This is strictly equivalent to what the code was doing previously. But for cases where x involves multiplication, now that we are explicitly using the two-argument calloc, we can do one step better and replace: calloc(1, A * B); with: calloc(A, B); The advantage of the latter is that calloc will detect any overflow that would have resulted from the multiplication and will fail the allocation, (whereas the former would return a small allocation). So this fix can change potentially exploitable buffer overruns into segmentation faults. Reviewed-by: Matt Turner matts...@gmail.com --- src/gallium/drivers/freedreno/a2xx/ir-a2xx.c |2 +- src/gallium/drivers/freedreno/ir3/ir3.c |2 +- src/gallium/drivers/r600/r600_asm.c |2 +- src/mapi/glapi/gen/gl_gentable.py|2 +- src/mesa/drivers/dri/common/utils.c |2 +- src/mesa/drivers/dri/i965/brw_state_cache.c |4 ++-- src/mesa/main/atifragshader.c|8 src/mesa/program/prog_instruction.c |2 +- src/mesa/program/prog_optimize.c |6 +++--- src/mesa/program/prog_parameter.c|2 +- src/mesa/vbo/vbo_exec_array.c|2 +- 11 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/gallium/drivers/freedreno/a2xx/ir-a2xx.c b/src/gallium/drivers/freedreno/a2xx/ir-a2xx.c index 18afba8..cff5a27 100644 --- a/src/gallium/drivers/freedreno/a2xx/ir-a2xx.c +++ b/src/gallium/drivers/freedreno/a2xx/ir-a2xx.c @@ -146,7 +146,7 @@ void * ir2_shader_assemble(struct ir2_shader *shader, struct ir2_shader_info *in goto fail; } - ptr = dwords = calloc(1, 4 * info-sizedwords); + ptr = dwords = calloc(4, info-sizedwords); /* second pass, emit CF program in pairs: */ for (i = 0; i shader-cfs_count; i += 2) { diff --git a/src/gallium/drivers/freedreno/ir3/ir3.c b/src/gallium/drivers/freedreno/ir3/ir3.c index ea2a925..3da10fb 100644 --- a/src/gallium/drivers/freedreno/ir3/ir3.c +++ b/src/gallium/drivers/freedreno/ir3/ir3.c @@ -554,7 +554,7 @@ void * ir3_assemble(struct ir3 *shader, struct ir3_info *info) */ info-sizedwords = 2 * align(shader-instrs_count, 4); - ptr = dwords = calloc(1, 4 * info-sizedwords); + ptr = dwords = calloc(4, info-sizedwords); for (i = 0; i shader-instrs_count; i++) { struct ir3_instruction *instr = shader-instrs[i]; diff --git a/src/gallium/drivers/r600/r600_asm.c b/src/gallium/drivers/r600/r600_asm.c index 4da918c..8aa69b5 100644 --- a/src/gallium/drivers/r600/r600_asm.c +++ b/src/gallium/drivers/r600/r600_asm.c @@ -1590,7 +1590,7 @@ int r600_bytecode_build(struct r600_bytecode *bc) bc-ndw = cf-addr + cf-ndw; } free(bc-bytecode); - bc-bytecode = calloc(1, bc-ndw * 4); + bc-bytecode = calloc(4, bc-ndw); if (bc-bytecode == NULL) return -ENOMEM; LIST_FOR_EACH_ENTRY(cf, bc-cf, list) { diff --git a/src/mapi/glapi/gen/gl_gentable.py b/src/mapi/glapi/gen/gl_gentable.py index 7577b66..ce9af99 100644 --- a/src/mapi/glapi/gen/gl_gentable.py +++ b/src/mapi/glapi/gen/gl_gentable.py @@ -113,7 +113,7 @@ __glapi_gentable_set_remaining_noop(struct _glapi_table *disp) { struct _glapi_table * _glapi_create_table_from_handle(void *handle, const char *symbol_prefix) { -struct _glapi_table *disp = calloc(1, _glapi_get_dispatch_table_size() * sizeof(_glapi_proc)); +struct _glapi_table *disp = calloc(_glapi_get_dispatch_table_size(), sizeof(_glapi_proc)); char symboln[512]; if(!disp) diff --git a/src/mesa/drivers/dri/common/utils.c b/src/mesa/drivers/dri/common/utils.c index e0b3db8..f2e63c0 100644 --- a/src/mesa/drivers/dri/common/utils.c +++ b/src/mesa/drivers/dri/common/utils.c @@ -238,7 +238,7 @@ driCreateConfigs(mesa_format format, is_srgb = _mesa_get_format_color_encoding(format) == GL_SRGB; num_modes = num_depth_stencil_bits * num_db_modes * num_accum_bits * num_msaa_modes; - configs = calloc(1, (num_modes + 1) * sizeof *configs); + configs = calloc(num_modes + 1, sizeof *configs); if (configs == NULL) return NULL; diff --git a/src/mesa/drivers/dri/i965/brw_state_cache.c b/src/mesa/drivers/dri/i965/brw_state_cache.c index 19079c8..bb5047e 100644 --- a/src/mesa/drivers/dri/i965/brw_state_cache.c +++ b/src/mesa/drivers/dri/i965/brw_state_cache.c @@ -115,7 +115,7 @@ rehash(struct brw_cache *cache) GLuint size, i
Mesa (master): egl: Restrict multiplication in calloc arguments to use compile-time constants
Module: Mesa Branch: master Commit: ecc89e4e42c0eda41de5a37d9d0614d0846e3a3e URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=ecc89e4e42c0eda41de5a37d9d0614d0846e3a3e Author: Carl Worth cwo...@cworth.org Date: Wed Sep 3 14:33:18 2014 -0700 egl: Restrict multiplication in calloc arguments to use compile-time constants As explained in the previous commit, we want to avoid the possibility of integer-multiplication overflow while allocating buffers. In these two cases, the final allocation size is the product of three values: one variable and two that are fixed constants at compile time. In this commit, we move the explicit multiplication to involve only the compile-time constants, preventing any overflow from that multiplication, (and allowing calloc to catch any potential overflow from the remainining implicit multiplication). Reviewed-by: Matt Turner matts...@gmail.com --- src/egl/drivers/dri2/platform_drm.c |2 +- src/egl/drivers/dri2/platform_wayland.c |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/egl/drivers/dri2/platform_drm.c b/src/egl/drivers/dri2/platform_drm.c index e272beb..70bd7d4 100644 --- a/src/egl/drivers/dri2/platform_drm.c +++ b/src/egl/drivers/dri2/platform_drm.c @@ -352,7 +352,7 @@ dri2_drm_get_buffers(__DRIdrawable * driDrawable, const unsigned int format = 32; int i; - attachments_with_format = calloc(count * 2, sizeof(unsigned int)); + attachments_with_format = calloc(count, 2 * sizeof(unsigned int)); if (!attachments_with_format) { *out_count = 0; return NULL; diff --git a/src/egl/drivers/dri2/platform_wayland.c b/src/egl/drivers/dri2/platform_wayland.c index 537d26e..59b2792 100644 --- a/src/egl/drivers/dri2/platform_wayland.c +++ b/src/egl/drivers/dri2/platform_wayland.c @@ -468,7 +468,7 @@ dri2_wl_get_buffers(__DRIdrawable * driDrawable, const unsigned int format = 32; int i; - attachments_with_format = calloc(count * 2, sizeof(unsigned int)); + attachments_with_format = calloc(count, 2 * sizeof(unsigned int)); if (!attachments_with_format) { *out_count = 0; return NULL; ___ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit
Mesa (master): glcpp: Don' t use alternation in the lookahead for empty pragmas.
Module: Mesa Branch: master Commit: 23163df24cf96107ee8ccb372db20f49e9d88948 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=23163df24cf96107ee8ccb372db20f49e9d88948 Author: Carl Worth cwo...@cworth.org Date: Mon Aug 18 11:36:12 2014 -0700 glcpp: Don't use alternation in the lookahead for empty pragmas. We've found that there's a buffer overrun bug in flex that's triggered by using alternation in a lookahead pattern. Fortunately, we don't need to match the exact {NEWLINE} expression to detect an empty pragma. It suffices to verify that there are no non-space characters before any newline character. So we can use a simple [\r\n] to get the desired behavior while avoiding the flex bug. Fixes the regression of piglit's 17000-consecutive-chars-identifier test, (which has been crashing since commit 04e40fd337a244ee77ef9553985e9398ff0344af ). Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=82472 Signed-off-by: Carl Worth cwo...@cworth.org Reviewed-by: Kenneth Graunke kenn...@whitecape.org CC: mesa-sta...@lists.freedesktop.org --- src/glsl/glcpp/glcpp-lex.l | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/glsl/glcpp/glcpp-lex.l b/src/glsl/glcpp/glcpp-lex.l index 98d500e..fa9aa50 100644 --- a/src/glsl/glcpp/glcpp-lex.l +++ b/src/glsl/glcpp/glcpp-lex.l @@ -289,8 +289,14 @@ HEXADECIMAL_INTEGER0[xX][0-9a-fA-F]+[uU]? } /* Swallow empty #pragma directives, (to avoid confusing the -* downstream compiler). */ -HASHpragma{HSPACE}*/{NEWLINE} { +* downstream compiler). +* +* Note: We use a simple regular expression for the lookahead +* here. Specifically, we cannot use the complete {NEWLINE} expression +* since it uses alternation and we've found that there's a flex bug +* where using alternation in the lookahead portion of a pattern +* triggers a buffer overrun. */ +HASHpragma{HSPACE}*/[\r\n] { BEGIN INITIAL; } ___ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit
Mesa (10.3): r600g: Fix flat/smooth shade state toggle
Module: Mesa Branch: 10.3 Commit: 0fb221065eff3788e9bf607a5cf39bd0409740be URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=0fb221065eff3788e9bf607a5cf39bd0409740be Author: Glenn Kennard glenn.kenn...@gmail.com Date: Wed Aug 20 21:55:37 2014 +0200 r600g: Fix flat/smooth shade state toggle If only the flat/smooth shade state changed between two render calls the prior code would miss updating the hardware state. Also add check for sprite coord, potentially same type of issue otherwise for it. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=81967 Signed-off-by: Glenn Kennard glenn.kenn...@gmail.com Signed-off-by: Marek Olšák marek.ol...@amd.com --- src/gallium/drivers/r600/r600_state_common.c |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/r600/r600_state_common.c b/src/gallium/drivers/r600/r600_state_common.c index 7594d0e..028d800 100644 --- a/src/gallium/drivers/r600/r600_state_common.c +++ b/src/gallium/drivers/r600/r600_state_common.c @@ -1227,7 +1227,9 @@ static bool r600_update_derived_state(struct r600_context *rctx) if (unlikely(!rctx-ps_shader-current)) return false; - if (unlikely(ps_dirty || rctx-pixel_shader.shader != rctx-ps_shader-current)) { + if (unlikely(ps_dirty || rctx-pixel_shader.shader != rctx-ps_shader-current || + rctx-rasterizer-sprite_coord_enable != rctx-ps_shader-current-sprite_coord_enable || + rctx-rasterizer-flatshade != rctx-ps_shader-current-flatshade)) { if (rctx-cb_misc_state.nr_ps_color_outputs != rctx-ps_shader-current-nr_ps_color_outputs) { rctx-cb_misc_state.nr_ps_color_outputs = rctx-ps_shader-current-nr_ps_color_outputs; ___ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit
Mesa (refs/tags/10.3-branchpoint): r600g: Fix flat/ smooth shade state toggle
Module: Mesa Branch: refs/tags/10.3-branchpoint Commit: 0fb221065eff3788e9bf607a5cf39bd0409740be URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=0fb221065eff3788e9bf607a5cf39bd0409740be Author: Glenn Kennard glenn.kenn...@gmail.com Date: Wed Aug 20 21:55:37 2014 +0200 r600g: Fix flat/smooth shade state toggle If only the flat/smooth shade state changed between two render calls the prior code would miss updating the hardware state. Also add check for sprite coord, potentially same type of issue otherwise for it. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=81967 Signed-off-by: Glenn Kennard glenn.kenn...@gmail.com Signed-off-by: Marek Olšák marek.ol...@amd.com --- src/gallium/drivers/r600/r600_state_common.c |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/r600/r600_state_common.c b/src/gallium/drivers/r600/r600_state_common.c index 7594d0e..028d800 100644 --- a/src/gallium/drivers/r600/r600_state_common.c +++ b/src/gallium/drivers/r600/r600_state_common.c @@ -1227,7 +1227,9 @@ static bool r600_update_derived_state(struct r600_context *rctx) if (unlikely(!rctx-ps_shader-current)) return false; - if (unlikely(ps_dirty || rctx-pixel_shader.shader != rctx-ps_shader-current)) { + if (unlikely(ps_dirty || rctx-pixel_shader.shader != rctx-ps_shader-current || + rctx-rasterizer-sprite_coord_enable != rctx-ps_shader-current-sprite_coord_enable || + rctx-rasterizer-flatshade != rctx-ps_shader-current-flatshade)) { if (rctx-cb_misc_state.nr_ps_color_outputs != rctx-ps_shader-current-nr_ps_color_outputs) { rctx-cb_misc_state.nr_ps_color_outputs = rctx-ps_shader-current-nr_ps_color_outputs; ___ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit
Mesa (10.3): Increment version to 10.3.0-rc1
Module: Mesa Branch: 10.3 Commit: 04c3c0368252db837e054ee1e995f4940381 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=04c3c0368252db837e054ee1e995f4940381 Author: Carl Worth cwo...@cworth.org Date: Thu Aug 21 08:36:46 2014 -0700 Increment version to 10.3.0-rc1 --- VERSION |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 75a04c3..9cad0c5 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -10.3.0-devel +10.3.0-rc1 ___ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit
Mesa (master): Increment version to 10.4.0-devel
Module: Mesa Branch: master Commit: ea565108ae452611605834c9fff220952ad927fb URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=ea565108ae452611605834c9fff220952ad927fb Author: Carl Worth cwo...@cworth.org Date: Thu Aug 21 08:37:26 2014 -0700 Increment version to 10.4.0-devel Now that the 10.3 branch has been created --- VERSION |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 75a04c3..d43f97a 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -10.3.0-devel +10.4.0-devel ___ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit
Mesa: tag mesa-10.3-rc1: Mesa 10.3-rc1 release candidate
Module: Mesa Branch: refs/tags/mesa-10.3-rc1 Tag:0dfeea4e3efcaa430acab9bfe42926b7c6869bcf URL: http://cgit.freedesktop.org/mesa/mesa/tag/?id=0dfeea4e3efcaa430acab9bfe42926b7c6869bcf Tagger: Carl Worth cwo...@cworth.org Date: Thu Aug 21 08:42:17 2014 -0700 Mesa 10.3-rc1 release candidate ___ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit
Mesa (master): Makefile: Switch from md5sums to sha256sums
Module: Mesa Branch: master Commit: 46d03d37bf3a75e86f9f8ab56c6a939d04f23383 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=46d03d37bf3a75e86f9f8ab56c6a939d04f23383 Author: Carl Worth cwo...@cworth.org Date: Thu Aug 21 09:03:02 2014 -0700 Makefile: Switch from md5sums to sha256sums We switched to these several stable releases ago, (since the MD5 algorithm has been broken for some time), but only now did I get around to fixing this in the Makefile rather than just performing this step manually. CC: 10.2 10.3 mesa-sta...@lists.freedesktop.org --- Makefile.am | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Makefile.am b/Makefile.am index 4780510..d2916da 100644 --- a/Makefile.am +++ b/Makefile.am @@ -71,7 +71,7 @@ ARCHIVES = $(PACKAGE_NAME).tar.gz \ $(PACKAGE_NAME).tar.bz2 \ $(PACKAGE_NAME).zip -tarballs: md5 +tarballs: checksums rm -f ../$(PACKAGE_DIR) $(PACKAGE_NAME).tar manifest.txt: .git @@ -98,9 +98,9 @@ $(PACKAGE_NAME).zip: parsers ../$(PACKAGE_DIR) manifest.txt zip -q -@ $(PACKAGE_NAME).zip $(PACKAGE_DIR)/manifest.txt ; \ mv $(PACKAGE_NAME).zip $(PACKAGE_DIR) -md5: $(ARCHIVES) - @-md5sum $(PACKAGE_NAME).tar.gz - @-md5sum $(PACKAGE_NAME).tar.bz2 - @-md5sum $(PACKAGE_NAME).zip +checksums: $(ARCHIVES) + @-sha256sum $(PACKAGE_NAME).tar.gz + @-sha256sum $(PACKAGE_NAME).tar.bz2 + @-sha256sum $(PACKAGE_NAME).zip .PHONY: tarballs md5 ___ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit
Mesa (master): docs: Update instructions for creating a release
Module: Mesa Branch: master Commit: 619505ac7c862895f63a6074540376355059a519 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=619505ac7c862895f63a6074540376355059a519 Author: Carl Worth cwo...@cworth.org Date: Thu Aug 21 10:44:35 2014 -0700 docs: Update instructions for creating a release This captures all of the steps I have been following in making releases for the past year or so. This way, the instructions should be sound for anyone who would like to take over the release process going forward. --- docs/devinfo.html | 210 + 1 file changed, 180 insertions(+), 30 deletions(-) diff --git a/docs/devinfo.html b/docs/devinfo.html index e173b55..8d20eea 100644 --- a/docs/devinfo.html +++ b/docs/devinfo.html @@ -315,64 +315,205 @@ These are the instructions for making a new Mesa release. h3Get latest source files/h3 p Use git to get the latest Mesa files from the git repository, from whatever -branch is relevant. +branch is relevant. This document uses the convention X.Y.Z for the release +being created, which should be created from a branch named X.Y. /p +h3Perform basic testing/h3 +p +The release manager should, at the very least, test the code by compiling it, +installing it, and running the latest piglit to ensure that no piglit tests +have regressed since the previous release. +/p + +p +The release manager should do this testing with at least one hardware driver, +(say, whatever is contained in the local development machine), as well as on +both Gallium and non-Gallium software drivers. The software testing can be +performed by running piglit with the following environment-variable set: +/p + +pre +LIBGL_ALWAYS_SOFTWARE=1 +/pre + +And Gallium vs. non-Gallium software drivers can be obtained by using the +following configure flags on separate builds: + +pre +--with-dri-drivers=swrast +--with-gallium-drivers=swrast +/pre + +p +Note: If both options are given in one build, both swrast_dri.so drivers will +be compiled, but only one will be installed. The following command can be used +to ensure the correct driver is being tested: +/p -h3Verify and update version info in VERSION/h3 +pre +LIBGL_ALWAYS_SOFTWARE=1 glxinfo | grep renderer string +/pre + +If any regressions are found in this testing with piglit, stop here, and do +not perform a release until regressions are fixed. + +h3Update version in file VERSION/h3 p -Create a docs/relnotes/x.y.z.html file. -The bin/bugzilla_mesa.sh and bin/shortlog_mesa.sh scripts can be used to -create the HTML-formatted lists of bugfixes and changes to include in the file. -Link the new docs/relnotes/x.y.z.html file into the main a href=relnotes.htmlrelnotes.html/a file. +Increment the version contained in the file VERSION at Mesa's top-level, then +commit this change. /p +h3Create release notes for the new release/h3 + p -Update a href=index.htmldocs/index.html/a. +Create a new file docs/relnotes/X.Y.Z.html, (follow the style of the previous +release notes). Note that the sha256sums section of the release notes should +be empty at this point. /p p -Tag the files with the release name (in the form bmesa-x.y/b) -with: codegit tag -s mesa-x.y -m Mesa x.y Release/code -Then: codegit push origin mesa-x.y/code +Two scripts are available to help generate portions of the release notes: + +pre + ./bin/bugzilla_mesa.sh + ./bin/shortlog_mesa.sh +/pre + +p +The first script identifies commits that reference bugzilla bugs and obtains +the descriptions of those bugs from bugzilla. The second script generates a +log of all commits. In both cases, HTML-formatted lists are printed to stdout +to be included in the release notes. /p +p +Commit these changes +/p -h3Make the tarballs/h3 +h3Make the release archives, signatures, and the release tag/h3 p -Make the distribution files. From inside the Mesa directory: +From inside the Mesa directory: pre ./autogen.sh - make tarballs + make -j1 tarballs /pre p -After the tarballs are created, the md5 checksums for the files will -be computed. -Add them to the docs/relnotes/x.y.html file. +After the tarballs are created, the sha256 checksums for the files will +be computed and printed. These will be used in a step below. /p p -Copy the distribution files to a temporary directory, unpack them, -compile everything, and run some demos to be sure everything works. +It's important at this point to also verify that the constructed tar file +actually builds: /p -h3Update the website and announce the release/h3 +pre + tar xjf MesaLib-X.Y.Z.tar.bz2 + cd Mesa-X.Y.Z + ./configure --enable-gallium-llvm + make -j6 + make install +/pre + p -Make a new directory for the release on annarchy.freedesktop.org with: -br -code -mkdir /srv/ftp.freedesktop.org/pub/mesa/x.y -/code +Some touch testing should also be performed at this point, (run glxgears or +more involved OpenGL programs against
Mesa (master): glcpp: Fix glcpp-test-cr-lf make check test for Mac OS X
Module: Mesa Branch: master Commit: f90b7e0f2bee56af22edeebfea292ab960ce0628 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=f90b7e0f2bee56af22edeebfea292ab960ce0628 Author: Carl Worth cwo...@cworth.org Date: Mon Aug 18 16:26:34 2014 -0700 glcpp: Fix glcpp-test-cr-lf make check test for Mac OS X There were two problems with the way this script used sed on OS X: 1. The OS X sed doesn't interpret \r in a replacement list as a carriage-return character, (instead it was inserting a literal 'r' character). We fix this by putting an actual ^M character into the source of the script, (rather than a two-character escape sequence hoping for sed to do the right thing). 2. When generating the test files with LF-CR (\n\r) newlines, the OS X sed was adding an undesired final newline (\n) at the end of the file. We avoid this by first using sed to add the ^M before the newlines, then using tr to swap the \r and \n characters. This way, sed never sees any lines ending with anything but \n, so it doesn't get confused and doesn't add any bogus extra newlines. Tested-by: Vinson Lee v...@freedesktop.org Vinson's testing confirmed that this patch fixes FreeBSD as well. --- src/glsl/glcpp/tests/glcpp-test-cr-lf |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/glsl/glcpp/tests/glcpp-test-cr-lf b/src/glsl/glcpp/tests/glcpp-test-cr-lf index edaa29d..7988c05 100755 --- a/src/glsl/glcpp/tests/glcpp-test-cr-lf +++ b/src/glsl/glcpp/tests/glcpp-test-cr-lf @@ -111,7 +111,7 @@ rm -rf ./subtest-cr-lf mkdir subtest-cr-lf for file in $testdir/*.c; do base=$(basename $file) -sed -e 's/$/\r/' $file subtest-cr-lf/$base +sed -e 's/$/ /' $file subtest-cr-lf/$base cp subtest-lf/$base.out subtest-cr-lf/$base.expected done @@ -124,7 +124,7 @@ rm -rf ./subtest-lf-cr mkdir subtest-lf-cr for file in $testdir/*.c; do base=$(basename $file) -tr \n \r $file | sed -e 's/\r/\n\r/g' subtest-lf-cr/$base +sed -e 's/$/ /' $file | tr \n\r \r\n subtest-lf-cr/$base cp subtest-lf/$base.out subtest-lf-cr/$base.expected done ___ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit
Mesa (master): glcpp: Use printf instead of echo -n in glcpp-test
Module: Mesa Branch: master Commit: c09a8b0e3bb93906f59fee565eb22d37b91fbfaf URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=c09a8b0e3bb93906f59fee565eb22d37b91fbfaf Author: Carl Worth cwo...@cworth.org Date: Mon Aug 18 16:26:09 2014 -0700 glcpp: Use printf instead of echo -n in glcpp-test I noticed that with /bin/sh on Mac OS X, echo -n does not work as desired, (it actually prints -n rather than suppressing the final newline). There is a /bin/echo that could be used (it actually works) instead of the builtin echo. But I decided it's more robust to just use printf rather than hardcoding /bin/echo into the script. --- src/glsl/glcpp/tests/glcpp-test |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/glsl/glcpp/tests/glcpp-test b/src/glsl/glcpp/tests/glcpp-test index 640f576..ea69edf 100755 --- a/src/glsl/glcpp/tests/glcpp-test +++ b/src/glsl/glcpp/tests/glcpp-test @@ -59,7 +59,7 @@ clean=0 echo == Testing for correctness == for test in $testdir/*.c; do -echo -n Testing $test... +printf Testing $test... $glcpp $(test_specific_args $test) $test $test.out 21 total=$((total+1)) if cmp $test.expected $test.out /dev/null 21; then @@ -78,7 +78,7 @@ echo if [ $do_valgrind = yes ]; then echo == Testing for valgrind cleanliness == for test in $testdir/*.c; do - echo -n Testing $test with valgrind... + printf Testing $test with valgrind... valgrind --error-exitcode=31 --log-file=$test.valgrind-errors $glcpp $(test_specific_args $test) $test /dev/null 21 if [ $? = 31 ]; then echo ERRORS ___ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit
Mesa (10.2): Update VERSION to 10.2.6
Module: Mesa Branch: 10.2 Commit: efc7aa3187238fd0dde62ea6f4b8fd803f8afd72 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=efc7aa3187238fd0dde62ea6f4b8fd803f8afd72 Author: Carl Worth cwo...@cworth.org Date: Tue Aug 19 13:58:32 2014 -0700 Update VERSION to 10.2.6 In preparation for the 10.2.6 release. --- VERSION |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 9b36ab7..9a6a89b 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -10.2.5 +10.2.6 ___ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit
Mesa (10.2): docs: Add sha256 sums for the 10.2.6 release
Module: Mesa Branch: 10.2 Commit: 8b056fc48613b4cd1a32c29cdaffcf363860a62b URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=8b056fc48613b4cd1a32c29cdaffcf363860a62b Author: Carl Worth cwo...@cworth.org Date: Tue Aug 19 15:17:50 2014 -0700 docs: Add sha256 sums for the 10.2.6 release --- docs/relnotes/10.2.6.html |3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/relnotes/10.2.6.html b/docs/relnotes/10.2.6.html index d592618..73c1416 100644 --- a/docs/relnotes/10.2.6.html +++ b/docs/relnotes/10.2.6.html @@ -30,6 +30,9 @@ because compatibility contexts are not supported. h2SHA256 checksums/h2 pre +193314d2adba98e43697d726739ac46b4299aae324fa1821aa226890c28ac806 MesaLib-10.2.6.tar.bz2 +f7a45a5977b485eb95ac024205c584a0c112fe3951c2313c797579bb16a7a448 MesaLib-10.2.6.tar.gz +6d086d6fcda8f317adfaaae40011decf2f2e2dc80819c4a7a77c76f73512e8d8 MesaLib-10.2.6.zip /pre h2New features/h2 ___ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit
Mesa (10.2): Add release notes for the 10.2.6 release
Module: Mesa Branch: 10.2 Commit: 346dda24bf3d8268edc82a569c0c482dac1bf93c URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=346dda24bf3d8268edc82a569c0c482dac1bf93c Author: Carl Worth cwo...@cworth.org Date: Tue Aug 19 14:01:02 2014 -0700 Add release notes for the 10.2.6 release Listing bugs fixed and changes made. --- docs/relnotes/10.2.6.html | 115 + 1 file changed, 115 insertions(+) diff --git a/docs/relnotes/10.2.6.html b/docs/relnotes/10.2.6.html new file mode 100644 index 000..d592618 --- /dev/null +++ b/docs/relnotes/10.2.6.html @@ -0,0 +1,115 @@ +!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN http://www.w3.org/TR/html4/loose.dtd; +html lang=en +head + meta http-equiv=content-type content=text/html; charset=utf-8 + titleMesa Release Notes/title + link rel=stylesheet type=text/css href=../mesa.css +/head +body + +div class=header + h1The Mesa 3D Graphics Library/h1 +/div + +iframe src=../contents.html/iframe +div class=content + +h1Mesa 10.2.6 Release Notes / August 19, 2014/h1 + +p +Mesa 10.2.6 is a bug fix release which fixes bugs found since the 10.2.5 release. +/p +p +Mesa 10.2.6 implements the OpenGL 3.3 API, but the version reported by +glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) / +glGetIntegerv(GL_MINOR_VERSION) depends on the particular driver being used. +Some drivers don't support all the features required in OpenGL 3.3. OpenGL +3.3 is strongonly/strong available if requested at context creation +because compatibility contexts are not supported. +/p + +h2SHA256 checksums/h2 +pre +/pre + +h2New features/h2 +pNone/p + +h2Bug fixes/h2 + +pThis list is likely incomplete./p + +ul + +lia href=https://bugs.freedesktop.org/show_bug.cgi?id=81450;Bug 81450/a - [BDW]Piglit spec_glsl-1.30_execution_tex-miplevel-selection_textureGrad_1DArray cases intel_do_flush_locked failed/li + +/ul + +h2Changes/h2 + +pAnuj Phogat (15):/p +ul + limesa: Fix error condition for valid texture targets in glTexStorage* functions/li + limesa: Turn target_can_be_compressed() in to a utility function/li + limesa: Add error condition for using compressed internalformat in glTexStorage3D()/li + limesa: Fix condition for using compressed internalformat in glCompressedTexImage3D()/li + limesa: Add utility function _mesa_is_enum_format_snorm()/li + limesa: Don't allow snorm internal formats in glCopyTexImage*() in GLES3/li + limesa: Add a helper function _mesa_is_enum_format_unsized()/li + limesa: Add a gles3 error condition for sized internalformat in glCopyTexImage*()/li + limesa: Add gles3 error condition for GL_RGBA10_A2 buffer format in glCopyTexImage*()/li + limesa: Add utility function _mesa_is_enum_format_unorm()/li + limesa: Add gles3 condition for normalized internal formats in glCopyTexImage*()/li + limesa: Allow GL_TEXTURE_CUBE_MAP target with compressed internal formats/li + limeta: Use _mesa_get_format_bits() to get the GL_RED_BITS/li + liegl: Fix OpenGL ES version checks in _eglParseContextAttribList()/li + limeta: Fix datatype computation in get_temp_image_type()/li +/ul + +pBrian Paul (1):/p +ul + limesa: fix assertion in _mesa_drawbuffers()/li +/ul + +pCarl Worth (2):/p +ul + lidocs: Add sha256 sums to the 10.2.5 release notes/li + liUpdate VERSION to 10.2.6/li +/ul + +pIlia Mirkin (1):/p +ul + limesa/st: only convert AND(a, NOT(b)) into MAD when not using native integers/li +/ul + +pJordan Justen (1):/p +ul + lii965/miptree: Layout 1D Array as 2D Array with height of 1/li +/ul + +pMaarten Lankhorst (1):/p +ul + liconfigure.ac: Do not require llvm on x32/li +/ul + +pMarek Olšák (4):/p +ul + list/mesa: fix blit-based partial TexSubImage for 1D arrays/li + liradeon,r200: fix buffer validation after CS flush/li + liradeonsi: fix a hang with instancing in Unigine Heaven/Valley on Hawaii/li + liradeonsi: fix CMASK and HTILE allocation on Tahiti/li +/ul + +pPali Rohár (1):/p +ul + liconfigure: check for dladdr via AC_CHECK_FUNC/AC_CHECK_LIB/li +/ul + +pRoland Scheidegger (1):/p +ul + ligallivm: fix up out-of-bounds level when using conformant out-of-bound behavior/li +/ul + +/div +/body +/html ___ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit
Mesa: tag mesa-10.2.6: Mesa 10.2.6 release
Module: Mesa Branch: refs/tags/mesa-10.2.6 Tag:1d329590143b4236e8c706b80b6551502f5cb780 URL: http://cgit.freedesktop.org/mesa/mesa/tag/?id=1d329590143b4236e8c706b80b6551502f5cb780 Tagger: Carl Worth cwo...@cworth.org Date: Tue Aug 19 15:17:13 2014 -0700 Mesa 10.2.6 release ___ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit
Mesa (master): docs: Import 10.2.6 release notes, add news item.
Module: Mesa Branch: master Commit: 8791cfeddeb13c31bce62c7a472712cb05d14aec URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=8791cfeddeb13c31bce62c7a472712cb05d14aec Author: Carl Worth cwo...@cworth.org Date: Tue Aug 19 15:21:09 2014 -0700 docs: Import 10.2.6 release notes, add news item. --- docs/index.html |6 +++ docs/relnotes.html|1 + docs/relnotes/10.2.6.html | 118 + 3 files changed, 125 insertions(+) diff --git a/docs/index.html b/docs/index.html index 584bc4e..5fb5567 100644 --- a/docs/index.html +++ b/docs/index.html @@ -16,6 +16,12 @@ h1News/h1 +h2August 19, 2014/h2 +p +a href=relnotes/10.2.6.htmlMesa 10.2.6/a is released. +This is a bug-fix release. +/p + h2August 2, 2014/h2 p a href=relnotes/10.2.5.htmlMesa 10.2.5/a is released. diff --git a/docs/relnotes.html b/docs/relnotes.html index c7e0983..b84f498 100644 --- a/docs/relnotes.html +++ b/docs/relnotes.html @@ -21,6 +21,7 @@ The release notes summarize what's new or changed in each Mesa release. /p ul +lia href=relnotes/10.2.6.html10.2.6 release notes/a lia href=relnotes/10.2.5.html10.2.5 release notes/a lia href=relnotes/10.2.4.html10.2.4 release notes/a lia href=relnotes/10.2.3.html10.2.3 release notes/a diff --git a/docs/relnotes/10.2.6.html b/docs/relnotes/10.2.6.html new file mode 100644 index 000..73c1416 --- /dev/null +++ b/docs/relnotes/10.2.6.html @@ -0,0 +1,118 @@ +!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN http://www.w3.org/TR/html4/loose.dtd; +html lang=en +head + meta http-equiv=content-type content=text/html; charset=utf-8 + titleMesa Release Notes/title + link rel=stylesheet type=text/css href=../mesa.css +/head +body + +div class=header + h1The Mesa 3D Graphics Library/h1 +/div + +iframe src=../contents.html/iframe +div class=content + +h1Mesa 10.2.6 Release Notes / August 19, 2014/h1 + +p +Mesa 10.2.6 is a bug fix release which fixes bugs found since the 10.2.5 release. +/p +p +Mesa 10.2.6 implements the OpenGL 3.3 API, but the version reported by +glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) / +glGetIntegerv(GL_MINOR_VERSION) depends on the particular driver being used. +Some drivers don't support all the features required in OpenGL 3.3. OpenGL +3.3 is strongonly/strong available if requested at context creation +because compatibility contexts are not supported. +/p + +h2SHA256 checksums/h2 +pre +193314d2adba98e43697d726739ac46b4299aae324fa1821aa226890c28ac806 MesaLib-10.2.6.tar.bz2 +f7a45a5977b485eb95ac024205c584a0c112fe3951c2313c797579bb16a7a448 MesaLib-10.2.6.tar.gz +6d086d6fcda8f317adfaaae40011decf2f2e2dc80819c4a7a77c76f73512e8d8 MesaLib-10.2.6.zip +/pre + +h2New features/h2 +pNone/p + +h2Bug fixes/h2 + +pThis list is likely incomplete./p + +ul + +lia href=https://bugs.freedesktop.org/show_bug.cgi?id=81450;Bug 81450/a - [BDW]Piglit spec_glsl-1.30_execution_tex-miplevel-selection_textureGrad_1DArray cases intel_do_flush_locked failed/li + +/ul + +h2Changes/h2 + +pAnuj Phogat (15):/p +ul + limesa: Fix error condition for valid texture targets in glTexStorage* functions/li + limesa: Turn target_can_be_compressed() in to a utility function/li + limesa: Add error condition for using compressed internalformat in glTexStorage3D()/li + limesa: Fix condition for using compressed internalformat in glCompressedTexImage3D()/li + limesa: Add utility function _mesa_is_enum_format_snorm()/li + limesa: Don't allow snorm internal formats in glCopyTexImage*() in GLES3/li + limesa: Add a helper function _mesa_is_enum_format_unsized()/li + limesa: Add a gles3 error condition for sized internalformat in glCopyTexImage*()/li + limesa: Add gles3 error condition for GL_RGBA10_A2 buffer format in glCopyTexImage*()/li + limesa: Add utility function _mesa_is_enum_format_unorm()/li + limesa: Add gles3 condition for normalized internal formats in glCopyTexImage*()/li + limesa: Allow GL_TEXTURE_CUBE_MAP target with compressed internal formats/li + limeta: Use _mesa_get_format_bits() to get the GL_RED_BITS/li + liegl: Fix OpenGL ES version checks in _eglParseContextAttribList()/li + limeta: Fix datatype computation in get_temp_image_type()/li +/ul + +pBrian Paul (1):/p +ul + limesa: fix assertion in _mesa_drawbuffers()/li +/ul + +pCarl Worth (2):/p +ul + lidocs: Add sha256 sums to the 10.2.5 release notes/li + liUpdate VERSION to 10.2.6/li +/ul + +pIlia Mirkin (1):/p +ul + limesa/st: only convert AND(a, NOT(b)) into MAD when not using native integers/li +/ul + +pJordan Justen (1):/p +ul + lii965/miptree: Layout 1D Array as 2D Array with height of 1/li +/ul + +pMaarten Lankhorst (1):/p +ul + liconfigure.ac: Do not require llvm on x32/li +/ul + +pMarek Olšák (4):/p +ul + list/mesa: fix blit-based partial TexSubImage for 1D arrays/li + liradeon,r200: fix buffer validation after CS flush/li + liradeonsi: fix a hang with instancing in Unigine Heaven/Valley on Hawaii
Mesa (10.2): mesa: Handle uninitialized textures like other textures in get_tex_level_parameter_image
Module: Mesa Branch: 10.2 Commit: d82ca4e2b2bd5de93179d29f484bba7e97bcd985 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=d82ca4e2b2bd5de93179d29f484bba7e97bcd985 Author: Ian Romanick ian.d.roman...@intel.com Date: Tue Jun 17 14:58:14 2014 -0700 mesa: Handle uninitialized textures like other textures in get_tex_level_parameter_image Instead of catching the special case early, handle it by constructing a fake gl_texture_image that will cause the values required by the OpenGL 4.0 spec to be returned. Previously, calling glGenTextures(1, t); glBindTexture(GL_TEXTURE_2D, t); glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, 0xDEADBEEF, value); would not generate an error. Signed-off-by: Ian Romanick ian.d.roman...@intel.com Reviewed-by: Brian Paul bri...@vmware.com Suggested-by: Brian Paul bri...@vmware.com Cc: 10.2 mesa-sta...@lists.freedesktop.org Cc: Anuj Phogat anuj.pho...@gmail.com (cherry picked from commit ee58c71a65bb5b769a03e4b25bd13c57a6b742d8) --- src/mesa/main/texparam.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/mesa/main/texparam.c b/src/mesa/main/texparam.c index 3a0c57f..30dd0b9 100644 --- a/src/mesa/main/texparam.c +++ b/src/mesa/main/texparam.c @@ -1051,6 +1051,7 @@ get_tex_level_parameter_image(struct gl_context *ctx, GLenum pname, GLint *params) { const struct gl_texture_image *img = NULL; + struct gl_texture_image dummy_image; mesa_format texFormat; img = _mesa_select_tex_image(ctx, texObj, target, level); @@ -1062,12 +1063,12 @@ get_tex_level_parameter_image(struct gl_context *ctx, * instead of 1. TEXTURE_COMPONENTS is deprecated; always * use TEXTURE_INTERNAL_FORMAT. */ + memset(dummy_image, 0, sizeof(dummy_image)); + dummy_image.TexFormat = MESA_FORMAT_NONE; + dummy_image.InternalFormat = GL_RGBA; + dummy_image._BaseFormat = GL_NONE; - if (pname == GL_TEXTURE_INTERNAL_FORMAT) - *params = GL_RGBA; - else - *params = 0; - return; + img = dummy_image; } texFormat = img-TexFormat; ___ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit
Mesa (10.2): 25 new commits
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=5532cf9d7e6844191b97730da5fa0b4849998c6b Author: Brian Paul bri...@vmware.com Date: Fri Aug 8 15:01:50 2014 -0600 mesa: fix assertion in _mesa_drawbuffers() Fixes failed assertion when _mesa_update_draw_buffers() was called with GL_DRAW_BUFFER == GL_FRONT_AND_BACK. The piglit gl30basic hit this. Cc: 10.2 mesa-sta...@lists.freedesktop.org Reviewed-by: Ian Romanick ian.d.roman...@intel.com (cherry picked from commit 39b40ad144f5f587e505b45048e33a03641ba857) URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=bca8865aecaf9866e56ee415b100a442c1ef473c Author: Maarten Lankhorst d...@mblankhorst.nl Date: Mon Aug 11 13:16:05 2014 +0200 configure.ac: Do not require llvm on x32 Cc: 10.2 mesa-sta...@lists.freedesktop.org Signed-off-by: Maarten Lankhorst d...@mblankhorst.nl (cherry picked from commit 4c16e6a8e01fc8f6cbd02f2c1d367adfe17ec3c8) URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=629df2fbddc2938116497ec664ab622b0de1a61f Author: Marek Olšák marek.ol...@amd.com Date: Thu Aug 7 21:14:31 2014 +0200 radeonsi: fix CMASK and HTILE allocation on Tahiti Tahiti has 12 tile pipes, but P8 pipe config. It looks like there is no way to get the pipe config except for reading GB_TILE_MODE. The TILING_CONFIG ioctl doesn't return more than 8 pipes, so we can't use that for Hawaii. This fixes a regression caused by fcb6c0d2b8cb36c3d1b7cbbf3437aeb65a808682 (cherry picked from 9b046474c95f15338d4c748df9b62871bba6f36f as part of Mesa 10.2.5) on Tahiti. v2: add an assertion and print an error on failure Cc: mesa-sta...@lists.freedesktop.org Reviewed-by: Michel Dänzer michel.daen...@amd.com (cherry picked from commit 955505f6ff1c8bba7eb142200d3bd065eb4d2297) URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=22ec7df0d7687eb7db72ac2a004b21d4cb35ec7b Author: Marek Olšák marek.ol...@amd.com Date: Wed Aug 6 02:11:04 2014 +0200 radeonsi: fix a hang with instancing in Unigine Heaven/Valley on Hawaii This isn't documented anywhere, but it's the only thing that works for this case. Cc: mesa-sta...@lists.freedesktop.org Reviewed-by: Alex Deucher alexander.deuc...@amd.com (cherry picked from commit 515269b3a73cd64ac9c017e8b3c698be9a5383f6) Conflicts: src/gallium/drivers/radeonsi/si_state_draw.c URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=1e0820032d76ea9585fa2b50cb73274736c3219e Author: Marek Olšák marek.ol...@amd.com Date: Fri Aug 1 19:36:37 2014 +0200 radeon,r200: fix buffer validation after CS flush This validates all bound buffers (CB, ZB, textures, DMA) at the beginning of CS. This fixes bo-space_accouned assertion failures. Tested by: Jochen Rollwagen joro-2...@t-online.de Cc: mesa-sta...@lists.freedesktop.org Reviewed-by: Alex Deucher alexander.deuc...@amd.com (cherry picked from commit 085a86154553d86f8e4296b4c732901f781bdfd8) URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=485fd2a4ebd539a02f316f5f03bc0daf78141f47 Author: Marek Olšák marek.ol...@amd.com Date: Fri Aug 8 00:34:31 2014 +0200 st/mesa: fix blit-based partial TexSubImage for 1D arrays This fixes piglit spec/EXT_texture_array/render-1darray. Cc: mesa-sta...@lists.freedesktop.org Reviewed-by: Ilia Mirkin imir...@alum.mit.edu Reviewed-by: Roland Scheidegger srol...@vmware.com (cherry picked from commit 0b5d88a518da7e4c8a084b7881580846c5d6d11f) URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=56a455f5ba112ee6e073f9f5e660de0e2be0336a Author: Pali Rohár pali.ro...@gmail.com Date: Fri Aug 8 18:31:07 2014 +0100 configure: check for dladdr via AC_CHECK_FUNC/AC_CHECK_LIB Use both macros as in some cases using AC_CHECK_FUNCS alone may fail. Thus HAVE_DLADDR will not be defined, and as a result most of the code in megadriver_stub.c will not be compiled. Breaking the backwards compatibility between older libGL/xserver(s) and DRI megadrivers. Cc: Jon TURNEY jon.tur...@dronecode.org.uk Cc: 10.2 mesa-sta...@lists.freedesktop.org [Emil Velikov] Commit message. Signed-off-by: Emil Velikov emil.l.veli...@gmail.com Reviewed-by: Matt Turner matts...@gmail.com (cherry picked from commit 39a4cc45a417bea3bb1cfbe20ea5045200f76c25) Also squashed together with: configure.ac: Use LIBS rather than LDFLAGS to add -ldl to dladdr check ec8ebff Check for dladdr() erroneously uses LDFLAGS rather than LIBS to add -ldl to the dladdr check. Replace the workaround in 39a4cc4 of explicitly checking in libdl, with a more correct approach of using LIBS. Signed-off-by: Jon TURNEY jon.tur...@dronecode.org.uk Reviewed-by: Emil Velikov emil.l.veli...@gmail.com Tested-by: Pali Rohár
Mesa: tag mesa-10.2.5: Mesa 10.2.5 release
Module: Mesa Branch: refs/tags/mesa-10.2.5 Tag:d3b8b5d23eb400166c2406fbc46cd5746cab93b6 URL: http://cgit.freedesktop.org/mesa/mesa/tag/?id=d3b8b5d23eb400166c2406fbc46cd5746cab93b6 Tagger: Carl Worth cwo...@cworth.org Date: Sat Aug 2 19:09:43 2014 -0700 Mesa 10.2.5 release ___ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit
Mesa (10.2): docs: Add sha256 sums to the 10.2.5 release notes
Module: Mesa Branch: 10.2 Commit: 12d68e9aafd3a71ce193c64f509005ff0663aea4 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=12d68e9aafd3a71ce193c64f509005ff0663aea4 Author: Carl Worth cwo...@cworth.org Date: Sat Aug 2 19:10:30 2014 -0700 docs: Add sha256 sums to the 10.2.5 release notes --- docs/relnotes/10.2.5.html |3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/relnotes/10.2.5.html b/docs/relnotes/10.2.5.html index 68be843..a75d9b5 100644 --- a/docs/relnotes/10.2.5.html +++ b/docs/relnotes/10.2.5.html @@ -30,6 +30,9 @@ because compatibility contexts are not supported. h2SHA256 checksums/h2 pre +b4459f0bf7f4a3c8fb78ece3c9d2eac3d0e5bf38cb470f2a72705e744bd0310d MesaLib-10.2.5.tar.bz2 +7b4dd0cb683f8c7dc48a3e7a315742bed58ddcd7b756c462aca4177bd1acdc79 MesaLib-10.2.5.tar.gz +6180565914fb238dd77ccdaff96b6155d9a6e1b3e981ebbf6a6851301b384fed MesaLib-10.2.5.zip /pre h2New features/h2 ___ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit
Mesa (10.2): Update version to 10.2.5
Module: Mesa Branch: 10.2 Commit: b83b9b677b00b17fa449c519563838629093ec7c URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=b83b9b677b00b17fa449c519563838629093ec7c Author: Carl Worth cwo...@cworth.org Date: Sat Aug 2 19:03:34 2014 -0700 Update version to 10.2.5 In preparation for the 10.2.5 release, of course. --- VERSION |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 06bcad3..9b36ab7 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -10.2.4 +10.2.5 ___ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit
Mesa (10.2): radeonsi: fix order of r600_need_dma_space and r600_context_bo_reloc
Module: Mesa Branch: 10.2 Commit: c66da3d45761f8776c08aa7f29ef2efd6bb635d3 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=c66da3d45761f8776c08aa7f29ef2efd6bb635d3 Author: Christian König christian.koe...@amd.com Date: Wed Jul 9 14:38:06 2014 +0200 radeonsi: fix order of r600_need_dma_space and r600_context_bo_reloc Signed-off-by: Christian König christian.koe...@amd.com Reviewed-by: Marek Olšák marek.ol...@amd.com (cherry picked from commit c8011c1885003b79c9f0c6530e46ae6cb0e69575) --- src/gallium/drivers/radeonsi/si_dma.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/radeonsi/si_dma.c b/src/gallium/drivers/radeonsi/si_dma.c index dc8c609..26f1e1b 100644 --- a/src/gallium/drivers/radeonsi/si_dma.c +++ b/src/gallium/drivers/radeonsi/si_dma.c @@ -91,12 +91,13 @@ static void si_dma_copy_buffer(struct si_context *ctx, } ncopy = (size / max_csize) + !!(size % max_csize); + r600_need_dma_space(ctx-b, ncopy * 5); + r600_context_bo_reloc(ctx-b, ctx-b.rings.dma, rsrc, RADEON_USAGE_READ, RADEON_PRIO_MIN); r600_context_bo_reloc(ctx-b, ctx-b.rings.dma, rdst, RADEON_USAGE_WRITE, RADEON_PRIO_MIN); - r600_need_dma_space(ctx-b, ncopy * 5); for (i = 0; i ncopy; i++) { csize = size max_csize ? size : max_csize; cs-buf[cs-cdw++] = SI_DMA_PACKET(SI_DMA_PACKET_COPY, sub_cmd, csize); ___ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit
Mesa (10.2): radeonsi: fix build because of lack of draw_indirect infrastructure in 10.2
Module: Mesa Branch: 10.2 Commit: f75dfcee1058d77670d85e047c3ef1e102011a2f URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=f75dfcee1058d77670d85e047c3ef1e102011a2f Author: Marek Olšák marek.ol...@amd.com Date: Thu Jul 31 20:04:42 2014 +0200 radeonsi: fix build because of lack of draw_indirect infrastructure in 10.2 --- src/gallium/drivers/radeonsi/si_state_draw.c |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_state_draw.c b/src/gallium/drivers/radeonsi/si_state_draw.c index 33e8e2a..ec144a5 100644 --- a/src/gallium/drivers/radeonsi/si_state_draw.c +++ b/src/gallium/drivers/radeonsi/si_state_draw.c @@ -433,8 +433,7 @@ static bool si_update_draw_info_state(struct si_context *sctx, * We don't know that for indirect drawing, so treat it as * always problematic. */ if (sctx-b.family == CHIP_HAWAII - (info-indirect || -(info-instance_count 1 + ((info-instance_count 1 u_prims_for_vertices(info-mode, info-count) primgroup_size))) { wd_switch_on_eop = true; ia_switch_on_eop = true; ___ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit
Mesa (10.2): radeonsi: use DRAW_PREAMBLE on CIK
Module: Mesa Branch: 10.2 Commit: 853cd6a4f76c936a0128747b237eefb7471b5d03 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=853cd6a4f76c936a0128747b237eefb7471b5d03 Author: Marek Olšák marek.ol...@amd.com Date: Wed Apr 30 01:03:40 2014 +0200 radeonsi: use DRAW_PREAMBLE on CIK It's the same as setting the 3 regs separately, but shorter, and it also seems to be required on GFX7.2 and later. This doesn't fix Hawaii. Reviewed-by: Michel Dänzer michel.daen...@amd.com (cherry picked from commit 315f3c171d423e13069beb99a6b772726a141865) --- src/gallium/drivers/radeonsi/si_state_draw.c | 13 - src/gallium/drivers/radeonsi/sid.h |2 ++ 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_state_draw.c b/src/gallium/drivers/radeonsi/si_state_draw.c index ec144a5..a24d9c0 100644 --- a/src/gallium/drivers/radeonsi/si_state_draw.c +++ b/src/gallium/drivers/radeonsi/si_state_draw.c @@ -439,15 +439,18 @@ static bool si_update_draw_info_state(struct si_context *sctx, ia_switch_on_eop = true; } - si_pm4_set_reg(pm4, R_028AA8_IA_MULTI_VGT_PARAM, + si_pm4_set_reg(pm4, R_028B74_VGT_DISPATCH_DRAW_INDEX, + ib-index_size == 4 ? 0xFC00 : 0xFC00); + + si_pm4_cmd_begin(pm4, PKT3_DRAW_PREAMBLE); + si_pm4_cmd_add(pm4, prim); /* VGT_PRIMITIVE_TYPE */ + si_pm4_cmd_add(pm4, /* IA_MULTI_VGT_PARAM */ S_028AA8_SWITCH_ON_EOP(ia_switch_on_eop) | S_028AA8_PARTIAL_VS_WAVE_ON(1) | S_028AA8_PRIMGROUP_SIZE(primgroup_size - 1) | S_028AA8_WD_SWITCH_ON_EOP(wd_switch_on_eop)); - si_pm4_set_reg(pm4, R_028B74_VGT_DISPATCH_DRAW_INDEX, - ib-index_size == 4 ? 0xFC00 : 0xFC00); - - si_pm4_set_reg(pm4, R_030908_VGT_PRIMITIVE_TYPE, prim); + si_pm4_cmd_add(pm4, 0); /* VGT_LS_HS_CONFIG */ + si_pm4_cmd_end(pm4, false); } else { si_pm4_set_reg(pm4, R_008958_VGT_PRIMITIVE_TYPE, prim); } diff --git a/src/gallium/drivers/radeonsi/sid.h b/src/gallium/drivers/radeonsi/sid.h index 2bd2cb4..558da10 100644 --- a/src/gallium/drivers/radeonsi/sid.h +++ b/src/gallium/drivers/radeonsi/sid.h @@ -83,6 +83,8 @@ #define PKT3_DRAW_INDEX_IMMD 0x2E /* not on CIK */ #define PKT3_NUM_INSTANCES 0x2F #define PKT3_STRMOUT_BUFFER_UPDATE 0x34 +#define PKT3_DRAW_INDEX_OFFSET_2 0x35 +#define PKT3_DRAW_PREAMBLE 0x36 /* new on CIK, required on GFX7.2 and later */ #define PKT3_WRITE_DATA0x37 #define PKT3_WRITE_DATA_DST_SEL(x) ((x) 8) #define PKT3_WRITE_DATA_DST_SEL_REG0 ___ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit
Mesa (10.2): 24 new commits
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=490d8ddf879300cdab44d344f0e5f72b3400b4cc Author: Carl Worth cwo...@cworth.org Date: Wed Jul 30 19:20:51 2014 -0700 cherry-ignore: Ignore a few patches picked in the previous stable release I don't know what happened here, but these three commits were picked earlier, but the commit IDs referenced in their commit messages do not currently appear in the master branch, (perhaps a force-push occurred?). Anyway, we can ignore these now. URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=b9c5a8f869ae76ba560db88523779eae9014b826 Author: Jason Ekstrand jason.ekstr...@intel.com Date: Mon Jul 28 18:30:55 2014 -0700 main/get_hash_params: Add GL_SAMPLE_SHADING_ARB GL_SAMPLE_SHADING is specified as a valid pname for glGet in the GL_ARB_sample_shading extension. It seems as if we forgot to add it to the table of pnames. Signed-off-by: Jason Ekstrand jason.ekstr...@intel.com Reviewed-by: Matt Turner matts...@gmail.com Reviewed-by: Kenneth Graunke kenn...@whitecape.org Cc: mesa-sta...@lists.freedesktop.org (cherry picked from commit 3ea922dd7ca773033a09068e397b34d8abd4c763) URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=c84b367b18821e7790015cdb426abab1d9b544d0 Author: José Fonseca jfons...@vmware.com Date: Thu Jul 24 15:50:56 2014 +0100 st/wgl: Clamp wglChoosePixelFormatARB's output nNumFormats to nMaxFormats. While running https://github.com/nvMcJohn/apitest with apitrace I noticed that Mesa was producing bogus results: wglChoosePixelFormatARB(hdc, piAttribIList = {...}, pfAttribFList = 0, nMaxFormats = 1, piFormats = {19, 65576, 37, 198656, 131075, 0, 402653184, 0, 0, 0, 0, -573575710}, nNumFormats = 12) = TRUE However https://www.opengl.org/registry/specs/ARB/wgl_pixel_format.txt states nNumFormats returns the number of matching formats. The returned value is guaranteed to be no larger than nMaxFormats. Cc: 10.2 mesa-sta...@lists.freedesktop.org Reviewed-by: Brian Paul bri...@vmware.com (cherry picked from commit 66a1b3a1da5cbb75d727c9b4751a06bdd403f0f9) URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=71102219ea97aaee0c6d8076d26857581340535d Author: Marek Olšák marek.ol...@amd.com Date: Sat Jul 26 17:15:39 2014 +0200 r600g,radeonsi: switch all occurences of array_size to util_max_layer This fixes 3D texture support in all these cases, because array_size is 1 with 3D textures and depth0 actually contains the array size. util_max_layer is universal and returns the last layer index for any texture target. A lot of the cases below can't actually be hit with 3D textures, but let's be consistent. This fixes a failure in: piglit layered-rendering/clear-color-all-types 3d single_level for r600g and radeonsi, which was caused by an incorrect CMASK size calculation. Cc: mesa-sta...@lists.freedesktop.org Reviewed-by: Michel Dänzer michel.daen...@amd.com (cherry picked from commit a9528cef6b6ff4875c9d125a60b7309a2ad24766) URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=d26ac40bada800cce24ed7c988fbc31dff89681d Author: Marek Olšák marek.ol...@amd.com Date: Sat Jul 26 12:57:28 2014 +0200 radeonsi: fix occlusion queries on Hawaii This was just a guess - and it worked! Cc: mesa-sta...@lists.freedesktop.org Reviewed-by: Alex Deucher alexander.deuc...@amd.com (cherry picked from commit 71ce92200e0314a0878088dec8c0c2a0270bc4dc) URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=50dcc2eb261b5a5f6e9446e6df12fde2395cbea4 Author: Marek Olšák marek.ol...@amd.com Date: Sat Jul 26 12:37:03 2014 +0200 winsys/radeon: fix vram_size overflow with Hawaii This fixes piglit spec/!OpenGL 3.1/minmax. Cc: mesa-sta...@lists.freedesktop.org Reviewed-by: Alex Deucher alexander.deuc...@amd.com (cherry picked from commit 156b7e244c93e82f5d6b19caae1ec25e7f0e91bb) URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=0dfcf5063970d0d47d9e0ea7529f572fdc16535d Author: Marek Olšák marek.ol...@amd.com Date: Sat Jul 26 03:16:22 2014 +0200 radeonsi: fix a hang with streamout on Hawaii I actually couldn't reproduce this one, but internal docs recommend this workaround. Better safe than sorry. Also, the number of dwords for the sync packets is increased by 4 instead of 2, because it wasn't bumped last time when a new packet was added there. Cc: mesa-sta...@lists.freedesktop.org Reviewed-by: Alex Deucher alexander.deuc...@amd.com (cherry picked from commit 0e7f56313d2a265cbdc2140f45dc4a0c6ae07e4e) URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=6ff3da25090ff62d501653636100c7f470f6f290 Author: Marek Olšák marek.ol...@amd.com Date: Sat Jul 26 02:56:00 2014 +0200 radeonsi: fix a hang
Mesa (master): 29 new commits
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=a62354a9877e327c44ce4f0898359b4a3db41727 Author: Carl Worth cwo...@cworth.org Date: Tue Jul 1 15:10:02 2014 -0700 glsl: Add flex options to eliminate the default rule We've had bugs in the past where we have been inadvertently matching the default rule. Just as we did in the pre-processor in the previous commit, we can use: %option warn nodefault in the compiler to instruct flex to not generate the default rule, and further to warn if our set of rules could let any characters go unmatched. With this warning active, flex actually warns that the catch-all rule we recently added to the compiler could never be matched. Since that is all safely determined at compile time now, we can safely drop this run-time compiler error message, (as we do in this commit). Reviewed-by: Kenneth Graunke kenn...@whitecape.org Reviewed-by: Kristian Høgsberg k...@bitplanet.net URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=bc8721f16f2f4a08e6ad935723cc52de1748b63f Author: Carl Worth cwo...@cworth.org Date: Tue Jul 1 15:04:38 2014 -0700 glsl/glcpp: Add flex options to eliminate the default rule. We've had multiple bugs in the past where we have been inadvertently matching the default rule, (which we never want to do). We recently added a catch-all rule to avoid this, (and made this rule robust for future start conditions). Kristian pointed out that flex allows us to go one step better. This syntax: %option warn nodefault instructs flex to not generate the default rule at all. Further, flex will generate a warning at compile time if the set of rules we provide are inadequate, (such that it would be possible for the default rule to be matched). With this warning in place, I found that the catch-all rule was in fact missing something. The catch-all rule uses a pattern of . which doesn't match newlines. So here we extend the newline-matching rule to all start conditions. That is enough to convince flex that it really doesn't need any default rule. Reviewed-by: Kenneth Graunke kenn...@whitecape.org Reviewed-by: Kristian Høgsberg k...@bitplanet.net URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=4ebff9bca638d96b562640c093b2dcc5d02fb443 Author: Carl Worth cwo...@cworth.org Date: Tue Jul 1 15:02:14 2014 -0700 glsl/glcpp: Combine the two rules matching any character Using a single rule here means that we can use the * syntax to match all start conditions. This makes the catch-all rule more robust against the addition of future start conditions, (no need to maintain an ever- growing list of start conditions for this rul). Reviewed-by: Kenneth Graunke kenn...@whitecape.org Reviewed-by: Kristian Høgsberg k...@bitplanet.net URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=80e9301d9be3f1fd85803a1fe5d9c6ac899e4e19 Author: Carl Worth cwo...@cworth.org Date: Tue Jul 1 14:55:56 2014 -0700 glsl/glcpp: Alphabetize lists of start conditions There is no behavioral change here. It's just easier to verify that lists of start conditions include all expected conditions when they appear in a consistent order. The INITIAL state is special, so it appears first in all lists. All others appear in alphabetical order. Reviewed-by: Kenneth Graunke kenn...@whitecape.org Reviewed-by: Kristian Høgsberg k...@bitplanet.net URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=f9c99aefea85fe23bbe4b7802542eaf8f70d6798 Author: Carl Worth cwo...@cworth.org Date: Wed Jun 18 17:03:19 2014 -0700 glsl/glcpp: Add a catch-all rule for unexpected characters. In some of the recent glcpp bug-fixing, we found that glcpp was emitting unrecognized characters from the input source file to stdout, and dropping them from the source passed onto the compiler proper. This was obviously confusing, and totally undesired. The bogus behavior comes from an implicit default rule in flex, which is that any unmatched character is implicitly matched and printed to stdout. To avoid this implicit matching and printing, here we add an explicit catch-all rule. If this rule ever matches it prints an internal compiler error. The correct response for any such error is fixing glcpp to handle the unexpected character in the correct way. Reviewed-by: Jordan Justen jordan.l.jus...@intel.com URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=4757c74c840460f387a466894baf1c45624467c7 Author: Carl Worth cwo...@cworth.org Date: Thu Jun 26 14:04:01 2014 -0700 glsl/glcpp: Treat carriage return as equivalent to line feed. Previously, the '\r' character was not explicitly matched by any lexer rule. This means that glcpp would have been using
Mesa (10.2): docs: Add SHA256 checksums for the 10.2.4 release
Module: Mesa Branch: 10.2 Commit: 816d37e5c59b50167e0b13c5e290a08f04ee166c URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=816d37e5c59b50167e0b13c5e290a08f04ee166c Author: Carl Worth cwo...@cworth.org Date: Fri Jul 18 16:46:28 2014 -0700 docs: Add SHA256 checksums for the 10.2.4 release Just after tagging the commit used to create the release. --- docs/relnotes/10.2.4.html |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/relnotes/10.2.4.html b/docs/relnotes/10.2.4.html index 207b791..9ded829 100644 --- a/docs/relnotes/10.2.4.html +++ b/docs/relnotes/10.2.4.html @@ -31,9 +31,11 @@ because compatibility contexts are not supported. h2SHA256 checksums/h2 pre +06a2341244eb85c283f59f70161e06ded106f835ed9b6be1ef0243bd9344811a MesaLib-10.2.4.tar.bz2 +33e3c8b4343503e7d7d17416c670438860a2fd99ec93ea3327f73c3abe33b5e4 MesaLib-10.2.4.tar.gz +e26791a4a62a61b82e506e6ba031812d09697d1a831e8239af67e5722a8ee538 MesaLib-10.2.4.zip /pre - h2New features/h2 pNone/p ___ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit
Mesa (10.2): Update VERSION to 10.2.4
Module: Mesa Branch: 10.2 Commit: 54733e5cb87fc132cfce3b18f85a928f4db754a5 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=54733e5cb87fc132cfce3b18f85a928f4db754a5 Author: Carl Worth cwo...@cworth.org Date: Fri Jul 18 12:37:31 2014 -0700 Update VERSION to 10.2.4 In preparation for the 10.2.4 release, of course. --- VERSION |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index ea657e0..06bcad3 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -10.2.3 +10.2.4 ___ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit
Mesa (10.2): Add release notes for 10.2.4
Module: Mesa Branch: 10.2 Commit: efe8cb1e5374e17fdb04e7cf2025093cfa2d4845 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=efe8cb1e5374e17fdb04e7cf2025093cfa2d4845 Author: Carl Worth cwo...@cworth.org Date: Fri Jul 18 12:45:19 2014 -0700 Add release notes for 10.2.4 Just prior to the release. --- docs/relnotes/10.2.4.html | 125 + 1 file changed, 125 insertions(+) diff --git a/docs/relnotes/10.2.4.html b/docs/relnotes/10.2.4.html new file mode 100644 index 000..207b791 --- /dev/null +++ b/docs/relnotes/10.2.4.html @@ -0,0 +1,125 @@ +!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN http://www.w3.org/TR/html4/loose.dtd; +html lang=en +head + meta http-equiv=content-type content=text/html; charset=utf-8 + titleMesa Release Notes/title + link rel=stylesheet type=text/css href=../mesa.css +/head +body + +div class=header + h1The Mesa 3D Graphics Library/h1 +/div + +iframe src=../contents.html/iframe +div class=content + +h1Mesa 10.2.4 Release Notes / July 18, 2014/h1 + +p +Mesa 10.2.4 is a bug fix release which fixes bugs found since the 10.2.3 release. +/p +p +Mesa 10.2.4 implements the OpenGL 3.3 API, but the version reported by +glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) / +glGetIntegerv(GL_MINOR_VERSION) depends on the particular driver being used. +Some drivers don't support all the features required in OpenGL 3.3. OpenGL +3.3 is strongonly/strong available if requested at context creation +because compatibility contexts are not supported. +/p + + +h2SHA256 checksums/h2 +pre +/pre + + +h2New features/h2 +pNone/p + +h2Bug fixes/h2 + +pThis list is likely incomplete./p + +ul + +lia href=https://bugs.freedesktop.org/show_bug.cgi?id=81157;Bug 81157/a - [BDW]Piglit some spec_glsl-1.50_execution_built-in-functions* cases fail/li + +/ul + +h2Changes/h2 + +pAbdiel Janulgue (3):/p +ul + lii965/fs: Refactor check for potential copy propagated instructions./li + lii965/fs: skip copy-propate for logical instructions with negated src entries/li + lii965/vec4: skip copy-propate for logical instructions with negated src entries/li +/ul + +pBrian Paul (3):/p +ul + limesa: fix geometry shader memory leaks/li + list/mesa: fix geometry shader memory leak/li + ligallium/u_blitter: fix some shader memory leaks/li +/ul + +pCarl Worth (2):/p +ul + lidocs: Add sha256 checksums for the 10.2.3 release/li + liUpdate VERSION to 10.2.4/li +/ul + +pEric Anholt (1):/p +ul + lii965: Generalize the pixel_x/y workaround for all UW types./li +/ul + +pIlia Mirkin (4):/p +ul + linv50/ir: retrieve shadow compare from first arg/li + linv50/ir: ignore bias for samplerCubeShadow on nv50/li + linvc0/ir: do quadops on the right texture coordinates for TXD/li + linvc0/ir: use manual TXD when offsets are involved/li +/ul + +pJordan Justen (1):/p +ul + lii965: Add auxiliary surface field #defines for Broadwell./li +/ul + +pKenneth Graunke (9):/p +ul + lii965: Don't copy propagate abs into Broadwell logic instructions./li + lii965: Set execution size to 8 for instructions with force_sechalf set./li + lii965/fs: Set force_uncompressed and force_sechalf on samplepos setup./li + lii965/fs: Use WE_all for gl_SampleID header register munging./li + lii965: Add plumbing for Broadwell's auxiliary surface support./li + lii965: Drop SINT workaround for CMS layout on Broadwell./li + lii965: Hook up the MCS buffers in SURFACE_STATE on Broadwell./li + lii965: Add 2x MSAA support to the MCS allocation function./li + lii965: Enable compressed multisample support (CMS) on Broadwell./li +/ul + +pMarek Olšák (4):/p +ul + ligallium: fix u_default_transfer_inline_write for textures/li + list/mesa: fix samplerCubeShadow with bias/li + liradeonsi: fix samplerCubeShadow with bias/li + liradeonsi: add support for TXB2/li +/ul + +pMatt Turner (8):/p +ul + lii965/vec4: Don't return void from a void function./li + lii965/vec4: Don't fix_math_operand() on Gen gt;= 8./li + lii965/fs: Don't fix_math_operand() on Gen gt;= 8./li + lii965/fs: Make try_constant_propagate() static./li + lii965/fs: Constant propagate into 2-src math instructions on Gen8./li + lii965/vec4: Constant propagate into 2-src math instructions on Gen8./li + lii965/fs: Don't use brw_imm_* unnecessarily./li + lii965/fs: Set correct number of regs_written for MCS fetches./li +/ul + +/div +/body +/html ___ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit
Mesa: tag mesa-10.2.4: Mesa 10.2.4 release
Module: Mesa Branch: refs/tags/mesa-10.2.4 Tag:db6e6043c5276976494202d7be4c6c5ca7e85cd9 URL: http://cgit.freedesktop.org/mesa/mesa/tag/?id=db6e6043c5276976494202d7be4c6c5ca7e85cd9 Tagger: Carl Worth cwo...@cworth.org Date: Fri Jul 18 12:58:22 2014 -0700 Mesa 10.2.4 release ___ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit
Mesa (master): docs: Import 10.2.4 release notes
Module: Mesa Branch: master Commit: 8ed24543f8834ef2591715ca43df538bfe5fdf06 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=8ed24543f8834ef2591715ca43df538bfe5fdf06 Author: Carl Worth cwo...@cworth.org Date: Fri Jul 18 16:50:05 2014 -0700 docs: Import 10.2.4 release notes And add a news item. --- docs/index.html |6 +++ docs/relnotes.html|1 + docs/relnotes/10.2.4.html | 127 + 3 files changed, 134 insertions(+) diff --git a/docs/index.html b/docs/index.html index d3882f0..8aef51a 100644 --- a/docs/index.html +++ b/docs/index.html @@ -16,6 +16,12 @@ h1News/h1 +h2July 78, 2014/h2 +p +a href=relnotes/10.2.4.htmlMesa 10.2.4/a is released. +This is a bug-fix release. +/p + h2July 7, 2014/h2 p a href=relnotes/10.2.3.htmlMesa 10.2.3/a is released. diff --git a/docs/relnotes.html b/docs/relnotes.html index ba88d1a..ca00883 100644 --- a/docs/relnotes.html +++ b/docs/relnotes.html @@ -21,6 +21,7 @@ The release notes summarize what's new or changed in each Mesa release. /p ul +lia href=relnotes/10.2.4.html10.2.4 release notes/a lia href=relnotes/10.2.3.html10.2.3 release notes/a lia href=relnotes/10.2.2.html10.2.2 release notes/a lia href=relnotes/10.2.1.html10.2.1 release notes/a diff --git a/docs/relnotes/10.2.4.html b/docs/relnotes/10.2.4.html new file mode 100644 index 000..9ded829 --- /dev/null +++ b/docs/relnotes/10.2.4.html @@ -0,0 +1,127 @@ +!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN http://www.w3.org/TR/html4/loose.dtd; +html lang=en +head + meta http-equiv=content-type content=text/html; charset=utf-8 + titleMesa Release Notes/title + link rel=stylesheet type=text/css href=../mesa.css +/head +body + +div class=header + h1The Mesa 3D Graphics Library/h1 +/div + +iframe src=../contents.html/iframe +div class=content + +h1Mesa 10.2.4 Release Notes / July 18, 2014/h1 + +p +Mesa 10.2.4 is a bug fix release which fixes bugs found since the 10.2.3 release. +/p +p +Mesa 10.2.4 implements the OpenGL 3.3 API, but the version reported by +glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) / +glGetIntegerv(GL_MINOR_VERSION) depends on the particular driver being used. +Some drivers don't support all the features required in OpenGL 3.3. OpenGL +3.3 is strongonly/strong available if requested at context creation +because compatibility contexts are not supported. +/p + + +h2SHA256 checksums/h2 +pre +06a2341244eb85c283f59f70161e06ded106f835ed9b6be1ef0243bd9344811a MesaLib-10.2.4.tar.bz2 +33e3c8b4343503e7d7d17416c670438860a2fd99ec93ea3327f73c3abe33b5e4 MesaLib-10.2.4.tar.gz +e26791a4a62a61b82e506e6ba031812d09697d1a831e8239af67e5722a8ee538 MesaLib-10.2.4.zip +/pre + +h2New features/h2 +pNone/p + +h2Bug fixes/h2 + +pThis list is likely incomplete./p + +ul + +lia href=https://bugs.freedesktop.org/show_bug.cgi?id=81157;Bug 81157/a - [BDW]Piglit some spec_glsl-1.50_execution_built-in-functions* cases fail/li + +/ul + +h2Changes/h2 + +pAbdiel Janulgue (3):/p +ul + lii965/fs: Refactor check for potential copy propagated instructions./li + lii965/fs: skip copy-propate for logical instructions with negated src entries/li + lii965/vec4: skip copy-propate for logical instructions with negated src entries/li +/ul + +pBrian Paul (3):/p +ul + limesa: fix geometry shader memory leaks/li + list/mesa: fix geometry shader memory leak/li + ligallium/u_blitter: fix some shader memory leaks/li +/ul + +pCarl Worth (2):/p +ul + lidocs: Add sha256 checksums for the 10.2.3 release/li + liUpdate VERSION to 10.2.4/li +/ul + +pEric Anholt (1):/p +ul + lii965: Generalize the pixel_x/y workaround for all UW types./li +/ul + +pIlia Mirkin (4):/p +ul + linv50/ir: retrieve shadow compare from first arg/li + linv50/ir: ignore bias for samplerCubeShadow on nv50/li + linvc0/ir: do quadops on the right texture coordinates for TXD/li + linvc0/ir: use manual TXD when offsets are involved/li +/ul + +pJordan Justen (1):/p +ul + lii965: Add auxiliary surface field #defines for Broadwell./li +/ul + +pKenneth Graunke (9):/p +ul + lii965: Don't copy propagate abs into Broadwell logic instructions./li + lii965: Set execution size to 8 for instructions with force_sechalf set./li + lii965/fs: Set force_uncompressed and force_sechalf on samplepos setup./li + lii965/fs: Use WE_all for gl_SampleID header register munging./li + lii965: Add plumbing for Broadwell's auxiliary surface support./li + lii965: Drop SINT workaround for CMS layout on Broadwell./li + lii965: Hook up the MCS buffers in SURFACE_STATE on Broadwell./li + lii965: Add 2x MSAA support to the MCS allocation function./li + lii965: Enable compressed multisample support (CMS) on Broadwell./li +/ul + +pMarek Olšák (4):/p +ul + ligallium: fix u_default_transfer_inline_write for textures/li + list/mesa: fix samplerCubeShadow with bias/li + liradeonsi: fix samplerCubeShadow with bias/li + liradeonsi: add support for TXB2/li +/ul
Mesa (10.2): radeonsi: add support for TXB2
Module: Mesa Branch: 10.2 Commit: 0273f22a103adbfe8be733a3690bf06e8f1b7ab7 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=0273f22a103adbfe8be733a3690bf06e8f1b7ab7 Author: Marek Olšák marek.ol...@amd.com Date: Thu Jul 17 22:24:50 2014 +0200 radeonsi: add support for TXB2 This is needed by latest fixes for samplerCubeShadow with bias. Otherwise, a crash occurs. --- src/gallium/drivers/radeonsi/si_shader.c |3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c index 09c99eb..397b6ee 100644 --- a/src/gallium/drivers/radeonsi/si_shader.c +++ b/src/gallium/drivers/radeonsi/si_shader.c @@ -1539,6 +1539,8 @@ static void tex_fetch_args( /* Pack LOD bias value */ if (opcode == TGSI_OPCODE_TXB) address[count++] = coords[3]; + if (opcode == TGSI_OPCODE_TXB2) + address[count++] = lp_build_emit_fetch(bld_base, inst, 1, 0); /* Pack depth comparison value */ switch (target) { @@ -2497,6 +2499,7 @@ int si_pipe_shader_create( bld_base-op_actions[TGSI_OPCODE_TEX] = tex_action; bld_base-op_actions[TGSI_OPCODE_TXB] = txb_action; + bld_base-op_actions[TGSI_OPCODE_TXB2] = txb_action; #if HAVE_LLVM = 0x0304 bld_base-op_actions[TGSI_OPCODE_TXD] = txd_action; #endif ___ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit
Mesa (10.2): 22 new commits
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=6388ad51ffc2d179383b7fa38757036973397422 Author: Kenneth Graunke kenn...@whitecape.org Date: Tue Jun 24 16:34:49 2014 -0700 i965: Enable compressed multisample support (CMS) on Broadwell. Everything is in place and appears to be working. Signed-off-by: Kenneth Graunke kenn...@whitecape.org Reviewed-by: Jordan Justen jordan.l.jus...@intel.com (cherry picked from commit 8cf289c3ef2fcaded5a89f9d7a600f60a5e8356e) URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=ab0ad8f7e9b6203fc9fd074e201a04fa138f3951 Author: Kenneth Graunke kenn...@whitecape.org Date: Tue Jun 24 16:33:56 2014 -0700 i965: Add 2x MSAA support to the MCS allocation function. 2x MSAA also uses 8 bits, just like 4x. More bits are unused. Signed-off-by: Kenneth Graunke kenn...@whitecape.org Reviewed-by: Jordan Justen jordan.l.jus...@intel.com (cherry picked from commit db184d43b0573c00d911ef9e98fbaab26ebd6466) URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=1c386d5c352c71c5632804c81daffd399c0b237f Author: Kenneth Graunke kenn...@whitecape.org Date: Sat May 10 01:59:10 2014 -0700 i965: Hook up the MCS buffers in SURFACE_STATE on Broadwell. MCS buffers are never allocated on Broadwell, so this does nothing for now, but puts the infrastructure in place for when they do exist. Signed-off-by: Kenneth Graunke kenn...@whitecape.org Reviewed-by: Jordan Justen jordan.l.jus...@intel.com Reviewed-by: Ben Widawsky b...@bwidawsk.net (cherry picked from commit a248b2a4ebb27832d6c8a40ce2b10134f8735b93) URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=e3c0c238736bbfc990bfd275426eb8fd8c259ade Author: Kenneth Graunke kenn...@whitecape.org Date: Fri May 9 22:22:24 2014 -0700 i965: Drop SINT workaround for CMS layout on Broadwell. According to the documentation, we don't need this SINT workaround on Broadwell. (Or at least, it doesn't mention that we need it.) Signed-off-by: Kenneth Graunke kenn...@whitecape.org Reviewed-by: Jordan Justen jordan.l.jus...@intel.com Reviewed-by: Ben Widawsky b...@bwidawsk.net (cherry picked from commit e10311be9f61230de7f06e9fb30834835ba3677d) URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=2a90fbfce4bd50ab85e1a36f3786720d56323b62 Author: Kenneth Graunke kenn...@whitecape.org Date: Sat May 10 01:42:15 2014 -0700 i965: Add plumbing for Broadwell's auxiliary surface support. Broadwell generalizes the MCS fields to allow for multiple kinds of auxiliary surfaces. This patch adds the plumbing to set those values, but doesn't yet hook any up. v2: (by Jordan Justen) Use mt for qpitch; pitch is tiles - 1. v3: Don't forget to subtract 1 from aux_mt-pitch. v4: Drop unnecessary aux_mt-offset (caught by Jordan Justen). Signed-off-by: Kenneth Graunke kenn...@whitecape.org Signed-off-by: Jordan Justen jordan.l.jus...@intel.com Reviewed-by: Ben Widawsky b...@bwidawsk.net (cherry picked from commit fd7718768929ff7fd1460bafc32f7b8be75a3140) URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=d374cfe0bca9929d451a47c29fce8445a12d5963 Author: Jordan Justen jordan.l.jus...@intel.com Date: Thu Mar 6 09:18:14 2014 -0800 i965: Add auxiliary surface field #defines for Broadwell. Signed-off-by: Jordan Justen jordan.l.jus...@intel.com Signed-off-by: Kenneth Graunke kenn...@whitecape.org Reviewed-by: Ben Widawsky b...@bwidawsk.net (cherry picked from commit a46cb6a971b136f41e24739551f6d36ecc1694c0) URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=b56908d7db3a691b63e62c41b7ad0a5d4559ee50 Author: Matt Turner matts...@gmail.com Date: Tue May 27 15:26:06 2014 -0700 i965/fs: Set correct number of regs_written for MCS fetches. regs_written is in units of virtual GRFs. Reviewed-by: Chris Forbes chr...@ijw.co.nz Reviewed-by: Kenneth Graunke kenn...@whitecape.org (cherry picked from commit dfd117b8570a69a429e660c069997e78b181ab6d) URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=c6a6acb6b4412427e3a7e49ec5efc769fe43695b Author: Eric Anholt e...@anholt.net Date: Tue May 6 13:22:10 2014 -0700 i965: Generalize the pixel_x/y workaround for all UW types. This is the only case where a fs_reg in brw_fs_visitor is used during optimization/code generation, and it meant that optimizations had to be careful to not move pixel_x/y's register number without updating it. Additionally, it turns out we had a couple of other UW values that weren't getting this treatment (like gl_SampleID), so this more general fix is probably a good idea (though I wasn't able to replicate problems with either pixel_[xy]'s values or gl_SampleID, even when telling the register allocator to reuse registers immediately) Reviewed-by: Matt Turner
Mesa (10.2): mesa: fix geometry shader memory leaks
Module: Mesa Branch: 10.2 Commit: 37005cafa45a25372613359da05d20eb8499f534 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=37005cafa45a25372613359da05d20eb8499f534 Author: Brian Paul bri...@vmware.com Date: Tue Jul 8 16:23:38 2014 -0600 mesa: fix geometry shader memory leaks Spotted by Charmaine Lee. Cc: 10.2 mesa-sta...@lists.freedesktop.org Reviewed-by: Marek Olšák marek.ol...@amd.com (cherry picked from commit 176b64b81104bffed114a0bdd919338e1e54ed19) --- src/mesa/main/context.c |3 +++ src/mesa/main/shared.c |1 + 2 files changed, 4 insertions(+) diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c index 8eb426d..9eba126 100644 --- a/src/mesa/main/context.c +++ b/src/mesa/main/context.c @@ -1212,6 +1212,9 @@ _mesa_free_context_data( struct gl_context *ctx ) _mesa_reference_vertprog(ctx, ctx-VertexProgram._Current, NULL); _mesa_reference_vertprog(ctx, ctx-VertexProgram._TnlProgram, NULL); + _mesa_reference_geomprog(ctx, ctx-GeometryProgram.Current, NULL); + _mesa_reference_geomprog(ctx, ctx-GeometryProgram._Current, NULL); + _mesa_reference_fragprog(ctx, ctx-FragmentProgram.Current, NULL); _mesa_reference_fragprog(ctx, ctx-FragmentProgram._Current, NULL); _mesa_reference_fragprog(ctx, ctx-FragmentProgram._TexEnvProgram, NULL); diff --git a/src/mesa/main/shared.c b/src/mesa/main/shared.c index dc22025..5ae7014 100644 --- a/src/mesa/main/shared.c +++ b/src/mesa/main/shared.c @@ -312,6 +312,7 @@ free_shared_state(struct gl_context *ctx, struct gl_shared_state *shared) _mesa_DeleteHashTable(shared-Programs); _mesa_reference_vertprog(ctx, shared-DefaultVertexProgram, NULL); + _mesa_reference_geomprog(ctx, shared-DefaultGeometryProgram, NULL); _mesa_reference_fragprog(ctx, shared-DefaultFragmentProgram, NULL); _mesa_HashDeleteAll(shared-ATIShaders, delete_fragshader_cb, ctx); ___ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit
Mesa (10.2): nvc0/ir: do quadops on the right texture coordinates for TXD
Module: Mesa Branch: 10.2 Commit: 9fd133747b90a89ba6837f47d520863d4321ea8e URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=9fd133747b90a89ba6837f47d520863d4321ea8e Author: Ilia Mirkin imir...@alum.mit.edu Date: Sat Jul 5 00:30:45 2014 -0400 nvc0/ir: do quadops on the right texture coordinates for TXD handleTEX moves the layer as the first argument. This makes sure that the quadops deal with the texture coordinates. Signed-off-by: Ilia Mirkin imir...@alum.mit.edu Cc: mesa-sta...@lists.freedesktop.org (cherry picked from commit afea9bae67208cdb00b27a60c9cb013bf7d6de52) --- src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp |5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp index 0b439dd..12237fe 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp @@ -814,6 +814,7 @@ NVC0LoweringPass::handleManualTXD(TexInstruction *i) Value *zero = bld.loadImm(bld.getSSA(), 0); int l, c; const int dim = i-tex.target.getDim(); + const int array = i-tex.target.isArray(); i-op = OP_TEX; // no need to clone dPdx/dPdy later @@ -824,7 +825,7 @@ NVC0LoweringPass::handleManualTXD(TexInstruction *i) for (l = 0; l 4; ++l) { // mov coordinates from lane l to all lanes for (c = 0; c dim; ++c) - bld.mkQuadop(0x00, crd[c], l, i-getSrc(c), zero); + bld.mkQuadop(0x00, crd[c], l, i-getSrc(c + array), zero); // add dPdx from lane l to lanes dx for (c = 0; c dim; ++c) bld.mkQuadop(qOps[l][0], crd[c], l, i-dPdx[c].get(), crd[c]); @@ -834,7 +835,7 @@ NVC0LoweringPass::handleManualTXD(TexInstruction *i) // texture bld.insert(tex = cloneForward(func, i)); for (c = 0; c dim; ++c) - tex-setSrc(c, crd[c]); + tex-setSrc(c + array, crd[c]); // save results for (c = 0; i-defExists(c); ++c) { Instruction *mov; ___ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit
Mesa (10.2): nv50/ir: retrieve shadow compare from first arg
Module: Mesa Branch: 10.2 Commit: 0618881c8216aa45ae20f2b16266c102a5f41188 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=0618881c8216aa45ae20f2b16266c102a5f41188 Author: Ilia Mirkin imir...@alum.mit.edu Date: Fri Jul 4 17:09:43 2014 -0400 nv50/ir: retrieve shadow compare from first arg This can only happen with texture(samplerCubeShadow, bias), where the compare will be in the first argument. Signed-off-by: Ilia Mirkin imir...@alum.mit.edu Cc: mesa-sta...@lists.freedesktop.org (cherry picked from commit 30d91e0eecfe79e0d8515189a59051ee4f21f3da) --- src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp index 2ba3c1c..200fe1f 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp @@ -2504,7 +2504,7 @@ Converter::handleInstruction(const struct tgsi_full_instruction *insn) break; case TGSI_OPCODE_TXB2: case TGSI_OPCODE_TXL2: - handleTEX(dst0, 2, 2, 0x10, 0x11, 0x00, 0x00); + handleTEX(dst0, 2, 2, 0x10, 0x0f, 0x00, 0x00); break; case TGSI_OPCODE_SAMPLE: case TGSI_OPCODE_SAMPLE_B: ___ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit
Mesa (10.2): radeonsi: fix samplerCubeShadow with bias
Module: Mesa Branch: 10.2 Commit: e7310313725142cf536179d4d918db2c20438765 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=e7310313725142cf536179d4d918db2c20438765 Author: Marek Olšák marek.ol...@amd.com Date: Fri Jul 4 03:19:58 2014 +0200 radeonsi: fix samplerCubeShadow with bias Pack the depth value before overwriting it with cube coordinates. Cc: mesa-sta...@lists.freedesktop.org (cherry picked from commit b279f0143f4dce67c8f5af57cd4a5942eb403c13) Conflicts: src/gallium/drivers/radeonsi/si_shader.c --- src/gallium/drivers/radeonsi/si_shader.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c index 0d070d3..09c99eb 100644 --- a/src/gallium/drivers/radeonsi/si_shader.c +++ b/src/gallium/drivers/radeonsi/si_shader.c @@ -1540,9 +1540,6 @@ static void tex_fetch_args( if (opcode == TGSI_OPCODE_TXB) address[count++] = coords[3]; - if (target == TGSI_TEXTURE_CUBE || target == TGSI_TEXTURE_SHADOWCUBE) - radeon_llvm_emit_prepare_cube_coords(bld_base, emit_data, coords); - /* Pack depth comparison value */ switch (target) { case TGSI_TEXTURE_SHADOW1D: @@ -1558,6 +1555,9 @@ static void tex_fetch_args( address[count++] = lp_build_emit_fetch(bld_base, inst, 1, 0); } + if (target == TGSI_TEXTURE_CUBE || target == TGSI_TEXTURE_SHADOWCUBE) + radeon_llvm_emit_prepare_cube_coords(bld_base, emit_data, coords); + /* Pack user derivatives */ if (opcode == TGSI_OPCODE_TXD) { for (chan = 0; chan 2; chan++) { ___ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit
Mesa (10.2): st/mesa: fix geometry shader memory leak
Module: Mesa Branch: 10.2 Commit: 9b062d2020270ad3c8c9e1aea12740728d8e92c6 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=9b062d2020270ad3c8c9e1aea12740728d8e92c6 Author: Brian Paul bri...@vmware.com Date: Tue Jul 8 16:24:53 2014 -0600 st/mesa: fix geometry shader memory leak Spotted by Charmaine Lee. Cc: 10.2 mesa-sta...@lists.freedesktop.org Reviewed-by: Marek Olšák marek.ol...@amd.com Reviewed-by: Charmaine Lee charmai...@vmware.com (cherry picked from commit d10204930f26d906d8a464731c687249434ec72d) --- src/mesa/state_tracker/st_context.c |1 + 1 file changed, 1 insertion(+) diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c index c7f3ec6..c805a09 100644 --- a/src/mesa/state_tracker/st_context.c +++ b/src/mesa/state_tracker/st_context.c @@ -307,6 +307,7 @@ void st_destroy_context( struct st_context *st ) cso_release_all(st-cso_context); st_reference_fragprog(st, st-fp, NULL); + st_reference_geomprog(st, st-gp, NULL); st_reference_vertprog(st, st-vp, NULL); /* release framebuffer surfaces */ ___ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit
Mesa (10.2): gallium/u_blitter: fix some shader memory leaks
Module: Mesa Branch: 10.2 Commit: d69c9114df126e84bf998f89a1fa8d628efd288a URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=d69c9114df126e84bf998f89a1fa8d628efd288a Author: Brian Paul bri...@vmware.com Date: Wed Jul 9 09:38:37 2014 -0600 gallium/u_blitter: fix some shader memory leaks The _msaa shaders weren't getting freed. Cc: 10.2 mesa-sta...@lists.freedesktop.org Reviewed-by: Marek Olšák marek.ol...@amd.com (cherry picked from commit 378fa34c7b8ea29672deea7563c552a8e2742809) --- src/gallium/auxiliary/util/u_blitter.c |9 + 1 file changed, 9 insertions(+) diff --git a/src/gallium/auxiliary/util/u_blitter.c b/src/gallium/auxiliary/util/u_blitter.c index 7b058fe..f767d85 100644 --- a/src/gallium/auxiliary/util/u_blitter.c +++ b/src/gallium/auxiliary/util/u_blitter.c @@ -383,6 +383,15 @@ void util_blitter_destroy(struct blitter_context *blitter) if (ctx-fs_texfetch_stencil[i]) ctx-delete_fs_state(pipe, ctx-fs_texfetch_stencil[i]); + if (ctx-fs_texfetch_col_msaa[i]) + ctx-delete_fs_state(pipe, ctx-fs_texfetch_col_msaa[i]); + if (ctx-fs_texfetch_depth_msaa[i]) + ctx-delete_fs_state(pipe, ctx-fs_texfetch_depth_msaa[i]); + if (ctx-fs_texfetch_depthstencil_msaa[i]) + ctx-delete_fs_state(pipe, ctx-fs_texfetch_depthstencil_msaa[i]); + if (ctx-fs_texfetch_stencil_msaa[i]) + ctx-delete_fs_state(pipe, ctx-fs_texfetch_stencil_msaa[i]); + for (j = 0; j Elements(ctx-fs_resolve[i]); j++) for (f = 0; f 2; f++) if (ctx-fs_resolve[i][j][f]) ___ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit
Mesa (10.2): st/mesa: fix samplerCubeShadow with bias
Module: Mesa Branch: 10.2 Commit: 906727dccb60e6a5e11198eaa6fd1b5d266203d5 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=906727dccb60e6a5e11198eaa6fd1b5d266203d5 Author: Marek Olšák marek.ol...@amd.com Date: Fri Jul 4 03:19:58 2014 +0200 st/mesa: fix samplerCubeShadow with bias It has 5 coordinates: (x,y,z,depth,lodbias) Cc: mesa-sta...@lists.freedesktop.org Reviewed-by: Ilia Mirkin imir...@alum.mit.edu (cherry picked from commit a11fff329ea0b236ee5d2d7ad563af49770c04c7) --- src/mesa/state_tracker/st_glsl_to_tgsi.cpp |8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp index adc9312..162864f 100644 --- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp +++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp @@ -2776,7 +2776,13 @@ glsl_to_tgsi_visitor::visit(ir_texture *ir) } break; case ir_txb: - opcode = is_cube_array ? TGSI_OPCODE_TXB2 : TGSI_OPCODE_TXB; + if (is_cube_array || + sampler_type == glsl_type::samplerCubeShadow_type) { + opcode = TGSI_OPCODE_TXB2; + } + else { + opcode = TGSI_OPCODE_TXB; + } ir-lod_info.bias-accept(this); lod_info = this-result; if (ir-offset) { ___ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit
Mesa (10.2): gallium: fix u_default_transfer_inline_write for textures
Module: Mesa Branch: 10.2 Commit: abe859d56e43b2ecdc0a99f32f537af57ac1f681 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=abe859d56e43b2ecdc0a99f32f537af57ac1f681 Author: Marek Olšák marek.ol...@amd.com Date: Thu Jun 19 23:34:27 2014 +0200 gallium: fix u_default_transfer_inline_write for textures This doesn't fix any known issue. In fact, radeon drivers ignore all the discard flags for textures and implicitly do discard range for any write transfer. Cc: mesa-sta...@lists.freedesktop.org Reviewed-by: Roland Scheidegger srol...@vmware.com (cherry picked from commit fe6be9926f63e68d9007571956bed0687003e932) --- src/gallium/auxiliary/util/u_transfer.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gallium/auxiliary/util/u_transfer.c b/src/gallium/auxiliary/util/u_transfer.c index 7804f2a..71da35d 100644 --- a/src/gallium/auxiliary/util/u_transfer.c +++ b/src/gallium/auxiliary/util/u_transfer.c @@ -25,8 +25,8 @@ void u_default_transfer_inline_write( struct pipe_context *pipe, usage |= PIPE_TRANSFER_WRITE; /* transfer_inline_write implicitly discards the rewritten buffer range */ - /* XXX this looks very broken for non-buffer resources having more than one dim. */ - if (box-x == 0 box-width == resource-width0) { + if (resource-target == PIPE_BUFFER + box-x == 0 box-width == resource-width0) { usage |= PIPE_TRANSFER_DISCARD_WHOLE_RESOURCE; } else { usage |= PIPE_TRANSFER_DISCARD_RANGE; ___ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit
Mesa (10.2): nvc0/ir: use manual TXD when offsets are involved
Module: Mesa Branch: 10.2 Commit: 1e6620997f7576de01acbf268a7f424bbf91ddf7 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=1e6620997f7576de01acbf268a7f424bbf91ddf7 Author: Ilia Mirkin imir...@alum.mit.edu Date: Sat Jul 5 00:52:15 2014 -0400 nvc0/ir: use manual TXD when offsets are involved Something about how we're implementing offsets for TXD is wrong, just flip to the generic quadop-based implementation in that case. This is the minimal fix appropriate for backporting. Signed-off-by: Ilia Mirkin imir...@alum.mit.edu Cc: mesa-sta...@lists.freedesktop.org (cherry picked from commit 114d46829d10c826927cabc1ca14884a4ee249f7) --- src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp index 12237fe..767cc02 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp @@ -871,7 +871,8 @@ NVC0LoweringPass::handleTXD(TexInstruction *txd) if (dim 2 || txd-tex.target.isCube() || arg 4 || - txd-tex.target.isShadow()) + txd-tex.target.isShadow() || + txd-tex.useOffsets) return handleManualTXD(txd); for (int c = 0; c dim; ++c) { ___ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit
Mesa (10.2): nv50/ir: ignore bias for samplerCubeShadow on nv50
Module: Mesa Branch: 10.2 Commit: 5e1bfed1cad651247315a5b63a33c722406fb179 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=5e1bfed1cad651247315a5b63a33c722406fb179 Author: Ilia Mirkin imir...@alum.mit.edu Date: Fri Jul 4 18:38:28 2014 -0400 nv50/ir: ignore bias for samplerCubeShadow on nv50 Unfortunately there's no good way to do this on the nv50 shader isa. Dropping the bias seems preferable to doing the compare post-filtering. Signed-off-by: Ilia Mirkin imir...@alum.mit.edu Cc: mesa-sta...@lists.freedesktop.org (cherry picked from commit 1065aa92f4e448fbfe47c074f08dded1933a7f1f) --- .../drivers/nouveau/codegen/nv50_ir_lowering_nv50.cpp| 10 ++ 1 file changed, 10 insertions(+) diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nv50.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nv50.cpp index ed06def..e283424 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nv50.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nv50.cpp @@ -797,6 +797,16 @@ NV50LoweringPreSSA::handleTXB(TexInstruction *i) const CondCode cc[4] = { CC_EQU, CC_S, CC_C, CC_O }; int l, d; + // We can't actually apply bias *and* do a compare for a cube + // texture. Since the compare has to be done before the filtering, just + // drop the bias on the floor. + if (i-tex.target == TEX_TARGET_CUBE_SHADOW) { + i-op = OP_TEX; + i-setSrc(3, i-getSrc(4)); + i-setSrc(4, NULL); + return handleTEX(i); + } + handleTEX(i); Value *bias = i-getSrc(i-tex.target.getArgCount()); if (bias-isUniform()) ___ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit
Mesa (master): glsl/glcpp: Fixup glcpp tests for redefining a macro with whitespace changes.
Module: Mesa Branch: master Commit: 1d862a0b39dfd2723aac6c64f9a7609c205b3cdc URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=1d862a0b39dfd2723aac6c64f9a7609c205b3cdc Author: Carl Worth cwo...@cworth.org Date: Wed Jun 11 18:02:54 2014 -0700 glsl/glcpp: Fixup glcpp tests for redefining a macro with whitespace changes. Previously, the test suite was expecting the compiler to allow a redefintion of a macro with whitespace added, but gcc is more strict and allows only for changes in the amounts of whitespace, (but insists that whitespace exist or not in exactly the same places). See: https://gcc.gnu.org/onlinedocs/cpp/Undefining-and-Redefining-Macros.html: These definitions are effectively the same: #define FOUR (2 + 2) #define FOUR (2+2) #define FOUR (2 /* two */ + 2) but these are not: #define FOUR (2 + 2) #define FOUR ( 2+2 ) #define FOUR (2 * 2) #define FOUR(score,and,seven,years,ago) (2 + 2) This change adjusts the existing redefine-macro-legitimate test to work with the more strict understanding, and adds a new redefine-whitespace test to verify that changes in the position of whitespace are flagged as errors. Reviewed-by: Anuj Phogat anuj.pho...@gmail.com --- .../glcpp/tests/088-redefine-macro-legitimate.c|2 +- src/glsl/glcpp/tests/122-redefine-whitespace.c | 16 ++ .../glcpp/tests/122-redefine-whitespace.c.expected | 23 3 files changed, 40 insertions(+), 1 deletion(-) diff --git a/src/glsl/glcpp/tests/088-redefine-macro-legitimate.c b/src/glsl/glcpp/tests/088-redefine-macro-legitimate.c index 0e0666b..422c654 100644 --- a/src/glsl/glcpp/tests/088-redefine-macro-legitimate.c +++ b/src/glsl/glcpp/tests/088-redefine-macro-legitimate.c @@ -1,5 +1,5 @@ #define abc 123 #define abc 123 -#define foo(x) (x)+23 #define foo(x) ( x ) + 23 +#define foo(x) ( x ) + 23 diff --git a/src/glsl/glcpp/tests/122-redefine-whitespace.c b/src/glsl/glcpp/tests/122-redefine-whitespace.c new file mode 100644 index 000..ae7ea09 --- /dev/null +++ b/src/glsl/glcpp/tests/122-redefine-whitespace.c @@ -0,0 +1,16 @@ +/* Original definitions. */ +#define TWO ( 1+1 ) +#define FOUR (2 + 2) +#define SIX (3 + 3) + +/* Redefinitions with whitespace in same places, but different amounts, (so no + * error). */ +#define TWO( 1+1 ) +#define FOUR(2 + 2) +#define SIX(3/*comment is whitespace*/+ /* collapsed */ /* to */ /* one */ /* space */ 3) + +/* Redefinitions with whitespace in different places. Each of these should + * trigger an error. */ +#define TWO (1 + 1) +#define FOUR ( 2+2 ) +#define SIX (/*not*/3 + 3/*expected*/) diff --git a/src/glsl/glcpp/tests/122-redefine-whitespace.c.expected b/src/glsl/glcpp/tests/122-redefine-whitespace.c.expected new file mode 100644 index 000..193ebc4 --- /dev/null +++ b/src/glsl/glcpp/tests/122-redefine-whitespace.c.expected @@ -0,0 +1,23 @@ +0:14(9): preprocessor error: Redefinition of macro TWO + +0:15(9): preprocessor error: Redefinition of macro FOUR + +0:16(9): preprocessor error: Redefinition of macro SIX + + + + + + + + + + + + + + + + + + ___ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit
Mesa (master): glsl/glcpp: Add short-circuiting for || and in #if/ #elif for OpenGL ES.
Module: Mesa Branch: master Commit: ec6222ef014ca336e540e13fda423fd9f927feb1 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=ec6222ef014ca336e540e13fda423fd9f927feb1 Author: Carl Worth cwo...@cworth.org Date: Fri Jun 13 14:54:46 2014 -0700 glsl/glcpp: Add short-circuiting for || and in #if/#elif for OpenGL ES. The GLSL ES Specification 3.00.4 says: #if, #ifdef, #ifndef, #else, #elif, and #endif are defined to operate as for C++ except for the following: ... • Undefined identifiers not consumed by the defined operator do not default to '0'. Use of such identifiers causes an error. [Page 11 (page 127 of the PDF file)] as well as: The semantics of applying operators in the preprocessor match those standard in the C++ preprocessor with the following exceptions: • The 2nd operand in a logical and ('') operation is evaluated if and only if the 1st operand evaluates to non-zero. • The 2nd operand in a logical or ('||') operation is evaluated if and only if the 1st operand evaluates to zero. If an operand is not evaluated, the presence of undefined identifiers in the operand will not cause an error. (Note that neither of these deviations from C++ preprocessor behavior apply to non-ES GLSL, at least as of specfication version 4.30.6). The first portion of this, (generating an error for an undefined macro in an (short-circuiting to squelch errors), was not implemented previously, but is implemented in this commit. A test is added for make check to ensure this behavior. Note: The change as implemented does make the error message a bit less precise, (it just states that an undefined macro was encountered, but not the name of the macro). This commit fixes the following Khronos GLES3 conformance test: undefined_identifiers.valid_undefined_identifier_1_vertex undefined_identifiers.valid_undefined_identifier_1_fragment undefined_identifiers.valid_undefined_identifier_2_vertex undefined_identifiers.valid_undefined_identifier_2_fragment Reviewed-by: Kenneth Graunke kenn...@whitecape.org --- src/glsl/glcpp/glcpp-parse.y | 106 ++-- src/glsl/glcpp/glcpp.h |7 ++ .../glcpp/tests/125-es-short-circuit-undefined.c | 27 + .../125-es-short-circuit-undefined.c.expected | 30 ++ 4 files changed, 140 insertions(+), 30 deletions(-) diff --git a/src/glsl/glcpp/glcpp-parse.y b/src/glsl/glcpp/glcpp-parse.y index 82e3102..68e4ace 100644 --- a/src/glsl/glcpp/glcpp-parse.y +++ b/src/glsl/glcpp/glcpp-parse.y @@ -166,7 +166,8 @@ add_builtin_define(glcpp_parser_t *parser, const char *name, int value); %expect 0 %token COMMA_FINAL DEFINED ELIF_EXPANDED HASH HASH_DEFINE FUNC_IDENTIFIER OBJ_IDENTIFIER HASH_ELIF HASH_ELSE HASH_ENDIF HASH_IF HASH_IFDEF HASH_IFNDEF HASH_LINE HASH_UNDEF HASH_VERSION IDENTIFIER IF_EXPANDED INTEGER INTEGER_STRING LINE_EXPANDED NEWLINE OTHER PLACEHOLDER SPACE %token PASTE -%type ival expression INTEGER operator SPACE integer_constant +%type ival INTEGER operator SPACE integer_constant +%type expression_value expression %type str IDENTIFIER FUNC_IDENTIFIER OBJ_IDENTIFIER INTEGER_STRING OTHER %type string_list identifier_list %type token preprocessing_token conditional_token @@ -216,10 +217,14 @@ line: expanded_line: IF_EXPANDED expression NEWLINE { - _glcpp_parser_skip_stack_push_if (parser, @1, $2); + if (parser-is_gles $2.has_undefined) + glcpp_error( @1, parser, undefined macro in expression (illegal in GLES)); + _glcpp_parser_skip_stack_push_if (parser, @1, $2.value); } | ELIF_EXPANDED expression NEWLINE { - _glcpp_parser_skip_stack_change_if (parser, @1, elif, $2); + if (parser-is_gles $2.has_undefined) + glcpp_error( @1, parser, undefined macro in expression (illegal in GLES)); + _glcpp_parser_skip_stack_change_if (parser, @1, elif, $2.value); } | LINE_EXPANDED integer_constant NEWLINE { parser-has_new_line_number = 1; @@ -412,87 +417,128 @@ integer_constant: } expression: - integer_constant + integer_constant { + $$.value = $1; + $$.has_undefined = false; + } | IDENTIFIER { + $$.value = 0; if (parser-is_gles) - glcpp_error( @1, parser, undefined macro %s in expression (illegal in GLES), $1); - $$ = 0; + $$.has_undefined = true; + else + $$.has_undefined = false; } | expression OR expression { - $$ = $1 || $3; + $$.value = $1.value || $3.value; + + /* Short-circuit: Only flag undefined from right side
Mesa (master): glsl/glcpp: Fix preprocessor error condition for macro redefinition
Module: Mesa Branch: master Commit: a6e9cd14cad20ad98213adf541a7687a7498 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=a6e9cd14cad20ad98213adf541a7687a7498 Author: Anuj Phogat anuj.pho...@gmail.com Date: Fri Jun 6 16:56:59 2014 -0700 glsl/glcpp: Fix preprocessor error condition for macro redefinition This patch specifically fixes redefinition condition for white space changes. #define and #undef functionality in GLSL follows the standard for C++ preprocessors for macro definitions. From https://gcc.gnu.org/onlinedocs/cpp/Undefining-and-Redefining-Macros.html: These definitions are effectively the same: #define FOUR (2 + 2) #define FOUR (2+2) #define FOUR (2 /* two */ + 2) but these are not: #define FOUR (2 + 2) #define FOUR ( 2+2 ) #define FOUR (2 * 2) #define FOUR(score,and,seven,years,ago) (2 + 2) Fixes Khronos GLES3 CTS tests; invalid_object_whitespace_vertex invalid_object_whitespace_fragment Signed-off-by: Anuj Phogat anuj.pho...@gmail.com Reviewed-by: Carl Worth cwo...@cworth.org --- src/glsl/glcpp/glcpp-parse.y | 18 ++ 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/glsl/glcpp/glcpp-parse.y b/src/glsl/glcpp/glcpp-parse.y index 9d8b5bb..3fc8c86 100644 --- a/src/glsl/glcpp/glcpp-parse.y +++ b/src/glsl/glcpp/glcpp-parse.y @@ -939,14 +939,16 @@ _token_list_equal_ignoring_space (token_list_t *a, token_list_t *b) if (node_a == NULL || node_b == NULL) return 0; - - if (node_a-token-type == SPACE) { - node_a = node_a-next; - continue; - } - - if (node_b-token-type == SPACE) { - node_b = node_b-next; + /* Make sure whitespace appears in the same places in both. +* It need not be exactly the same amount of whitespace, +* though. +*/ + if (node_a-token-type == SPACE +node_b-token-type == SPACE) { + while (node_a-token-type == SPACE) + node_a = node_a-next; + while (node_b-token-type == SPACE) + node_b = node_b-next; continue; } ___ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit
Mesa (master): glsl/glcpp: Don't choke on an empty pragma
Module: Mesa Branch: master Commit: 0e12cd795474fcc38bae7f92b870f71fe47ca0bb URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=0e12cd795474fcc38bae7f92b870f71fe47ca0bb Author: Carl Worth cwo...@cworth.org Date: Fri Jun 13 15:53:39 2014 -0700 glsl/glcpp: Don't choke on an empty pragma The lexer was insisting that there be at least one character after #pragma and before the end of the line. This caused an error for a line consisting only of #pragma which volates at least the following sentence from the GLSL ES Specification 3.00.4: The scope as well as the effect of the optimize and debug pragmas is implementation-dependent except that their use must not generate an error. [Page 12 (Page 28 of PDF)] and likely the following sentence from that specification and also in GLSLangSpec 4.30.6: If an implementation does not recognize the tokens following #pragma, then it will ignore that pragma. Add a make check test to ensure no future regressions. This change fixes at least part of the following Khronos GLES3 CTS test: preprocessor.pragmas.pragma_vertex Reviewed-by: Kenneth Graunke kenn...@whitecape.org --- src/glsl/glcpp/glcpp-lex.l |2 +- src/glsl/glcpp/tests/127-pragma-empty.c |3 +++ src/glsl/glcpp/tests/127-pragma-empty.c.expected |4 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/glsl/glcpp/glcpp-lex.l b/src/glsl/glcpp/glcpp-lex.l index 9563817..a1a8e76 100644 --- a/src/glsl/glcpp/glcpp-lex.l +++ b/src/glsl/glcpp/glcpp-lex.l @@ -180,7 +180,7 @@ HEXADECIMAL_INTEGER 0[xX][0-9a-fA-F]+[uU]? /* glcpp doesn't handle #extension, #version, or #pragma directives. * Simply pass them through to the main compiler's lexer/parser. */ -{HASH}(extension|pragma)[^\n]+ { +{HASH}(extension|pragma)[^\n]* { if (parser-commented_newlines) BEGIN NEWLINE_CATCHUP; yylval-str = ralloc_strdup (yyextra, yytext); diff --git a/src/glsl/glcpp/tests/127-pragma-empty.c b/src/glsl/glcpp/tests/127-pragma-empty.c new file mode 100644 index 000..0f9b0b3 --- /dev/null +++ b/src/glsl/glcpp/tests/127-pragma-empty.c @@ -0,0 +1,3 @@ +/* It seems an odd (and particularly useless) thing to have an empty pragma, + * but we probably shouldn't trigger an error in this case. */ +#pragma diff --git a/src/glsl/glcpp/tests/127-pragma-empty.c.expected b/src/glsl/glcpp/tests/127-pragma-empty.c.expected new file mode 100644 index 000..957daff --- /dev/null +++ b/src/glsl/glcpp/tests/127-pragma-empty.c.expected @@ -0,0 +1,4 @@ + + +#pragma + ___ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit
Mesa (master): glsl/glcpp: Promote extra token at end of directive from warning to error
Module: Mesa Branch: master Commit: 43047384c331a9240339563704fe5d97ebe599d7 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=43047384c331a9240339563704fe5d97ebe599d7 Author: Carl Worth cwo...@cworth.org Date: Fri Jun 13 15:40:42 2014 -0700 glsl/glcpp: Promote extra token at end of directive from warning to error We've always warned about this case, but a recent confromance test expects this to be an error that causes compilation to fail. Make it so. Also add a make check test to ensure these errors are generated. This fixes the following Khronos GLES3 conformance tests: invalid_conditionals.tokens_after_ifdef_vertex invalid_conditionals.tokens_after_ifdef_fragment invalid_conditionals.tokens_after_ifndef_vertex invalid_conditionals.tokens_after_ifndef_fragment Reviewed-by: Kenneth Graunke kenn...@whitecape.org --- src/glsl/glcpp/glcpp-parse.y|2 +- src/glsl/glcpp/tests/126-garbage-after-directive.c |5 + src/glsl/glcpp/tests/126-garbage-after-directive.c.expected |8 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/glsl/glcpp/glcpp-parse.y b/src/glsl/glcpp/glcpp-parse.y index 2679401..21c85b4 100644 --- a/src/glsl/glcpp/glcpp-parse.y +++ b/src/glsl/glcpp/glcpp-parse.y @@ -625,7 +625,7 @@ replacement_list: junk: /* empty */ | pp_tokens { - glcpp_warning(@1, parser, extra tokens at end of directive); + glcpp_error(@1, parser, extra tokens at end of directive); } ; diff --git a/src/glsl/glcpp/tests/126-garbage-after-directive.c b/src/glsl/glcpp/tests/126-garbage-after-directive.c new file mode 100644 index 000..4c0d290 --- /dev/null +++ b/src/glsl/glcpp/tests/126-garbage-after-directive.c @@ -0,0 +1,5 @@ +#ifdef MACRO garbage +#endif + +#ifndef MORE garbage +#endif diff --git a/src/glsl/glcpp/tests/126-garbage-after-directive.c.expected b/src/glsl/glcpp/tests/126-garbage-after-directive.c.expected new file mode 100644 index 000..95a9e61 --- /dev/null +++ b/src/glsl/glcpp/tests/126-garbage-after-directive.c.expected @@ -0,0 +1,8 @@ +0:1(15): preprocessor error: extra tokens at end of directive +0:4(14): preprocessor error: extra tokens at end of directive + + + + + + ___ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit
Mesa (master): glsl/glcpp: Add test to ensure compiler won' t allow #undef for some builtins
Module: Mesa Branch: master Commit: 1a46dd6edd6a50624fd5cc876bc22dce99bd9326 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=1a46dd6edd6a50624fd5cc876bc22dce99bd9326 Author: Carl Worth cwo...@cworth.org Date: Wed Jun 11 17:20:40 2014 -0700 glsl/glcpp: Add test to ensure compiler won't allow #undef for some builtins Currently verifying that an #undef of __FILE__, __LINE__, or __VERSION__ will generate an error. Reviewed-by: Anuj Phogat anuj.pho...@gmail.com --- src/glsl/glcpp/tests/120-undef-builtin.c |3 +++ src/glsl/glcpp/tests/120-undef-builtin.c.expected |7 +++ 2 files changed, 10 insertions(+) diff --git a/src/glsl/glcpp/tests/120-undef-builtin.c b/src/glsl/glcpp/tests/120-undef-builtin.c new file mode 100644 index 000..49e7696 --- /dev/null +++ b/src/glsl/glcpp/tests/120-undef-builtin.c @@ -0,0 +1,3 @@ +#undef __LINE__ +#undef __FILE__ +#undef __VERSION__ diff --git a/src/glsl/glcpp/tests/120-undef-builtin.c.expected b/src/glsl/glcpp/tests/120-undef-builtin.c.expected new file mode 100644 index 000..d6981dc --- /dev/null +++ b/src/glsl/glcpp/tests/120-undef-builtin.c.expected @@ -0,0 +1,7 @@ +0:1(2): preprocessor error: Built-in (pre-defined) macro names can not be undefined. +0:2(1): preprocessor error: Built-in (pre-defined) macro names can not be undefined. +0:3(1): preprocessor error: Built-in (pre-defined) macro names can not be undefined. + + + + ___ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit
Mesa (master): glsl/glcpp: Fix glcpp to properly lex entire preprocessing numbers
Module: Mesa Branch: master Commit: 9794f8f2452b796740a30abf6d6454452ff3f028 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=9794f8f2452b796740a30abf6d6454452ff3f028 Author: Carl Worth cwo...@cworth.org Date: Thu Jun 12 14:56:47 2014 -0700 glsl/glcpp: Fix glcpp to properly lex entire preprocessing numbers The preprocessor defines a notions of a preprocessing number that starts with either a digit or a decimal point, and continues with zero or more of digits, decimal points, identifier characters, or the sign symbols, ('-' and '+'). Prior to this change, preprocessing numbers were lexed as some combination of OTHER and IDENTIFIER tokens. This had the problem of causing undesired macro expansion in some cases. We add tests to ensure that the undesired macro expansion does not happen in cases such as: #define e +1 #define xyz -2 int n = 1e; int p = 1xyz; In either case these macro definitions have no effect after this change, so that the numeric literals, (whether valid or not), will be passed on as-is from the preprocessor to the compiler proper. This fixes the following Khronos GLES3 CTS tests: preprocessor.basic.correct_phases_vertex preprocessor.basic.correct_phases_fragment v2. Thanks to Anuj Phogat for improving the original regular expression, (which accepted a '+' or '-', where these are only allowed after one of [eEpP]. I also expanded the test to exercise this. v3. Also fixed regular expression to require at least one digit at the beginning (after an optional period). Otherwise, a string such as .xyz was getting sucked up as a preprocessing number, (where obviously this should be a field access). Again, I expanded the test to exercise this. Reviewed-by: Anuj Phogat anuj.pho...@gmail.com --- src/glsl/glcpp/glcpp-lex.l |6 src/glsl/glcpp/tests/124-preprocessing-numbers.c | 37 +++ .../tests/124-preprocessing-numbers.c.expected | 38 3 files changed, 81 insertions(+) diff --git a/src/glsl/glcpp/glcpp-lex.l b/src/glsl/glcpp/glcpp-lex.l index d5fb087..9563817 100644 --- a/src/glsl/glcpp/glcpp-lex.l +++ b/src/glsl/glcpp/glcpp-lex.l @@ -76,6 +76,7 @@ NEWLINE [\n] HSPACE [ \t] HASH ^{HSPACE}*#{HSPACE}* IDENTIFIER [_a-zA-Z][_a-zA-Z0-9]* +PP_NUMBER [.]?[0-9]([._a-zA-Z0-9]|[eEpP][-+])* PUNCTUATION[][(){}.*~!/%^|;,=+-] /* The OTHER class is simply a catch-all for things that the CPP @@ -330,6 +331,11 @@ HEXADECIMAL_INTEGER0[xX][0-9a-fA-F]+[uU]? return IDENTIFIER; } +{PP_NUMBER} { + yylval-str = ralloc_strdup (yyextra, yytext); + return OTHER; +} + {PUNCTUATION} { return yytext[0]; } diff --git a/src/glsl/glcpp/tests/124-preprocessing-numbers.c b/src/glsl/glcpp/tests/124-preprocessing-numbers.c new file mode 100644 index 000..947ba18 --- /dev/null +++ b/src/glsl/glcpp/tests/124-preprocessing-numbers.c @@ -0,0 +1,37 @@ +#define e THIS_SHOULD_NOT_BE_EXPANDED +#define E NOR_THIS +#define p NOT_THIS_EITHER +#define P AND_SURELY_NOT_THIS +#define OK CRAZY_BUT_TRUE_THIS_NEITHER + +/* This one is actually meant to be expanded */ +#define MUST_EXPAND GO + +/* The following are preprocessing numbers and should not trigger macro + * expansion. */ +1e +1OK + +/* These are also preprocessing numbers, so no expansion */ +123e+OK +.23E+OK +1.3e-OK +12.E-OK +123p+OK +.23P+OK +1.3p-OK +12.P-OK +123..OK +.23.OK.OK + +/* Importantly, just before the MUST_EXPAND in each of these, the preceding + * preprocessing number ends and we have an actual expression. So the + * MUST_EXPAND macro must be expanded (who would have though?) in each case. */ +123ef+MUST_EXPAND +.23E3-MUST_EXPAND +1.3e--MUST_EXPAND +12.E-MUST_EXPAND +123p+OK+MUST_EXPAND +.23P+OK;MUST_EXPAND +1.3p-OK-MUST_EXPAND +12.P-OKMUST_EXPAND diff --git a/src/glsl/glcpp/tests/124-preprocessing-numbers.c.expected b/src/glsl/glcpp/tests/124-preprocessing-numbers.c.expected new file mode 100644 index 000..6f5254c --- /dev/null +++ b/src/glsl/glcpp/tests/124-preprocessing-numbers.c.expected @@ -0,0 +1,38 @@ + + + + + + + + + + + +1e +1OK + + +123e+OK +.23E+OK +1.3e-OK +12.E-OK +123p+OK +.23P+OK +1.3p-OK +12.P-OK +123..OK +.23.OK.OK + + + + +123ef+GO +.23E3-GO +1.3e--GO +12.E-GO +123p+OK+GO +.23P+OK;GO +1.3p-OK-GO +12.P-OKGO + ___ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit
Mesa (master): glsl/glcpp: Once again report undefined macro name in error message.
Module: Mesa Branch: master Commit: dac3c986c546b674873f217e3137c3bcd25663a7 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=dac3c986c546b674873f217e3137c3bcd25663a7 Author: Carl Worth cwo...@cworth.org Date: Fri Jun 13 15:16:05 2014 -0700 glsl/glcpp: Once again report undefined macro name in error message. While writing the previous commit message, I just felt bad documenting the shortcoming of the change, (that undefined macro names would not be reported in error messages). Fix this by preserving the first-encounterd undefined macro name and reporting that in any resulting error message. Reviewed-by: Kenneth Graunke kenn...@whitecape.org --- src/glsl/glcpp/glcpp-parse.y | 118 ++-- src/glsl/glcpp/glcpp.h |2 +- .../125-es-short-circuit-undefined.c.expected |4 +- 3 files changed, 86 insertions(+), 38 deletions(-) diff --git a/src/glsl/glcpp/glcpp-parse.y b/src/glsl/glcpp/glcpp-parse.y index 68e4ace..2679401 100644 --- a/src/glsl/glcpp/glcpp-parse.y +++ b/src/glsl/glcpp/glcpp-parse.y @@ -217,13 +217,13 @@ line: expanded_line: IF_EXPANDED expression NEWLINE { - if (parser-is_gles $2.has_undefined) - glcpp_error( @1, parser, undefined macro in expression (illegal in GLES)); + if (parser-is_gles $2.undefined_macro) + glcpp_error( @1, parser, undefined macro %s in expression (illegal in GLES), $2.undefined_macro); _glcpp_parser_skip_stack_push_if (parser, @1, $2.value); } | ELIF_EXPANDED expression NEWLINE { - if (parser-is_gles $2.has_undefined) - glcpp_error( @1, parser, undefined macro in expression (illegal in GLES)); + if (parser-is_gles $2.undefined_macro) + glcpp_error( @1, parser, undefined macro %s in expression (illegal in GLES), $2.undefined_macro); _glcpp_parser_skip_stack_change_if (parser, @1, elif, $2.value); } | LINE_EXPANDED integer_constant NEWLINE { @@ -419,14 +419,14 @@ integer_constant: expression: integer_constant { $$.value = $1; - $$.has_undefined = false; + $$.undefined_macro = NULL; } | IDENTIFIER { $$.value = 0; if (parser-is_gles) - $$.has_undefined = true; + $$.undefined_macro = ralloc_strdup (parser, $1); else - $$.has_undefined = false; + $$.undefined_macro = NULL; } | expression OR expression { $$.value = $1.value || $3.value; @@ -434,10 +434,10 @@ expression: /* Short-circuit: Only flag undefined from right side * if left side evaluates to false. */ - if ($1.value) - $$.has_undefined = $1.has_undefined; - else - $$.has_undefined = $1.has_undefined || $3.has_undefined; + if ($1.undefined_macro) + $$.undefined_macro = $1.undefined_macro; +else if (! $1.value) + $$.undefined_macro = $3.undefined_macro; } | expression AND expression { $$.value = $1.value $3.value; @@ -445,62 +445,101 @@ expression: /* Short-circuit: Only flag undefined from right-side * if left side evaluates to true. */ - if ($1.value) - $$.has_undefined = $1.has_undefined || $3.has_undefined; - else - $$.has_undefined = $1.has_undefined; + if ($1.undefined_macro) + $$.undefined_macro = $1.undefined_macro; +else if ($1.value) + $$.undefined_macro = $3.undefined_macro; } | expression '|' expression { $$.value = $1.value | $3.value; - $$.has_undefined = $1.has_undefined || $3.has_undefined; + if ($1.undefined_macro) + $$.undefined_macro = $1.undefined_macro; +else + $$.undefined_macro = $3.undefined_macro; } | expression '^' expression { $$.value = $1.value ^ $3.value; - $$.has_undefined = $1.has_undefined || $3.has_undefined; + if ($1.undefined_macro) + $$.undefined_macro = $1.undefined_macro; +else + $$.undefined_macro = $3.undefined_macro; } | expression '' expression { $$.value = $1.value $3.value; - $$.has_undefined = $1.has_undefined || $3.has_undefined; + if ($1.undefined_macro) + $$.undefined_macro = $1.undefined_macro
Mesa (master): glsl/glcpp: Fix glcpp to catch garbage after #if 1 ... #else
Module: Mesa Branch: master Commit: 98c0e3c7834f8a99f7641aa14b2bab5221aa66db URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=98c0e3c7834f8a99f7641aa14b2bab5221aa66db Author: Carl Worth cwo...@cworth.org Date: Thu Jun 12 10:39:39 2014 -0700 glsl/glcpp: Fix glcpp to catch garbage after #if 1 ... #else Previously, a line such as: #else garbage would flag an error if it followed #if 0, but not if it followed #if 1. We fix this by setting a new bit of state (lexing_else) that allows the lexer to defer switching to the SKIP start state until after the NEWLINE following the #else directive. A new test case is added for: #if 1 #else garbage #endif which was untested before, (and did not generate the desired error). This fixes the following Khronos GLES3 CTS tests: tokens_after_else_vertex tokens_after_else_fragment Reviewed-by: Matt Turner matts...@gmail.com Reviewed-by: Anuj Phogat anuj.pho...@gmail.com --- src/glsl/glcpp/glcpp-lex.l | 25 ++-- src/glsl/glcpp/glcpp-parse.y |6 ++--- src/glsl/glcpp/glcpp.h |2 +- ...age-after-else.c = 103-garbage-after-else-0.c} |0 ...xpected = 103-garbage-after-else-0.c.expected} |0 src/glsl/glcpp/tests/123-garbage-after-else-1.c|3 +++ .../tests/123-garbage-after-else-1.c.expected |4 7 files changed, 24 insertions(+), 16 deletions(-) diff --git a/src/glsl/glcpp/glcpp-lex.l b/src/glsl/glcpp/glcpp-lex.l index 188e454..d5fb087 100644 --- a/src/glsl/glcpp/glcpp-lex.l +++ b/src/glsl/glcpp/glcpp-lex.l @@ -137,14 +137,15 @@ HEXADECIMAL_INTEGER 0[xX][0-9a-fA-F]+[uU]? * 2. The skip_stack is NULL meaning that we've reached * the last #endif. * -* 3. The lexing_if bit is set. This indicates that we -* are lexing the expression following an #if of -* #elif. Even inside an #if 0 we need to lex this -* expression so the parser can correctly update the -* skip_stack state. +* 3. The lexing_directive bit is set. This indicates that we are +* lexing a pre-processor directive, (such as #if, #elif, or +* #else). For the #if and #elif directives we always need to +* parse the conditions, (even if otherwise within an #if +* 0). And for #else, we want to be able to generate an error +* if any garbage follows #else. */ if (YY_START == INITIAL || YY_START == SKIP) { - if (parser-lexing_if || + if (parser-lexing_directive || parser-skip_stack == NULL || parser-skip_stack-type == SKIP_NO_SKIP) { @@ -193,25 +194,25 @@ HEXADECIMAL_INTEGER 0[xX][0-9a-fA-F]+[uU]? SKIP,INITIAL{ {HASH}ifdef { - yyextra-lexing_if = 1; + yyextra-lexing_directive = 1; yyextra-space_tokens = 0; return HASH_IFDEF; } {HASH}ifndef { - yyextra-lexing_if = 1; + yyextra-lexing_directive = 1; yyextra-space_tokens = 0; return HASH_IFNDEF; } {HASH}if/[^_a-zA-Z0-9] { - yyextra-lexing_if = 1; + yyextra-lexing_directive = 1; yyextra-space_tokens = 0; return HASH_IF; } {HASH}elif/[^_a-zA-Z0-9] { - yyextra-lexing_if = 1; + yyextra-lexing_directive = 1; yyextra-space_tokens = 0; return HASH_ELIF; } @@ -348,7 +349,7 @@ HEXADECIMAL_INTEGER 0[xX][0-9a-fA-F]+[uU]? if (parser-commented_newlines) { BEGIN NEWLINE_CATCHUP; } - yyextra-lexing_if = 0; + yyextra-lexing_directive = 0; yylineno++; yycolumn = 0; return NEWLINE; @@ -357,7 +358,7 @@ HEXADECIMAL_INTEGER 0[xX][0-9a-fA-F]+[uU]? /* Handle missing newline at EOF. */ INITIALEOF { BEGIN DONE; /* Don't keep matching this rule forever. */ - yyextra-lexing_if = 0; + yyextra-lexing_directive = 0; return NEWLINE; } diff --git a/src/glsl/glcpp/glcpp-parse.y b/src/glsl/glcpp/glcpp-parse.y index 3fc8c86..82e3102 100644 --- a/src/glsl/glcpp/glcpp-parse.y +++ b/src/glsl/glcpp/glcpp-parse.y @@ -364,7 +364,7 @@ control_line: glcpp_warning( @1, parser, ignoring illegal #elif without expression); } } -| HASH_ELSE { +| HASH_ELSE { parser-lexing_directive = 1; } NEWLINE { if (parser-skip_stack parser-skip_stack-has_else) { @@ -376,7 +376,7 @@ control_line: if (parser-skip_stack) parser-skip_stack-has_else = true; } - } NEWLINE + } | HASH_ENDIF { _glcpp_parser_skip_stack_pop (parser, @1); } NEWLINE @@ -1211,7 +1211,7 @@ glcpp_parser_create
Mesa (master): glsl/glcpp: Do not allow undefining the built-in macros
Module: Mesa Branch: master Commit: 64b7fc2dd16cd4a4966a4ed8e9f239c53715f1d5 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=64b7fc2dd16cd4a4966a4ed8e9f239c53715f1d5 Author: Anuj Phogat anuj.pho...@gmail.com Date: Fri Jun 6 16:56:58 2014 -0700 glsl/glcpp: Do not allow undefining the built-in macros Fixes piglit tests in spec/glsl-es-3.00/compile: undef-__FILE__.vert undef-GL_ES.vert undef-__LINE__.vert undef-__VERSION__.vert Also, fixes Khronos GLES3 CTS tests: undefine_invalid_object_1_vertex undefine_invalid_object_1_fragment undefine_invalid_object_2_vertex undefine_invalid_object_2_fragment Signed-off-by: Anuj Phogat anuj.pho...@gmail.com Reviewed-by: Carl Worth cwo...@cworth.org --- src/glsl/glcpp/glcpp-parse.y |6 ++ 1 file changed, 6 insertions(+) diff --git a/src/glsl/glcpp/glcpp-parse.y b/src/glsl/glcpp/glcpp-parse.y index ccf8105..9d8b5bb 100644 --- a/src/glsl/glcpp/glcpp-parse.y +++ b/src/glsl/glcpp/glcpp-parse.y @@ -260,6 +260,12 @@ control_line: | HASH_UNDEF { glcpp_parser_resolve_implicit_version(parser); } IDENTIFIER NEWLINE { + if (strcmp(__LINE__, $3) == 0 + || strcmp(__FILE__, $3) == 0 + || strcmp(__VERSION__, $3) == 0) + glcpp_error( @1, parser, Built-in (pre-defined) +macro names can not be undefined.); + macro_t *macro = hash_table_find (parser-defines, $3); if (macro) { hash_table_remove (parser-defines, $3); ___ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit
Mesa (10.2): freedreno/a3xx: fix depth/stencil gmem restore
Module: Mesa Branch: 10.2 Commit: f96e3e535140c8c3f5b88aec37152b6f3fb40386 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=f96e3e535140c8c3f5b88aec37152b6f3fb40386 Author: Rob Clark robcl...@freedesktop.org Date: Wed May 21 15:41:25 2014 -0400 freedreno/a3xx: fix depth/stencil gmem restore We already multiply by bytes per pixel for this, so f3ba7611 broke mem2gmem for depth/stencil. Drop the now-redundant mutiply by cpp. Signed-off-by: Rob Clark robcl...@freedesktop.org (cherry picked from commit b81de5352dc8f3db01888175561b816c0d92716b) --- src/gallium/drivers/freedreno/a3xx/fd3_gmem.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/freedreno/a3xx/fd3_gmem.c b/src/gallium/drivers/freedreno/a3xx/fd3_gmem.c index 7db049f..0c9dd99 100644 --- a/src/gallium/drivers/freedreno/a3xx/fd3_gmem.c +++ b/src/gallium/drivers/freedreno/a3xx/fd3_gmem.c @@ -82,7 +82,7 @@ emit_mrt(struct fd_ringbuffer *ring, unsigned nr_bufs, stride = bin_w * rsc-cpp; if (bases) { - base = bases[i] * rsc-cpp; + base = bases[i]; } } else { stride = slice-pitch * rsc-cpp; ___ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit
Mesa (10.2): freedreno/a3xx: vtx formats
Module: Mesa Branch: 10.2 Commit: 018685822756405fc4f1a9e5581458cc4d383c48 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=018685822756405fc4f1a9e5581458cc4d383c48 Author: Rob Clark robcl...@freedesktop.org Date: Fri Jun 13 13:34:55 2014 -0400 freedreno/a3xx: vtx formats Add support for more vertex buffer formats. Signed-off-by: Rob Clark robcl...@freedesktop.org (cherry picked from commit 06e9536e5f5f0cc280385bcf813ecdcf6573401b) Squashed with: freedreno: update generated headers Signed-off-by: Rob Clark robcl...@freedesktop.org (cherry picked from commit ba6a490bbc81380fdffcb080752682b7f38b95e6) --- src/gallium/drivers/freedreno/a2xx/a2xx.xml.h |8 +- src/gallium/drivers/freedreno/a3xx/a3xx.xml.h | 15 ++- src/gallium/drivers/freedreno/a3xx/fd3_emit.c |8 +- src/gallium/drivers/freedreno/a3xx/fd3_util.c | 134 +++-- src/gallium/drivers/freedreno/adreno_common.xml.h |8 +- src/gallium/drivers/freedreno/adreno_pm4.xml.h|8 +- 6 files changed, 102 insertions(+), 79 deletions(-) diff --git a/src/gallium/drivers/freedreno/a2xx/a2xx.xml.h b/src/gallium/drivers/freedreno/a2xx/a2xx.xml.h index 113fd00..d6ce26b 100644 --- a/src/gallium/drivers/freedreno/a2xx/a2xx.xml.h +++ b/src/gallium/drivers/freedreno/a2xx/a2xx.xml.h @@ -10,11 +10,11 @@ git clone https://github.com/freedreno/envytools.git The rules-ng-ng source files this header was generated from are: - /home/robclark/src/freedreno/envytools/rnndb/adreno.xml ( 364 bytes, from 2013-11-30 14:47:15) - /home/robclark/src/freedreno/envytools/rnndb/freedreno_copyright.xml ( 1453 bytes, from 2013-03-31 16:51:27) -- /home/robclark/src/freedreno/envytools/rnndb/adreno/a2xx.xml ( 32901 bytes, from 2014-05-21 20:40:21) -- /home/robclark/src/freedreno/envytools/rnndb/adreno/adreno_common.xml ( 9859 bytes, from 2014-05-21 20:39:42) +- /home/robclark/src/freedreno/envytools/rnndb/adreno/a2xx.xml ( 32901 bytes, from 2014-06-02 15:21:30) +- /home/robclark/src/freedreno/envytools/rnndb/adreno/adreno_common.xml ( 9859 bytes, from 2014-06-02 15:21:30) - /home/robclark/src/freedreno/envytools/rnndb/adreno/adreno_pm4.xml( 14477 bytes, from 2014-05-16 11:51:57) -- /home/robclark/src/freedreno/envytools/rnndb/adreno/a3xx.xml ( 57954 bytes, from 2014-05-26 12:57:46) -- /home/robclark/src/freedreno/envytools/rnndb/adreno/a4xx.xml ( 26602 bytes, from 2014-05-21 20:46:17) +- /home/robclark/src/freedreno/envytools/rnndb/adreno/a3xx.xml ( 58020 bytes, from 2014-06-13 17:29:47) +- /home/robclark/src/freedreno/envytools/rnndb/adreno/a4xx.xml ( 26602 bytes, from 2014-06-13 17:28:10) Copyright (C) 2013-2014 by the following authors: - Rob Clark robdcl...@gmail.com (robclark) diff --git a/src/gallium/drivers/freedreno/a3xx/a3xx.xml.h b/src/gallium/drivers/freedreno/a3xx/a3xx.xml.h index 92380eb..5878807 100644 --- a/src/gallium/drivers/freedreno/a3xx/a3xx.xml.h +++ b/src/gallium/drivers/freedreno/a3xx/a3xx.xml.h @@ -10,11 +10,11 @@ git clone https://github.com/freedreno/envytools.git The rules-ng-ng source files this header was generated from are: - /home/robclark/src/freedreno/envytools/rnndb/adreno.xml ( 364 bytes, from 2013-11-30 14:47:15) - /home/robclark/src/freedreno/envytools/rnndb/freedreno_copyright.xml ( 1453 bytes, from 2013-03-31 16:51:27) -- /home/robclark/src/freedreno/envytools/rnndb/adreno/a2xx.xml ( 32901 bytes, from 2014-05-21 20:40:21) -- /home/robclark/src/freedreno/envytools/rnndb/adreno/adreno_common.xml ( 9859 bytes, from 2014-05-21 20:39:42) +- /home/robclark/src/freedreno/envytools/rnndb/adreno/a2xx.xml ( 32901 bytes, from 2014-06-02 15:21:30) +- /home/robclark/src/freedreno/envytools/rnndb/adreno/adreno_common.xml ( 9859 bytes, from 2014-06-02 15:21:30) - /home/robclark/src/freedreno/envytools/rnndb/adreno/adreno_pm4.xml( 14477 bytes, from 2014-05-16 11:51:57) -- /home/robclark/src/freedreno/envytools/rnndb/adreno/a3xx.xml ( 57954 bytes, from 2014-05-26 12:57:46) -- /home/robclark/src/freedreno/envytools/rnndb/adreno/a4xx.xml ( 26602 bytes, from 2014-05-21 20:46:17) +- /home/robclark/src/freedreno/envytools/rnndb/adreno/a3xx.xml ( 58020 bytes, from 2014-06-13 17:29:47) +- /home/robclark/src/freedreno/envytools/rnndb/adreno/a4xx.xml ( 26602 bytes, from 2014-06-13 17:28:10) Copyright (C) 2013-2014 by the following authors: - Rob Clark robdcl...@gmail.com (robclark) @@ -988,6 +988,7 @@ static inline uint32_t A3XX_RB_COPY_CONTROL_MSAA_RESOLVE(enum a3xx_msaa_samples { return ((val) A3XX_RB_COPY_CONTROL_MSAA_RESOLVE__SHIFT) A3XX_RB_COPY_CONTROL_MSAA_RESOLVE__MASK; } +#define A3XX_RB_COPY_CONTROL_DEPTHCLEAR 0x0008 #define A3XX_RB_COPY_CONTROL_MODE__MASK 0x0070 #define
Mesa (10.2): freedreno/a3xx: fix depth/stencil GMEM positioning
Module: Mesa Branch: 10.2 Commit: 55b6821a9f1a330067ac035e663c574c660f2883 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=55b6821a9f1a330067ac035e663c574c660f2883 Author: Rob Clark robcl...@freedesktop.org Date: Tue May 20 18:49:09 2014 -0400 freedreno/a3xx: fix depth/stencil GMEM positioning In cases where there was no color buf bound, there were inconsistancies in register settings related to position of depth/stencil inside GMEM. Signed-off-by: Rob Clark robcl...@freedesktop.org (cherry picked from commit f3ba761129e39c299fe39fa91b542f459cad9f83) Squashed with: freedreno: update generated headers Signed-off-by: Rob Clark robcl...@freedesktop.org (cherry picked from commit 4da8267c36c30577dbcf9e4f89aef3a306e9c91d) --- src/gallium/drivers/freedreno/a2xx/a2xx.xml.h |2 +- src/gallium/drivers/freedreno/a3xx/a3xx.xml.h |4 +-- src/gallium/drivers/freedreno/a3xx/fd3_gmem.c | 30 - src/gallium/drivers/freedreno/adreno_common.xml.h |2 +- src/gallium/drivers/freedreno/adreno_pm4.xml.h|2 +- 5 files changed, 23 insertions(+), 17 deletions(-) diff --git a/src/gallium/drivers/freedreno/a2xx/a2xx.xml.h b/src/gallium/drivers/freedreno/a2xx/a2xx.xml.h index 5495728..2300c68 100644 --- a/src/gallium/drivers/freedreno/a2xx/a2xx.xml.h +++ b/src/gallium/drivers/freedreno/a2xx/a2xx.xml.h @@ -13,7 +13,7 @@ The rules-ng-ng source files this header was generated from are: - /home/robclark/src/freedreno/envytools/rnndb/adreno/a2xx.xml ( 32580 bytes, from 2014-05-16 11:51:57) - /home/robclark/src/freedreno/envytools/rnndb/adreno/adreno_common.xml ( 10186 bytes, from 2014-05-16 11:51:57) - /home/robclark/src/freedreno/envytools/rnndb/adreno/adreno_pm4.xml( 14477 bytes, from 2014-05-16 11:51:57) -- /home/robclark/src/freedreno/envytools/rnndb/adreno/a3xx.xml ( 57831 bytes, from 2014-05-19 21:02:34) +- /home/robclark/src/freedreno/envytools/rnndb/adreno/a3xx.xml ( 57830 bytes, from 2014-05-20 22:44:52) - /home/robclark/src/freedreno/envytools/rnndb/adreno/a4xx.xml ( 26293 bytes, from 2014-05-16 11:51:57) Copyright (C) 2013-2014 by the following authors: diff --git a/src/gallium/drivers/freedreno/a3xx/a3xx.xml.h b/src/gallium/drivers/freedreno/a3xx/a3xx.xml.h index 8934e21..b7f2561 100644 --- a/src/gallium/drivers/freedreno/a3xx/a3xx.xml.h +++ b/src/gallium/drivers/freedreno/a3xx/a3xx.xml.h @@ -13,7 +13,7 @@ The rules-ng-ng source files this header was generated from are: - /home/robclark/src/freedreno/envytools/rnndb/adreno/a2xx.xml ( 32580 bytes, from 2014-05-16 11:51:57) - /home/robclark/src/freedreno/envytools/rnndb/adreno/adreno_common.xml ( 10186 bytes, from 2014-05-16 11:51:57) - /home/robclark/src/freedreno/envytools/rnndb/adreno/adreno_pm4.xml( 14477 bytes, from 2014-05-16 11:51:57) -- /home/robclark/src/freedreno/envytools/rnndb/adreno/a3xx.xml ( 57831 bytes, from 2014-05-19 21:02:34) +- /home/robclark/src/freedreno/envytools/rnndb/adreno/a3xx.xml ( 57830 bytes, from 2014-05-20 22:44:52) - /home/robclark/src/freedreno/envytools/rnndb/adreno/a4xx.xml ( 26293 bytes, from 2014-05-16 11:51:57) Copyright (C) 2013-2014 by the following authors: @@ -1078,7 +1078,7 @@ static inline uint32_t A3XX_RB_DEPTH_INFO_DEPTH_FORMAT(enum adreno_rb_depth_form #define A3XX_RB_DEPTH_INFO_DEPTH_BASE__SHIFT 11 static inline uint32_t A3XX_RB_DEPTH_INFO_DEPTH_BASE(uint32_t val) { - return ((val 10) A3XX_RB_DEPTH_INFO_DEPTH_BASE__SHIFT) A3XX_RB_DEPTH_INFO_DEPTH_BASE__MASK; + return ((val 12) A3XX_RB_DEPTH_INFO_DEPTH_BASE__SHIFT) A3XX_RB_DEPTH_INFO_DEPTH_BASE__MASK; } #define REG_A3XX_RB_DEPTH_PITCH 0x2103 diff --git a/src/gallium/drivers/freedreno/a3xx/fd3_gmem.c b/src/gallium/drivers/freedreno/a3xx/fd3_gmem.c index f11731f..7db049f 100644 --- a/src/gallium/drivers/freedreno/a3xx/fd3_gmem.c +++ b/src/gallium/drivers/freedreno/a3xx/fd3_gmem.c @@ -106,9 +106,17 @@ emit_mrt(struct fd_ringbuffer *ring, unsigned nr_bufs, } static uint32_t -depth_base(struct fd_gmem_stateobj *gmem) +depth_base(struct fd_context *ctx) { - return align(gmem-bin_w * gmem-bin_h, 0x4000); + struct fd_gmem_stateobj *gmem = ctx-gmem; + struct pipe_framebuffer_state *pfb = ctx-framebuffer; + uint32_t cpp = 4; + if (pfb-cbufs[0]) { + struct fd_resource *rsc = + fd_resource(pfb-cbufs[0]-texture); + cpp = rsc-cpp; + } + return align(gmem-bin_w * gmem-bin_h * cpp, 0x4000); } static bool @@ -399,12 +407,7 @@ fd3_emit_tile_gmem2mem(struct fd_context *ctx, struct fd_tile *tile) }}, 1); if (ctx-resolve (FD_BUFFER_DEPTH | FD_BUFFER_STENCIL)) { - uint32_t base = 0; - if (pfb-cbufs[0]) { - struct fd_resource
Mesa (10.2): freedreno/a3xx: fix blend opcode
Module: Mesa Branch: 10.2 Commit: 8b2d1068b5f0e4b3c1bf5dce05b64bef7f63e425 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=8b2d1068b5f0e4b3c1bf5dce05b64bef7f63e425 Author: Rob Clark robcl...@freedesktop.org Date: Wed May 21 16:51:12 2014 -0400 freedreno/a3xx: fix blend opcode Seems the opcodes are slightly different from a2xx. Resync headers and move blend_func() helper into hw generation specific code. Signed-off-by: Rob Clark robcl...@freedesktop.org (cherry picked from commit a4d229b0992806f759ab4c71fc5712e8ab2e1c9d) --- src/gallium/drivers/freedreno/a2xx/a2xx.xml.h | 21 - src/gallium/drivers/freedreno/a2xx/fd2_blend.c| 25 +++-- src/gallium/drivers/freedreno/a3xx/a3xx.xml.h | 20 - src/gallium/drivers/freedreno/a3xx/fd3_blend.c| 25 +++-- src/gallium/drivers/freedreno/adreno_common.xml.h | 17 -- src/gallium/drivers/freedreno/adreno_pm4.xml.h|8 +++ src/gallium/drivers/freedreno/freedreno_util.c| 20 - src/gallium/drivers/freedreno/freedreno_util.h|1 - 8 files changed, 83 insertions(+), 54 deletions(-) diff --git a/src/gallium/drivers/freedreno/a2xx/a2xx.xml.h b/src/gallium/drivers/freedreno/a2xx/a2xx.xml.h index 2300c68..cd55c9f 100644 --- a/src/gallium/drivers/freedreno/a2xx/a2xx.xml.h +++ b/src/gallium/drivers/freedreno/a2xx/a2xx.xml.h @@ -10,11 +10,11 @@ git clone https://github.com/freedreno/envytools.git The rules-ng-ng source files this header was generated from are: - /home/robclark/src/freedreno/envytools/rnndb/adreno.xml ( 364 bytes, from 2013-11-30 14:47:15) - /home/robclark/src/freedreno/envytools/rnndb/freedreno_copyright.xml ( 1453 bytes, from 2013-03-31 16:51:27) -- /home/robclark/src/freedreno/envytools/rnndb/adreno/a2xx.xml ( 32580 bytes, from 2014-05-16 11:51:57) -- /home/robclark/src/freedreno/envytools/rnndb/adreno/adreno_common.xml ( 10186 bytes, from 2014-05-16 11:51:57) +- /home/robclark/src/freedreno/envytools/rnndb/adreno/a2xx.xml ( 32901 bytes, from 2014-05-21 20:40:21) +- /home/robclark/src/freedreno/envytools/rnndb/adreno/adreno_common.xml ( 9859 bytes, from 2014-05-21 20:39:42) - /home/robclark/src/freedreno/envytools/rnndb/adreno/adreno_pm4.xml( 14477 bytes, from 2014-05-16 11:51:57) -- /home/robclark/src/freedreno/envytools/rnndb/adreno/a3xx.xml ( 57830 bytes, from 2014-05-20 22:44:52) -- /home/robclark/src/freedreno/envytools/rnndb/adreno/a4xx.xml ( 26293 bytes, from 2014-05-16 11:51:57) +- /home/robclark/src/freedreno/envytools/rnndb/adreno/a3xx.xml ( 57856 bytes, from 2014-05-21 20:43:33) +- /home/robclark/src/freedreno/envytools/rnndb/adreno/a4xx.xml ( 26602 bytes, from 2014-05-21 20:46:17) Copyright (C) 2013-2014 by the following authors: - Rob Clark robdcl...@gmail.com (robclark) @@ -203,6 +203,15 @@ enum a2xx_rb_copy_sample_select { SAMPLE_0123 = 6, }; +enum a2xx_rb_blend_opcode { + BLEND_DST_PLUS_SRC = 0, + BLEND_SRC_MINUS_DST = 1, + BLEND_MIN_DST_SRC = 2, + BLEND_MAX_DST_SRC = 3, + BLEND_DST_MINUS_SRC = 4, + BLEND_DST_PLUS_SRC_BIAS = 5, +}; + enum adreno_mmu_clnt_beh { BEH_NEVR = 0, BEH_TRAN_RNG = 1, @@ -996,7 +1005,7 @@ static inline uint32_t A2XX_RB_BLEND_CONTROL_COLOR_SRCBLEND(enum adreno_rb_blend } #define A2XX_RB_BLEND_CONTROL_COLOR_COMB_FCN__MASK 0x00e0 #define A2XX_RB_BLEND_CONTROL_COLOR_COMB_FCN__SHIFT5 -static inline uint32_t A2XX_RB_BLEND_CONTROL_COLOR_COMB_FCN(enum adreno_rb_blend_opcode val) +static inline uint32_t A2XX_RB_BLEND_CONTROL_COLOR_COMB_FCN(enum a2xx_rb_blend_opcode val) { return ((val) A2XX_RB_BLEND_CONTROL_COLOR_COMB_FCN__SHIFT) A2XX_RB_BLEND_CONTROL_COLOR_COMB_FCN__MASK; } @@ -1014,7 +1023,7 @@ static inline uint32_t A2XX_RB_BLEND_CONTROL_ALPHA_SRCBLEND(enum adreno_rb_blend } #define A2XX_RB_BLEND_CONTROL_ALPHA_COMB_FCN__MASK 0x00e0 #define A2XX_RB_BLEND_CONTROL_ALPHA_COMB_FCN__SHIFT21 -static inline uint32_t A2XX_RB_BLEND_CONTROL_ALPHA_COMB_FCN(enum adreno_rb_blend_opcode val) +static inline uint32_t A2XX_RB_BLEND_CONTROL_ALPHA_COMB_FCN(enum a2xx_rb_blend_opcode val) { return ((val) A2XX_RB_BLEND_CONTROL_ALPHA_COMB_FCN__SHIFT) A2XX_RB_BLEND_CONTROL_ALPHA_COMB_FCN__MASK; } diff --git a/src/gallium/drivers/freedreno/a2xx/fd2_blend.c b/src/gallium/drivers/freedreno/a2xx/fd2_blend.c index d0b324d..b3cb239 100644 --- a/src/gallium/drivers/freedreno/a2xx/fd2_blend.c +++ b/src/gallium/drivers/freedreno/a2xx/fd2_blend.c @@ -34,6 +34,27 @@ #include fd2_context.h #include fd2_util.h + +static enum a2xx_rb_blend_opcode +blend_func(unsigned func) +{ + switch (func) { + case PIPE_BLEND_ADD: + return BLEND_DST_PLUS_SRC; + case PIPE_BLEND_MIN: + return BLEND_MIN_DST_SRC; +
Mesa (10.2): freedreno/a3xx: texture fixes
Module: Mesa Branch: 10.2 Commit: 8f77fbb6af25d62a63114512a5b0161693df9023 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=8f77fbb6af25d62a63114512a5b0161693df9023 Author: Rob Clark robcl...@freedesktop.org Date: Mon May 26 08:58:17 2014 -0400 freedreno/a3xx: texture fixes Signed-off-by: Rob Clark robcl...@freedesktop.org (cherry picked from commit aa78c4586d42856dcc86b143c2e72c05a1422016) Squashed with: freedreno: update generated headers Signed-off-by: Rob Clark robcl...@freedesktop.org (cherry picked from commit 2456be63e9cdc3c811a799caf51a56871ff6119c) --- src/gallium/drivers/freedreno/a2xx/a2xx.xml.h |2 +- src/gallium/drivers/freedreno/a3xx/a3xx.xml.h |6 -- src/gallium/drivers/freedreno/a3xx/fd3_texture.c |4 +++- src/gallium/drivers/freedreno/adreno_common.xml.h |2 +- src/gallium/drivers/freedreno/adreno_pm4.xml.h|2 +- 5 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/gallium/drivers/freedreno/a2xx/a2xx.xml.h b/src/gallium/drivers/freedreno/a2xx/a2xx.xml.h index cd55c9f..113fd00 100644 --- a/src/gallium/drivers/freedreno/a2xx/a2xx.xml.h +++ b/src/gallium/drivers/freedreno/a2xx/a2xx.xml.h @@ -13,7 +13,7 @@ The rules-ng-ng source files this header was generated from are: - /home/robclark/src/freedreno/envytools/rnndb/adreno/a2xx.xml ( 32901 bytes, from 2014-05-21 20:40:21) - /home/robclark/src/freedreno/envytools/rnndb/adreno/adreno_common.xml ( 9859 bytes, from 2014-05-21 20:39:42) - /home/robclark/src/freedreno/envytools/rnndb/adreno/adreno_pm4.xml( 14477 bytes, from 2014-05-16 11:51:57) -- /home/robclark/src/freedreno/envytools/rnndb/adreno/a3xx.xml ( 57856 bytes, from 2014-05-21 20:43:33) +- /home/robclark/src/freedreno/envytools/rnndb/adreno/a3xx.xml ( 57954 bytes, from 2014-05-26 12:57:46) - /home/robclark/src/freedreno/envytools/rnndb/adreno/a4xx.xml ( 26602 bytes, from 2014-05-21 20:46:17) Copyright (C) 2013-2014 by the following authors: diff --git a/src/gallium/drivers/freedreno/a3xx/a3xx.xml.h b/src/gallium/drivers/freedreno/a3xx/a3xx.xml.h index 6d9e657..92380eb 100644 --- a/src/gallium/drivers/freedreno/a3xx/a3xx.xml.h +++ b/src/gallium/drivers/freedreno/a3xx/a3xx.xml.h @@ -13,7 +13,7 @@ The rules-ng-ng source files this header was generated from are: - /home/robclark/src/freedreno/envytools/rnndb/adreno/a2xx.xml ( 32901 bytes, from 2014-05-21 20:40:21) - /home/robclark/src/freedreno/envytools/rnndb/adreno/adreno_common.xml ( 9859 bytes, from 2014-05-21 20:39:42) - /home/robclark/src/freedreno/envytools/rnndb/adreno/adreno_pm4.xml( 14477 bytes, from 2014-05-16 11:51:57) -- /home/robclark/src/freedreno/envytools/rnndb/adreno/a3xx.xml ( 57856 bytes, from 2014-05-21 20:43:33) +- /home/robclark/src/freedreno/envytools/rnndb/adreno/a3xx.xml ( 57954 bytes, from 2014-05-26 12:57:46) - /home/robclark/src/freedreno/envytools/rnndb/adreno/a4xx.xml ( 26602 bytes, from 2014-05-21 20:46:17) Copyright (C) 2013-2014 by the following authors: @@ -197,13 +197,15 @@ enum a3xx_rb_blend_opcode { enum a3xx_tex_filter { A3XX_TEX_NEAREST = 0, A3XX_TEX_LINEAR = 1, + A3XX_TEX_ANISO = 2, }; enum a3xx_tex_clamp { A3XX_TEX_REPEAT = 0, A3XX_TEX_CLAMP_TO_EDGE = 1, A3XX_TEX_MIRROR_REPEAT = 2, - A3XX_TEX_CLAMP_NONE = 3, + A3XX_TEX_CLAMP_TO_BORDER = 3, + A3XX_TEX_MIRROR_CLAMP = 4, }; enum a3xx_tex_swiz { diff --git a/src/gallium/drivers/freedreno/a3xx/fd3_texture.c b/src/gallium/drivers/freedreno/a3xx/fd3_texture.c index 2081775..f28919f 100644 --- a/src/gallium/drivers/freedreno/a3xx/fd3_texture.c +++ b/src/gallium/drivers/freedreno/a3xx/fd3_texture.c @@ -48,12 +48,14 @@ tex_clamp(unsigned wrap) case PIPE_TEX_WRAP_REPEAT: return A3XX_TEX_REPEAT; case PIPE_TEX_WRAP_CLAMP: - case PIPE_TEX_WRAP_CLAMP_TO_BORDER: case PIPE_TEX_WRAP_CLAMP_TO_EDGE: return A3XX_TEX_CLAMP_TO_EDGE; + case PIPE_TEX_WRAP_CLAMP_TO_BORDER: + return A3XX_TEX_CLAMP_TO_BORDER; case PIPE_TEX_WRAP_MIRROR_CLAMP: case PIPE_TEX_WRAP_MIRROR_CLAMP_TO_BORDER: case PIPE_TEX_WRAP_MIRROR_CLAMP_TO_EDGE: + return A3XX_TEX_MIRROR_CLAMP; case PIPE_TEX_WRAP_MIRROR_REPEAT: return A3XX_TEX_MIRROR_REPEAT; default: diff --git a/src/gallium/drivers/freedreno/adreno_common.xml.h b/src/gallium/drivers/freedreno/adreno_common.xml.h index 37b7e44..c06bec0 100644 --- a/src/gallium/drivers/freedreno/adreno_common.xml.h +++ b/src/gallium/drivers/freedreno/adreno_common.xml.h @@ -13,7 +13,7 @@ The rules-ng-ng source files this header was generated from are: - /home/robclark/src/freedreno/envytools/rnndb/adreno/a2xx.xml ( 32901 bytes, from 2014-05-21 20:40:21) - /home/robclark/src/freedreno/envytools/rnndb/adreno/adreno_common.xml ( 9859
Mesa (10.2): freedreno: fix for null textures
Module: Mesa Branch: 10.2 Commit: b20c82f74c44941368c681fb118338a29c2b1ea5 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=b20c82f74c44941368c681fb118338a29c2b1ea5 Author: Rob Clark robcl...@freedesktop.org Date: Mon Jun 9 13:34:07 2014 -0400 freedreno: fix for null textures Some apps seem to give us a null sampler/view for texture slots which come before the last used texture slot. In particular 0ad triggers this. Signed-off-by: Rob Clark robcl...@freedesktop.org (cherry picked from commit 6aeeb706d218be030b39e431e53ec07edb974564) --- src/gallium/drivers/freedreno/a3xx/fd3_emit.c | 12 src/gallium/drivers/freedreno/freedreno_texture.c |4 ++-- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/gallium/drivers/freedreno/a3xx/fd3_emit.c b/src/gallium/drivers/freedreno/a3xx/fd3_emit.c index c78d5e8..4c6b5c1 100644 --- a/src/gallium/drivers/freedreno/a3xx/fd3_emit.c +++ b/src/gallium/drivers/freedreno/a3xx/fd3_emit.c @@ -195,8 +195,10 @@ emit_textures(struct fd_ringbuffer *ring, OUT_RING(ring, CP_LOAD_STATE_1_STATE_TYPE(ST_CONSTANTS) | CP_LOAD_STATE_1_EXT_SRC_ADDR(0)); for (i = 0; i tex-num_textures; i++) { - struct fd3_pipe_sampler_view *view = - fd3_pipe_sampler_view(tex-textures[i]); + static const struct fd3_pipe_sampler_view dummy_view = {}; + const struct fd3_pipe_sampler_view *view = tex-textures[i] ? + fd3_pipe_sampler_view(tex-textures[i]) : + dummy_view; OUT_RING(ring, view-texconst0); OUT_RING(ring, view-texconst1); OUT_RING(ring, view-texconst2 | @@ -213,8 +215,10 @@ emit_textures(struct fd_ringbuffer *ring, OUT_RING(ring, CP_LOAD_STATE_1_STATE_TYPE(ST_CONSTANTS) | CP_LOAD_STATE_1_EXT_SRC_ADDR(0)); for (i = 0; i tex-num_textures; i++) { - struct fd3_pipe_sampler_view *view = - fd3_pipe_sampler_view(tex-textures[i]); + static const struct fd3_pipe_sampler_view dummy_view = {}; + const struct fd3_pipe_sampler_view *view = tex-textures[i] ? + fd3_pipe_sampler_view(tex-textures[i]) : + dummy_view; struct fd_resource *rsc = view-tex_resource; for (j = 0; j view-mipaddrs; j++) { diff --git a/src/gallium/drivers/freedreno/freedreno_texture.c b/src/gallium/drivers/freedreno/freedreno_texture.c index 8fb9419..212e506 100644 --- a/src/gallium/drivers/freedreno/freedreno_texture.c +++ b/src/gallium/drivers/freedreno/freedreno_texture.c @@ -57,7 +57,7 @@ static void bind_sampler_states(struct fd_texture_stateobj *prog, for (i = 0; i nr; i++) { if (hwcso[i]) - new_nr++; + new_nr = i + 1; prog-samplers[i] = hwcso[i]; prog-dirty_samplers |= (1 i); } @@ -78,7 +78,7 @@ static void set_sampler_views(struct fd_texture_stateobj *prog, for (i = 0; i nr; i++) { if (views[i]) - new_nr++; + new_nr = i + 1; pipe_sampler_view_reference(prog-textures[i], views[i]); prog-dirty_samplers |= (1 i); } ___ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit
Mesa (10.2): freedreno: few caps fixes
Module: Mesa Branch: 10.2 Commit: afcb63802f733199b36f736b7f622615df4a4654 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=afcb63802f733199b36f736b7f622615df4a4654 Author: Rob Clark robcl...@freedesktop.org Date: Sat May 24 10:07:13 2014 -0400 freedreno: few caps fixes Signed-off-by: Rob Clark robcl...@freedesktop.org (cherry picked from commit 286863939f9b0896db1b382c967d0d92b14729c9) --- src/gallium/drivers/freedreno/freedreno_resource.c |4 src/gallium/drivers/freedreno/freedreno_screen.c |8 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/gallium/drivers/freedreno/freedreno_resource.c b/src/gallium/drivers/freedreno/freedreno_resource.c index 289f365..ebc134a 100644 --- a/src/gallium/drivers/freedreno/freedreno_resource.c +++ b/src/gallium/drivers/freedreno/freedreno_resource.c @@ -48,6 +48,10 @@ realloc_bo(struct fd_resource *rsc, uint32_t size) uint32_t flags = DRM_FREEDRENO_GEM_CACHE_WCOMBINE | DRM_FREEDRENO_GEM_TYPE_KMEM; /* TODO */ + /* if we start using things other than write-combine, +* be sure to check for PIPE_RESOURCE_FLAG_MAP_COHERENT +*/ + if (rsc-bo) fd_bo_del(rsc-bo); diff --git a/src/gallium/drivers/freedreno/freedreno_screen.c b/src/gallium/drivers/freedreno/freedreno_screen.c index 1c10689..332501e 100644 --- a/src/gallium/drivers/freedreno/freedreno_screen.c +++ b/src/gallium/drivers/freedreno/freedreno_screen.c @@ -161,9 +161,7 @@ fd_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param) case PIPE_CAP_MIXED_COLORBUFFER_FORMATS: case PIPE_CAP_TGSI_FS_COORD_ORIGIN_UPPER_LEFT: case PIPE_CAP_TGSI_FS_COORD_PIXEL_CENTER_HALF_INTEGER: - case PIPE_CAP_SM3: case PIPE_CAP_SEAMLESS_CUBE_MAP: - case PIPE_CAP_TEXTURE_BARRIER: case PIPE_CAP_VERTEX_COLOR_UNCLAMPED: case PIPE_CAP_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION: case PIPE_CAP_TGSI_INSTANCEID: @@ -173,8 +171,8 @@ fd_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param) case PIPE_CAP_COMPUTE: case PIPE_CAP_START_INSTANCE: case PIPE_CAP_MAX_DUAL_SOURCE_RENDER_TARGETS: - case PIPE_CAP_TEXTURE_MULTISAMPLE: case PIPE_CAP_USER_CONSTANT_BUFFERS: + case PIPE_CAP_BUFFER_MAP_PERSISTENT_COHERENT: return 1; case PIPE_CAP_SHADER_STENCIL_EXPORT: @@ -182,6 +180,9 @@ fd_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param) case PIPE_CAP_PREFER_BLIT_BASED_TEXTURE_TRANSFER: case PIPE_CAP_CONDITIONAL_RENDER: case PIPE_CAP_PRIMITIVE_RESTART: + case PIPE_CAP_TEXTURE_MULTISAMPLE: + case PIPE_CAP_TEXTURE_BARRIER: + case PIPE_CAP_SM3: return 0; case PIPE_CAP_CONSTANT_BUFFER_OFFSET_ALIGNMENT: @@ -207,7 +208,6 @@ fd_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param) case PIPE_CAP_TGSI_VS_LAYER: case PIPE_CAP_MAX_TEXTURE_GATHER_COMPONENTS: case PIPE_CAP_TEXTURE_GATHER_SM5: -case PIPE_CAP_BUFFER_MAP_PERSISTENT_COHERENT: case PIPE_CAP_FAKE_SW_MSAA: case PIPE_CAP_TEXTURE_QUERY_LOD: case PIPE_CAP_SAMPLE_SHADING: ___ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit
Mesa (10.2): docs: Add release notes for the 10.2.3 release.
Module: Mesa Branch: 10.2 Commit: 33cb9f9503cc57c341da8ecec6c16c33fd4f0ae5 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=33cb9f9503cc57c341da8ecec6c16c33fd4f0ae5 Author: Carl Worth cwo...@cworth.org Date: Mon Jul 7 16:12:42 2014 -0700 docs: Add release notes for the 10.2.3 release. Which is imminent. --- VERSION |2 +- docs/relnotes/10.2.3.html | 127 + 2 files changed, 128 insertions(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 68e8fce..ea657e0 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -10.2.2 +10.2.3 diff --git a/docs/relnotes/10.2.3.html b/docs/relnotes/10.2.3.html new file mode 100644 index 000..205b491 --- /dev/null +++ b/docs/relnotes/10.2.3.html @@ -0,0 +1,127 @@ +!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN http://www.w3.org/TR/html4/loose.dtd; +html lang=en +head + meta http-equiv=content-type content=text/html; charset=utf-8 + titleMesa Release Notes/title + link rel=stylesheet type=text/css href=../mesa.css +/head +body + +div class=header + h1The Mesa 3D Graphics Library/h1 +/div + +iframe src=../contents.html/iframe +div class=content + +h1Mesa 10.2.3 Release Notes / July 7, 2014/h1 + +p +Mesa 10.2.3 is a bug fix release which fixes bugs found since the 10.2.2 release. +/p +p +Mesa 10.2.3 implements the OpenGL 3.3 API, but the version reported by +glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) / +glGetIntegerv(GL_MINOR_VERSION) depends on the particular driver being used. +Some drivers don't support all the features required in OpenGL 3.3. OpenGL +3.3 is strongonly/strong available if requested at context creation +because compatibility contexts are not supported. +/p + + +h2SHA256 checksums/h2 +pre +/pre + + +h2New features/h2 +pNone/p + +h2Bug fixes/h2 + +pThis list is likely incomplete./p + +ul + +lia href=https://bugs.freedesktop.org/show_bug.cgi?id=76223;Bug 76223/a - /li + +lia href=https://bugs.freedesktop.org/show_bug.cgi?id=79823;Bug 79823/a - /li + +lia href=https://bugs.freedesktop.org/show_bug.cgi?id=80015;Bug 80015/a - /li + +/ul + +h2Changes/h2 + +pAaron Watry (1):/p +ul + liradeon/llvm: Allocate space for kernel metadata operands/li +/ul + +pCarl Worth (2):/p +ul + lidocs: Add sha256 sums for the 10.2.2 release/li + licherry-ignore: Add a patch that's been rejected/li +/ul + +pIlia Mirkin (4):/p +ul + linouveau: dup fd before passing it to device/li + linv50: disable dedicated ubo upload method/li + linv50: do an explicit flush on draw when there are persistent buffers/li + linvc0: add a memory barrier when there are persistent UBOs/li +/ul + +pJasper St. Pierre (1):/p +ul + liglxext: Send the Drawable's ID in the GLX_BufferSwapComplete event/li +/ul + +pKenneth Graunke (3):/p +ul + lii965: Don't emit SURFACE_STATEs for gather workarounds on Broadwell./li + lii965: Include marketing names for Broadwell GPUs./li + lii965/disasm: Fix INTEL_DEBUG=fs on Broadwell for ARB_fp applications./li +/ul + +pMichel Dänzer (1):/p +ul + liradeon/llvm: Use the llvm.rsq.clamped intrinsic for RSQ/li +/ul + +pRob Clark (9):/p +ul + lixa: fix segfault/li + lifreedreno: use OUT_RELOCW when buffer is written/li + lifreedreno/a3xx: fix depth/stencil GMEM positioning/li + lifreedreno/a3xx: fix depth/stencil gmem restore/li + lifreedreno/a3xx: fix blend opcode/li + lifreedreno: few caps fixes/li + lifreedreno/a3xx: texture fixes/li + lifreedreno: fix for null textures/li + lifreedreno/a3xx: vtx formats/li +/ul + +pRoland Scheidegger (1):/p +ul + lidraw: (trivial) fix clamping of viewport index/li +/ul + +pTakashi Iwai (1):/p +ul + lillvmpipe: Fix zero-division in llvmpipe_texture_layout()/li +/ul + +pThomas Hellstrom (1):/p +ul + list/xa: Don't close the drm fd on failure v2/li +/ul + +pTobias Klausmann (1):/p +ul + linv50/ir: allow gl_ViewportIndex to work on non-provoking vertices/li +/ul + +/div +/body +/html ___ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit
Mesa (10.2): docs: Add sha256 checksums for the 10.2.3 release
Module: Mesa Branch: 10.2 Commit: d00d73d1e1547c8e8558c86dd8f8ab45465c1087 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=d00d73d1e1547c8e8558c86dd8f8ab45465c1087 Author: Carl Worth cwo...@cworth.org Date: Mon Jul 7 16:17:21 2014 -0700 docs: Add sha256 checksums for the 10.2.3 release This was not possible until the previous commit was complete, used for building archives, and then tagged. --- docs/relnotes/10.2.3.html |3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/relnotes/10.2.3.html b/docs/relnotes/10.2.3.html index 205b491..a478228 100644 --- a/docs/relnotes/10.2.3.html +++ b/docs/relnotes/10.2.3.html @@ -31,6 +31,9 @@ because compatibility contexts are not supported. h2SHA256 checksums/h2 pre +e482a96170c98b17d6aba0d6e4dda4b9a2e61c39587bb64ac38cadfa4aba4aeb MesaLib-10.2.3.tar.bz2 +96cffacaa1c52ae659b3b0f91be2eebf5528b748934256751261fb79ea3d6636 MesaLib-10.2.3.tar.gz +82cab6ff14c8038ee39842dbdea0d447a78d119efd8d702d1497bc7c246434e9 MesaLib-10.2.3.zip /pre ___ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit
Mesa: tag mesa-10.2.3: Mesa 10.2.3 release
Module: Mesa Branch: refs/tags/mesa-10.2.3 Tag:b43036b0c5cebffac12cad414faf5b3dd8845118 URL: http://cgit.freedesktop.org/mesa/mesa/tag/?id=b43036b0c5cebffac12cad414faf5b3dd8845118 Tagger: Carl Worth cwo...@cworth.org Date: Mon Jul 7 16:16:55 2014 -0700 Mesa 10.2.3 release ___ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit
Mesa (master): docs: Import 10.2.3 release notes
Module: Mesa Branch: master Commit: 9007c4f9f437498c94d5c9518e3a2d3c567f859e URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=9007c4f9f437498c94d5c9518e3a2d3c567f859e Author: Carl Worth cwo...@cworth.org Date: Mon Jul 7 16:28:37 2014 -0700 docs: Import 10.2.3 release notes And add a news item. --- docs/index.html |6 +++ docs/relnotes.html|1 + docs/relnotes/10.2.3.html | 130 + 3 files changed, 137 insertions(+) diff --git a/docs/index.html b/docs/index.html index dcdf2d3..d3882f0 100644 --- a/docs/index.html +++ b/docs/index.html @@ -16,6 +16,12 @@ h1News/h1 +h2July 7, 2014/h2 +p +a href=relnotes/10.2.3.htmlMesa 10.2.3/a is released. +This is a bug-fix release. +/p + h2July 5, 2014/h2 p diff --git a/docs/relnotes.html b/docs/relnotes.html index 67c1955..ba88d1a 100644 --- a/docs/relnotes.html +++ b/docs/relnotes.html @@ -21,6 +21,7 @@ The release notes summarize what's new or changed in each Mesa release. /p ul +lia href=relnotes/10.2.3.html10.2.3 release notes/a lia href=relnotes/10.2.2.html10.2.2 release notes/a lia href=relnotes/10.2.1.html10.2.1 release notes/a lia href=relnotes/10.2.html10.2 release notes/a diff --git a/docs/relnotes/10.2.3.html b/docs/relnotes/10.2.3.html new file mode 100644 index 000..a478228 --- /dev/null +++ b/docs/relnotes/10.2.3.html @@ -0,0 +1,130 @@ +!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN http://www.w3.org/TR/html4/loose.dtd; +html lang=en +head + meta http-equiv=content-type content=text/html; charset=utf-8 + titleMesa Release Notes/title + link rel=stylesheet type=text/css href=../mesa.css +/head +body + +div class=header + h1The Mesa 3D Graphics Library/h1 +/div + +iframe src=../contents.html/iframe +div class=content + +h1Mesa 10.2.3 Release Notes / July 7, 2014/h1 + +p +Mesa 10.2.3 is a bug fix release which fixes bugs found since the 10.2.2 release. +/p +p +Mesa 10.2.3 implements the OpenGL 3.3 API, but the version reported by +glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) / +glGetIntegerv(GL_MINOR_VERSION) depends on the particular driver being used. +Some drivers don't support all the features required in OpenGL 3.3. OpenGL +3.3 is strongonly/strong available if requested at context creation +because compatibility contexts are not supported. +/p + + +h2SHA256 checksums/h2 +pre +e482a96170c98b17d6aba0d6e4dda4b9a2e61c39587bb64ac38cadfa4aba4aeb MesaLib-10.2.3.tar.bz2 +96cffacaa1c52ae659b3b0f91be2eebf5528b748934256751261fb79ea3d6636 MesaLib-10.2.3.tar.gz +82cab6ff14c8038ee39842dbdea0d447a78d119efd8d702d1497bc7c246434e9 MesaLib-10.2.3.zip +/pre + + +h2New features/h2 +pNone/p + +h2Bug fixes/h2 + +pThis list is likely incomplete./p + +ul + +lia href=https://bugs.freedesktop.org/show_bug.cgi?id=76223;Bug 76223/a - /li + +lia href=https://bugs.freedesktop.org/show_bug.cgi?id=79823;Bug 79823/a - /li + +lia href=https://bugs.freedesktop.org/show_bug.cgi?id=80015;Bug 80015/a - /li + +/ul + +h2Changes/h2 + +pAaron Watry (1):/p +ul + liradeon/llvm: Allocate space for kernel metadata operands/li +/ul + +pCarl Worth (2):/p +ul + lidocs: Add sha256 sums for the 10.2.2 release/li + licherry-ignore: Add a patch that's been rejected/li +/ul + +pIlia Mirkin (4):/p +ul + linouveau: dup fd before passing it to device/li + linv50: disable dedicated ubo upload method/li + linv50: do an explicit flush on draw when there are persistent buffers/li + linvc0: add a memory barrier when there are persistent UBOs/li +/ul + +pJasper St. Pierre (1):/p +ul + liglxext: Send the Drawable's ID in the GLX_BufferSwapComplete event/li +/ul + +pKenneth Graunke (3):/p +ul + lii965: Don't emit SURFACE_STATEs for gather workarounds on Broadwell./li + lii965: Include marketing names for Broadwell GPUs./li + lii965/disasm: Fix INTEL_DEBUG=fs on Broadwell for ARB_fp applications./li +/ul + +pMichel Dänzer (1):/p +ul + liradeon/llvm: Use the llvm.rsq.clamped intrinsic for RSQ/li +/ul + +pRob Clark (9):/p +ul + lixa: fix segfault/li + lifreedreno: use OUT_RELOCW when buffer is written/li + lifreedreno/a3xx: fix depth/stencil GMEM positioning/li + lifreedreno/a3xx: fix depth/stencil gmem restore/li + lifreedreno/a3xx: fix blend opcode/li + lifreedreno: few caps fixes/li + lifreedreno/a3xx: texture fixes/li + lifreedreno: fix for null textures/li + lifreedreno/a3xx: vtx formats/li +/ul + +pRoland Scheidegger (1):/p +ul + lidraw: (trivial) fix clamping of viewport index/li +/ul + +pTakashi Iwai (1):/p +ul + lillvmpipe: Fix zero-division in llvmpipe_texture_layout()/li +/ul + +pThomas Hellstrom (1):/p +ul + list/xa: Don't close the drm fd on failure v2/li +/ul + +pTobias Klausmann (1):/p +ul + linv50/ir: allow gl_ViewportIndex to work on non-provoking vertices/li +/ul + +/div +/body +/html ___ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman
Mesa (10.2): nv50/ir: allow gl_ViewportIndex to work on non-provoking vertices
Module: Mesa Branch: 10.2 Commit: bcff69f18f9f7751aa998e08245d3f0ef8e45151 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=bcff69f18f9f7751aa998e08245d3f0ef8e45151 Author: Tobias Klausmann tobias.johannes.klausm...@mni.thm.de Date: Mon Jun 23 23:01:42 2014 +0200 nv50/ir: allow gl_ViewportIndex to work on non-provoking vertices Previously, if we had something like: gl_ViewportIndex = idx; for(int i = 0; i gl_in.length(); i++) { gl_Position = gl_in[i].gl_Position; EmitVertex(); } EndPrimitive(); The right viewport index would not be set on the primitive because the last vertex is the provoking one. However blob drivers appear to move the gl_ViewportIndex write into the for loop, allowing the application to be ignorant of this detail. While the application is technically wrong here, because the blob does it and other drivers appear to implicitly work this way as well, we add a buffer register that viewport index writes go into, which is then exported before every EmitVertex() call. This fixes the remaining piglit tests in ARB_viewport_array for nv50/nvc0. Signed-off-by: Tobias Klausmann tobias.johannes.klausm...@mni.thm.de Cc: 10.2 mesa-sta...@lists.freedesktop.org Reviewed-by: Ilia Mirkin imir...@alum.mit.edu (cherry picked from commit 98a86f61a8d17eaafaf5907debc7735aa20610d5) --- .../drivers/nouveau/codegen/nv50_ir_driver.h |1 + .../drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp | 31 ++-- 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_driver.h b/src/gallium/drivers/nouveau/codegen/nv50_ir_driver.h index d7a9c2c..ee967e1 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_driver.h +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_driver.h @@ -177,6 +177,7 @@ struct nv50_ir_prog_info uint8_t vertexId; /* system value index of VertexID */ uint8_t edgeFlagIn; uint8_t edgeFlagOut; + int8_t viewportId; /* output index of ViewportIndex */ uint8_t fragDepth; /* output index of FragDepth */ uint8_t sampleMask;/* output index of SampleMask */ boolean sampleInterp; /* perform sample interp on all fp inputs */ diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp index a0f1fe1..2ba3c1c 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp @@ -790,6 +790,8 @@ bool Source::scanSource() info-prop.gp.instanceCount = 1; // default value } + info-io.viewportId = -1; + info-immd.data = (uint32_t *)MALLOC(scan.immediate_count * 16); info-immd.type = (ubyte *)MALLOC(scan.immediate_count * sizeof(ubyte)); @@ -982,6 +984,9 @@ bool Source::scanDeclaration(const struct tgsi_full_declaration *decl) case TGSI_SEMANTIC_SAMPLEMASK: info-io.sampleMask = i; break; + case TGSI_SEMANTIC_VIEWPORT_INDEX: +info-io.viewportId = i; +break; default: break; } @@ -1258,6 +1263,8 @@ private: Stack joinBBs; // fork BB, for inserting join ops on ENDIF Stack loopBBs; // loop headers Stack breakBBs; // end of / after loop + + Value *viewport; }; Symbol * @@ -1555,8 +1562,16 @@ Converter::storeDst(const tgsi::Instruction::DstRegister dst, int c, mkOp2(OP_WRSV, TYPE_U32, NULL, dstToSym(dst, c), val); } else if (f == TGSI_FILE_OUTPUT prog-getType() != Program::TYPE_FRAGMENT) { - if (ptr || (info-out[idx].mask (1 c))) - mkStore(OP_EXPORT, TYPE_U32, dstToSym(dst, c), ptr, val); + + if (ptr || (info-out[idx].mask (1 c))) { + /* Save the viewport index into a scratch register so that it can be +exported at EMIT time */ + if (info-out[idx].sn == TGSI_SEMANTIC_VIEWPORT_INDEX + viewport != NULL) +mkOp1(OP_MOV, TYPE_U32, viewport, val); + else +mkStore(OP_EXPORT, TYPE_U32, dstToSym(dst, c), ptr, val); + } } else if (f == TGSI_FILE_TEMPORARY || f == TGSI_FILE_PREDICATE || @@ -2523,6 +2538,13 @@ Converter::handleInstruction(const struct tgsi_full_instruction *insn) mkCvt(OP_CVT, dstTy, dst0[c], srcTy, fetchSrc(0, c)); break; case TGSI_OPCODE_EMIT: + /* export the saved viewport index */ + if (viewport != NULL) { + Symbol *vpSym = mkSymbol(FILE_SHADER_OUTPUT, 0, TYPE_U32, + info-out[info-io.viewportId].slot[0] * 4); + mkStore(OP_EXPORT, TYPE_U32, vpSym, NULL, viewport); + } + /* fallthrough */ case TGSI_OPCODE_ENDPRIM: // get vertex stream if specified (must be immediate) src0 = tgsi.srcCount() ? @@ -2952,6 +2974,11 @@ Converter::run() mkOp1(OP_RCP, TYPE_F32, fragCoord[3], fragCoord[3]); } +
Mesa (10.2): i965/disasm: Fix INTEL_DEBUG= fs on Broadwell for ARB_fp applications.
Module: Mesa Branch: 10.2 Commit: f9718e4b937c95fc08c2fb6239389cfd47851a7e URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=f9718e4b937c95fc08c2fb6239389cfd47851a7e Author: Kenneth Graunke kenn...@whitecape.org Date: Sat Jun 28 21:16:06 2014 -0700 i965/disasm: Fix INTEL_DEBUG=fs on Broadwell for ARB_fp applications. Apparently INTEL_DEBUG=fs has crashed on Broadwell for anything using ARB_fragment_program since commit 9cee3ff5. We need to NULL-check the right field. Signed-off-by: Kenneth Graunke kenn...@whitecape.org Reviewed-by: Matt Turner matts...@gmail.com Reviewed-by: Kristian Høgsberg k...@bitplanet.net Cc: 10.2 mesa-sta...@lists.freedesktop.org (cherry picked from commit c60a4ba7e36f069d6829948ee14d87970f5f39a1) Conflicts: src/mesa/drivers/dri/i965/gen8_fs_generator.cpp --- src/mesa/drivers/dri/i965/gen8_fs_generator.cpp |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/gen8_fs_generator.cpp b/src/mesa/drivers/dri/i965/gen8_fs_generator.cpp index 26cb991..97f6404 100644 --- a/src/mesa/drivers/dri/i965/gen8_fs_generator.cpp +++ b/src/mesa/drivers/dri/i965/gen8_fs_generator.cpp @@ -887,7 +887,7 @@ gen8_fs_generator::generate_code(exec_list *instructions) const void *last_annotation_ir = NULL; if (unlikely(INTEL_DEBUG DEBUG_WM)) { - if (prog) { + if (shader_prog) { fprintf(stderr, Native code for %s fragment shader %d (SIMD%d dispatch):\n, shader_prog-Label ? shader_prog-Label : unnamed, ___ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit
Mesa (10.2): nouveau: dup fd before passing it to device
Module: Mesa Branch: 10.2 Commit: 89e3b89796ef745a0b803e05f064ccbc2eb879f6 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=89e3b89796ef745a0b803e05f064ccbc2eb879f6 Author: Ilia Mirkin imir...@alum.mit.edu Date: Thu Jun 19 04:25:04 2014 -0400 nouveau: dup fd before passing it to device nouveau screens are reused for the same device node. However in the scenario where we create screen 1, screen 2, and then delete screen 1, the surrounding code might also close the original device node. To protect against this, dup the fd and use the dup'd fd in the nouveau_device. Also tell the nouveau_device that it is the owner of the fd so that it will be closed on destruction. Also make sure to free the nouveau_device in case of any failure. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=79823 Signed-off-by: Ilia Mirkin imir...@alum.mit.edu Cc: 10.2 mesa-sta...@lists.freedesktop.org Reviewed-by: Maarten Lankhorst maarten.lankho...@ubuntu.com (cherry picked from commit a59f2bb17bcc78e09653391748549e7973990798) --- src/gallium/winsys/nouveau/drm/nouveau_drm_winsys.c | 19 +-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/src/gallium/winsys/nouveau/drm/nouveau_drm_winsys.c b/src/gallium/winsys/nouveau/drm/nouveau_drm_winsys.c index a077c48..19f2786 100644 --- a/src/gallium/winsys/nouveau/drm/nouveau_drm_winsys.c +++ b/src/gallium/winsys/nouveau/drm/nouveau_drm_winsys.c @@ -1,4 +1,5 @@ #include sys/stat.h +#include unistd.h #include pipe/p_context.h #include pipe/p_state.h #include util/u_format.h @@ -59,7 +60,7 @@ nouveau_drm_screen_create(int fd) struct nouveau_device *dev = NULL; struct pipe_screen *(*init)(struct nouveau_device *); struct nouveau_screen *screen; - int ret; + int ret, dupfd = -1; pipe_mutex_lock(nouveau_screen_mutex); if (!fd_tab) { @@ -75,7 +76,17 @@ nouveau_drm_screen_create(int fd) return screen-base; } - ret = nouveau_device_wrap(fd, 0, dev); + /* Since the screen re-use is based on the device node and not the fd, +* create a copy of the fd to be owned by the device. Otherwise a +* scenario could occur where two screens are created, and the first +* one is shut down, along with the fd being closed. The second +* (identical) screen would now have a reference to the closed fd. We +* avoid this by duplicating the original fd. Note that +* nouveau_device_wrap does not close the fd in case of a device +* creation error. +*/ + dupfd = dup(fd); + ret = nouveau_device_wrap(dupfd, 1, dev); if (ret) goto err; @@ -114,6 +125,10 @@ nouveau_drm_screen_create(int fd) return screen-base; err: + if (dev) + nouveau_device_del(dev); + else if (dupfd = 0) + close(dupfd); pipe_mutex_unlock(nouveau_screen_mutex); return NULL; } ___ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit
Mesa (10.2): st/xa: Don't close the drm fd on failure v2
Module: Mesa Branch: 10.2 Commit: ff02e7995c09278be06c34d596d3d8ca11e26ded URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=ff02e7995c09278be06c34d596d3d8ca11e26ded Author: Thomas Hellstrom thellst...@vmware.com Date: Thu Jul 3 02:07:36 2014 -0700 st/xa: Don't close the drm fd on failure v2 If XA fails to initialize with pipe_loader enabled, the pipe_loader's cleanup function will close the drm file descriptor. That's pretty bad because the file descriptor will probably be the X server driver's only connection to drm. Temporarily solve this by dup()'ing the file descriptor before handing it over to the pipe loader. This fixes freedesktop.org bugzilla bug #80645. v2: Fix CC addresses. Cc: 10.2 mesa-sta...@lists.freedesktop.org Signed-off-by: Thomas Hellstrom thellst...@vmware.com Reviewed-by: Jakob Bornecrantz ja...@vmware.com (cherry picked from commit 35cf3831d71770211f29da6608313dc1f6213d7b) Conflicts: src/gallium/state_trackers/xa/xa_tracker.c --- src/gallium/state_trackers/xa/xa_tracker.c |7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/gallium/state_trackers/xa/xa_tracker.c b/src/gallium/state_trackers/xa/xa_tracker.c index 9add584..be16964 100644 --- a/src/gallium/state_trackers/xa/xa_tracker.c +++ b/src/gallium/state_trackers/xa/xa_tracker.c @@ -26,6 +26,7 @@ * Thomas Hellstrom thellstrom-at-vmware-dot-com */ +#include unistd.h #include xa_tracker.h #include xa_priv.h #include pipe/p_state.h @@ -140,11 +141,15 @@ xa_tracker_create(int drm_fd) struct xa_tracker *xa = calloc(1, sizeof(struct xa_tracker)); enum xa_surface_type stype; unsigned int num_formats; +int loader_fd; if (!xa) return NULL; -if (pipe_loader_drm_probe_fd(xa-dev, drm_fd, false)) +loader_fd = dup(drm_fd); +if (loader_fd == -1) +return NULL; +if (pipe_loader_drm_probe_fd(xa-dev, loader_fd, false)) xa-screen = pipe_loader_create_screen(xa-dev, PIPE_SEARCH_DIR); if (!xa-screen) goto out_no_screen; ___ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit
Mesa (10.2): i965: Include marketing names for Broadwell GPUs.
Module: Mesa Branch: 10.2 Commit: ad79d7e9874ea48670d040a90689a997c13a6170 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=ad79d7e9874ea48670d040a90689a997c13a6170 Author: Kenneth Graunke kenn...@whitecape.org Date: Tue Jun 24 16:18:11 2014 -0700 i965: Include marketing names for Broadwell GPUs. Intel would like us to include the marketing names. Developers additionally want Broadwell GT1/2/3 because it makes it easier to identify what hardware users have when they request assistance or report issues. Including both makes it easy for everyone to map between the names. Signed-off-by: Kenneth Graunke kenn...@whitecape.org Reviewed-by: Jordan Justen jordan.l.jus...@intel.com Cc: 10.2 mesa-sta...@lists.freedesktop.org (cherry picked from commit 05126b9bb5763ab6a7418719e1ef2d660cc3c272) --- include/pci_ids/i965_pci_ids.h | 36 ++-- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/include/pci_ids/i965_pci_ids.h b/include/pci_ids/i965_pci_ids.h index cf0c904..2e04301 100644 --- a/include/pci_ids/i965_pci_ids.h +++ b/include/pci_ids/i965_pci_ids.h @@ -91,24 +91,24 @@ CHIPSET(0x0F32, byt, Intel(R) Bay Trail) CHIPSET(0x0F33, byt, Intel(R) Bay Trail) CHIPSET(0x0157, byt, Intel(R) Bay Trail) CHIPSET(0x0155, byt, Intel(R) Bay Trail) -CHIPSET(0x1602, bdw_gt1, Intel(R) Broadwell) -CHIPSET(0x1606, bdw_gt1, Intel(R) Broadwell) -CHIPSET(0x160A, bdw_gt1, Intel(R) Broadwell) -CHIPSET(0x160B, bdw_gt1, Intel(R) Broadwell) -CHIPSET(0x160D, bdw_gt1, Intel(R) Broadwell) -CHIPSET(0x160E, bdw_gt1, Intel(R) Broadwell) -CHIPSET(0x1612, bdw_gt2, Intel(R) Broadwell) -CHIPSET(0x1616, bdw_gt2, Intel(R) Broadwell) -CHIPSET(0x161A, bdw_gt2, Intel(R) Broadwell) -CHIPSET(0x161B, bdw_gt2, Intel(R) Broadwell) -CHIPSET(0x161D, bdw_gt2, Intel(R) Broadwell) -CHIPSET(0x161E, bdw_gt2, Intel(R) Broadwell) -CHIPSET(0x1622, bdw_gt3, Intel(R) Broadwell) -CHIPSET(0x1626, bdw_gt3, Intel(R) Broadwell) -CHIPSET(0x162A, bdw_gt3, Intel(R) Broadwell) -CHIPSET(0x162B, bdw_gt3, Intel(R) Broadwell) -CHIPSET(0x162D, bdw_gt3, Intel(R) Broadwell) -CHIPSET(0x162E, bdw_gt3, Intel(R) Broadwell) +CHIPSET(0x1602, bdw_gt1, Intel(R) Broadwell GT1) +CHIPSET(0x1606, bdw_gt1, Intel(R) Broadwell GT1) +CHIPSET(0x160A, bdw_gt1, Intel(R) Broadwell GT1) +CHIPSET(0x160B, bdw_gt1, Intel(R) Broadwell GT1) +CHIPSET(0x160D, bdw_gt1, Intel(R) Broadwell GT1) +CHIPSET(0x160E, bdw_gt1, Intel(R) Broadwell GT1) +CHIPSET(0x1612, bdw_gt2, Intel(R) HD Graphics 5600 (Broadwell GT2)) +CHIPSET(0x1616, bdw_gt2, Intel(R) HD Graphics 5500 (Broadwell GT2)) +CHIPSET(0x161A, bdw_gt2, Intel(R) Broadwell GT2) +CHIPSET(0x161B, bdw_gt2, Intel(R) Broadwell GT2) +CHIPSET(0x161D, bdw_gt2, Intel(R) Broadwell GT2) +CHIPSET(0x161E, bdw_gt2, Intel(R) HD Graphics 5300 (Broadwell GT2)) +CHIPSET(0x1622, bdw_gt3, Intel(R) Iris Pro 6200 (Broadwell GT3e)) +CHIPSET(0x1626, bdw_gt3, Intel(R) HD Graphics 6000 (Broadwell GT3)) +CHIPSET(0x162A, bdw_gt3, Intel(R) Iris Pro P6300 (Broadwell GT3e)) +CHIPSET(0x162B, bdw_gt3, Intel(R) Iris 6100 (Broadwell GT3)) +CHIPSET(0x162D, bdw_gt3, Intel(R) Broadwell GT3) +CHIPSET(0x162E, bdw_gt3, Intel(R) Broadwell GT3) CHIPSET(0x22B0, chv, Intel(R) Cherryview) CHIPSET(0x22B1, chv, Intel(R) Cherryview) CHIPSET(0x22B2, chv, Intel(R) Cherryview) ___ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit
Mesa (10.2): glxext: Send the Drawable' s ID in the GLX_BufferSwapComplete event
Module: Mesa Branch: 10.2 Commit: 3ca21195939477fa1f9b113ce4f6da36a8480321 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=3ca21195939477fa1f9b113ce4f6da36a8480321 Author: Jasper St. Pierre jstpie...@mecheye.net Date: Tue Jun 24 13:43:53 2014 -0400 glxext: Send the Drawable's ID in the GLX_BufferSwapComplete event While the official INTEL_swap_event specification says that the drawable field should contain the GLXDrawable, not the Drawable, the existing DRI2 code in dri2.c that translates from DRI2_BufferSwapComplete sends out GLX_BufferSwapComplete with the Drawable's ID, so existing codebases like Clutter/Cogl rely on getting the Drawable. Match DRI2's error here and stuff the event with the X Drawable, not the GLX drawable. This fixes apps seeing wrong drawables through an indirect GLX context or with DRI3, which uses the GLX_BufferSwapComplete event directly on the wire instead of translates Present in mesa. At the same time, also modify the structure for the event to make sure that clients don't make the same mistake. This is not an API or ABI break, as GLXDrawable and Drawable are both typedefs for XID. Signed-off-by: Jasper St. Pierre jstpie...@mecheye.net Reviewed-by: Axel Davy axel.d...@ens.fr Cc: 10.1 10.2 mesa-sta...@lists.freedesktop.org Signed-off-by: Dave Airlie airl...@redhat.com (cherry picked from commit b4dcf87f34f68111acd9d364739938721fc692f4) --- include/GL/glx.h |2 +- src/glx/glxext.c |9 + 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/include/GL/glx.h b/include/GL/glx.h index 234abc0..78f5052 100644 --- a/include/GL/glx.h +++ b/include/GL/glx.h @@ -518,7 +518,7 @@ typedef struct { unsigned long serial; /* # of last request processed by server */ Bool send_event; /* true if this came from a SendEvent request */ Display *display; /* Display the event was read from */ -GLXDrawable drawable; /* drawable on which event was requested in event mask */ +Drawable drawable; /* drawable on which event was requested in event mask */ int event_type; int64_t ust; int64_t msc; diff --git a/src/glx/glxext.c b/src/glx/glxext.c index 820cbc0..b0d1e3c 100644 --- a/src/glx/glxext.c +++ b/src/glx/glxext.c @@ -134,14 +134,15 @@ __glXWireToEvent(Display *dpy, XEvent *event, xEvent *wire) GLXBufferSwapComplete *aevent = (GLXBufferSwapComplete *)event; xGLXBufferSwapComplete2 *awire = (xGLXBufferSwapComplete2 *)wire; struct glx_drawable *glxDraw = GetGLXDrawable(dpy, awire-drawable); - aevent-event_type = awire-event_type; - aevent-drawable = awire-drawable; - aevent-ust = ((CARD64)awire-ust_hi 32) | awire-ust_lo; - aevent-msc = ((CARD64)awire-msc_hi 32) | awire-msc_lo; if (!glxDraw) return False; + aevent-event_type = awire-event_type; + aevent-drawable = glxDraw-xDrawable; + aevent-ust = ((CARD64)awire-ust_hi 32) | awire-ust_lo; + aevent-msc = ((CARD64)awire-msc_hi 32) | awire-msc_lo; + if (awire-sbc glxDraw-lastEventSbc) glxDraw-eventSbcWrap += 0x1; glxDraw-lastEventSbc = awire-sbc; ___ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit
Mesa (10.2): llvmpipe: Fix zero-division in llvmpipe_texture_layout()
Module: Mesa Branch: 10.2 Commit: 9bd6dc9371d0665e0b4a1f7ea4681c683351b58c URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=9bd6dc9371d0665e0b4a1f7ea4681c683351b58c Author: Takashi Iwai ti...@suse.de Date: Wed Jun 25 02:03:07 2014 +0200 llvmpipe: Fix zero-division in llvmpipe_texture_layout() Fix the crash of gnome-control-center info invocation on QEMU where zero height is passed at init. (sroland: simplify logic by eliminating the div altogether, using 64bit mul.) Fixes: https://bugzilla.novell.com/show_bug.cgi?id=879462 Cc: 10.2 mesa-sta...@lists.freedesktop.org (cherry picked from commit 6b8b17153ab27b2bc7221df974a5872805f528b1) --- src/gallium/drivers/llvmpipe/lp_texture.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/llvmpipe/lp_texture.c b/src/gallium/drivers/llvmpipe/lp_texture.c index f601181..6df88d0 100644 --- a/src/gallium/drivers/llvmpipe/lp_texture.c +++ b/src/gallium/drivers/llvmpipe/lp_texture.c @@ -115,7 +115,7 @@ llvmpipe_texture_layout(struct llvmpipe_screen *screen, lpr-row_stride[level] = align(nblocksx * block_size, util_cpu_caps.cacheline); /* if row_stride * height LP_MAX_TEXTURE_SIZE */ - if (lpr-row_stride[level] LP_MAX_TEXTURE_SIZE / nblocksy) { + if ((uint64_t)lpr-row_stride[level] * nblocksy LP_MAX_TEXTURE_SIZE) { /* image too large */ goto fail; } ___ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit
Mesa (10.2): nv50: do an explicit flush on draw when there are persistent buffers
Module: Mesa Branch: 10.2 Commit: e11b3f8fbc65d8d8022f65c1df69ae9c82840d54 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=e11b3f8fbc65d8d8022f65c1df69ae9c82840d54 Author: Ilia Mirkin imir...@alum.mit.edu Date: Mon Jun 30 23:49:46 2014 -0400 nv50: do an explicit flush on draw when there are persistent buffers Signed-off-by: Ilia Mirkin imir...@alum.mit.edu Cc: 10.2 mesa-sta...@lists.freedesktop.org (cherry picked from commit 5d4f5218bb71cb387f1a57ea08125245e5039e94) --- src/gallium/drivers/nouveau/nv50/nv50_context.c | 22 - src/gallium/drivers/nouveau/nv50/nv50_context.h |1 + src/gallium/drivers/nouveau/nv50/nv50_vbo.c | 29 ++- 3 files changed, 50 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/nouveau/nv50/nv50_context.c b/src/gallium/drivers/nouveau/nv50/nv50_context.c index 3f3a888..c2eb0c0 100644 --- a/src/gallium/drivers/nouveau/nv50/nv50_context.c +++ b/src/gallium/drivers/nouveau/nv50/nv50_context.c @@ -61,7 +61,7 @@ static void nv50_memory_barrier(struct pipe_context *pipe, unsigned flags) { struct nv50_context *nv50 = nv50_context(pipe); - int i; + int i, s; if (flags PIPE_BARRIER_MAPPED_BUFFER) { for (i = 0; i nv50-num_vtxbufs; ++i) { @@ -74,6 +74,26 @@ nv50_memory_barrier(struct pipe_context *pipe, unsigned flags) if (nv50-idxbuf.buffer nv50-idxbuf.buffer-flags PIPE_RESOURCE_FLAG_MAP_PERSISTENT) nv50-base.vbo_dirty = TRUE; + + for (s = 0; s 3 !nv50-cb_dirty; ++s) { + uint32_t valid = nv50-constbuf_valid[s]; + + while (valid !nv50-cb_dirty) { +const unsigned i = ffs(valid) - 1; +struct pipe_resource *res; + +valid = ~(1 i); +if (nv50-constbuf[s][i].user) + continue; + +res = nv50-constbuf[s][i].u.buf; +if (!res) + continue; + +if (res-flags PIPE_RESOURCE_FLAG_MAP_PERSISTENT) + nv50-cb_dirty = TRUE; + } + } } } diff --git a/src/gallium/drivers/nouveau/nv50/nv50_context.h b/src/gallium/drivers/nouveau/nv50/nv50_context.h index 3b7cb18..9c2af40 100644 --- a/src/gallium/drivers/nouveau/nv50/nv50_context.h +++ b/src/gallium/drivers/nouveau/nv50/nv50_context.h @@ -106,6 +106,7 @@ struct nv50_context { struct nouveau_bufctx *bufctx; uint32_t dirty; + boolean cb_dirty; struct { uint32_t instance_elts; /* bitmask of per-instance elements */ diff --git a/src/gallium/drivers/nouveau/nv50/nv50_vbo.c b/src/gallium/drivers/nouveau/nv50/nv50_vbo.c index 7c2b7ff..5a4a457 100644 --- a/src/gallium/drivers/nouveau/nv50/nv50_vbo.c +++ b/src/gallium/drivers/nouveau/nv50/nv50_vbo.c @@ -747,7 +747,7 @@ nv50_draw_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info) { struct nv50_context *nv50 = nv50_context(pipe); struct nouveau_pushbuf *push = nv50-base.pushbuf; - int i; + int i, s; /* NOTE: caller must ensure that (min_index + index_bias) is = 0 */ nv50-vb_elt_first = info-min_index + info-index_bias; @@ -776,6 +776,33 @@ nv50_draw_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info) push-kick_notify = nv50_draw_vbo_kick_notify; + for (s = 0; s 3 !nv50-cb_dirty; ++s) { + uint32_t valid = nv50-constbuf_valid[s]; + + while (valid !nv50-cb_dirty) { + const unsigned i = ffs(valid) - 1; + struct pipe_resource *res; + + valid = ~(1 i); + if (nv50-constbuf[s][i].user) +continue; + + res = nv50-constbuf[s][i].u.buf; + if (!res) +continue; + + if (res-flags PIPE_RESOURCE_FLAG_MAP_COHERENT) +nv50-cb_dirty = TRUE; + } + } + + /* If there are any coherent constbufs, flush the cache */ + if (nv50-cb_dirty) { + BEGIN_NV04(push, NV50_3D(CODE_CB_FLUSH), 1); + PUSH_DATA (push, 0); + nv50-cb_dirty = FALSE; + } + if (nv50-vbo_fifo) { nv50_push_vbo(nv50, info); push-kick_notify = nv50_default_kick_notify; ___ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit
Mesa (10.2): radeon/llvm: Use the llvm.rsq.clamped intrinsic for RSQ
Module: Mesa Branch: 10.2 Commit: ee4274c393632e44cafa7392f4e89425f104bbba URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=ee4274c393632e44cafa7392f4e89425f104bbba Author: Michel Dänzer michel.daen...@amd.com Date: Thu Jun 19 15:53:42 2014 +0900 radeon/llvm: Use the llvm.rsq.clamped intrinsic for RSQ Reviewed-and-Tested-by: Michel Dänzer michel.daen...@amd.com Tested-by: Laurent Carlier lordhea...@gmail.com https://bugs.freedesktop.org/show_bug.cgi?id=80015 CC: 10.1 10.2 mesa-sta...@lists.freedesktop.org (cherry picked from commit b9f501bc6bc52c25bef86a24b49fda4e92fcd924) Squashed together with the earlier: radeon/llvm: Adapt to AMDGPU.rsq intrinsic change in LLVM 3.5 Reviewed-by: Tom Stellard thomas.stell...@amd.com Signed-off-by: Michel Dänzer michel.daen...@amd.com (cherry picked from commit 93b6b1fa83a2000f7a60ca12df54c2dd808a87a8) --- src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c |4 1 file changed, 4 insertions(+) diff --git a/src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c b/src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c index 60ade78..61292d6 100644 --- a/src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c +++ b/src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c @@ -1378,7 +1378,11 @@ void radeon_llvm_context_init(struct radeon_llvm_context * ctx) bld_base-op_actions[TGSI_OPCODE_UCMP].emit = emit_ucmp; bld_base-rsq_action.emit = build_tgsi_intrinsic_nomem; +#if HAVE_LLVM = 0x0305 + bld_base-rsq_action.intr_name = llvm.AMDGPU.rsq.clamped.f32; +#else bld_base-rsq_action.intr_name = llvm.AMDGPU.rsq; +#endif } void radeon_llvm_create_func(struct radeon_llvm_context * ctx, ___ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit
Mesa (10.2): cherry-ignore: Add a patch that's been rejected
Module: Mesa Branch: 10.2 Commit: 7b21ee08db7f32bb32476110d8d727ad53c71fcb URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=7b21ee08db7f32bb32476110d8d727ad53c71fcb Author: Carl Worth cwo...@cworth.org Date: Thu Jul 3 18:36:06 2014 -0700 cherry-ignore: Add a patch that's been rejected It may be that the patch is just fine, but at the very least it needs a better commit message. --- bin/.cherry-ignore |4 1 file changed, 4 insertions(+) diff --git a/bin/.cherry-ignore b/bin/.cherry-ignore index 24bca84..80df7dc 100644 --- a/bin/.cherry-ignore +++ b/bin/.cherry-ignore @@ -1,3 +1,7 @@ # The first is the change, and the second is the revert of that change. e6967270c75a5b669152127bb7a746d55f4407a6 i965: Fix depth (array slices) computation for 1D_ARRAY render targets. 155f98d49fdc2f46c760f8214327b3804ee60079 Revert i965: Fix depth (array slices) computation for 1D_ARRAY render targets. + +# This patch didn't have enough in the commit message to convince me it +# is a bug fix, (email sent to author asking for more information). +41d759d076737f94976f5294b734dbc437a12bae ___ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit
Mesa (10.2): nv50: disable dedicated ubo upload method
Module: Mesa Branch: 10.2 Commit: da80e6a1c45a6dc6952f7a009caedf26efd0320b URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=da80e6a1c45a6dc6952f7a009caedf26efd0320b Author: Ilia Mirkin imir...@alum.mit.edu Date: Mon Jun 30 22:43:39 2014 -0400 nv50: disable dedicated ubo upload method The hardware allows multiple simultaneous renders with the same memory-backed constbufs but with each invocation having different values. However in order for that to work, the data has to be streamed in via the right constbuf slot. We weren't doing that for UBOs. Signed-off-by: Ilia Mirkin imir...@alum.mit.edu Cc: 10.2 10.1 mesa-sta...@lists.freedesktop.org (cherry picked from commit b2b7c651221037266abee7c3ede1ca7b3cb2da33) --- src/gallium/drivers/nouveau/nv50/nv50_context.c |7 +++ 1 file changed, 7 insertions(+) diff --git a/src/gallium/drivers/nouveau/nv50/nv50_context.c b/src/gallium/drivers/nouveau/nv50/nv50_context.c index f844592..3f3a888 100644 --- a/src/gallium/drivers/nouveau/nv50/nv50_context.c +++ b/src/gallium/drivers/nouveau/nv50/nv50_context.c @@ -253,7 +253,14 @@ nv50_create(struct pipe_screen *pscreen, void *priv) nv50-base.screen= screen-base; nv50-base.copy_data = nv50_m2mf_copy_linear; nv50-base.push_data = nv50_sifc_linear_u8; + /* FIXME: Make it possible to use this again. The problem is that there is +* some clever logic in the card that allows for multiple renders to happen +* when there are only constbuf changes. However that relies on the +* constbuf updates happening to the right constbuf slots. Currently +* implementation just makes it go through a separate slot which doesn't +* properly update the right constbuf data. nv50-base.push_cb = nv50_cb_push; +*/ nv50-screen = screen; pipe-screen = pscreen; ___ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit
Mesa (10.2): radeon/llvm: Allocate space for kernel metadata operands
Module: Mesa Branch: 10.2 Commit: 5ba1cf1893a63907d96f0d49a5c95612e7a9be8f URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=5ba1cf1893a63907d96f0d49a5c95612e7a9be8f Author: Aaron Watry awa...@gmail.com Date: Wed Jul 2 16:27:31 2014 -0500 radeon/llvm: Allocate space for kernel metadata operands Previously, we were assuming that kernel metadata nodes only had 1 operand. Kernels which have attributes can have more than 1, e.g.: !0 = metadata !{void (i32 addrspace(1)*)* @testKernel, metadata !1} !1 = metadata !{metadata !work_group_size_hint, i32 4, i32 1, i32 1} Attempting to get the kernel without the correct number of attributes led to memory corruption and luxrays crashing out. Fixes the cl/program/execute/attributes.cl piglit test. Signed-off-by: Aaron Watry awa...@gmail.com Reviewed-by: Tom Stellard thomas.stell...@amd.com Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76223 CC: 10.2 mesa-sta...@lists.freedesktop.org (cherry picked from commit 824197efd526dec5623b37f2c6078c212c81eb2b) --- src/gallium/drivers/radeon/radeon_llvm_util.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/gallium/drivers/radeon/radeon_llvm_util.c b/src/gallium/drivers/radeon/radeon_llvm_util.c index 2ace91f..ec11559 100644 --- a/src/gallium/drivers/radeon/radeon_llvm_util.c +++ b/src/gallium/drivers/radeon/radeon_llvm_util.c @@ -100,13 +100,17 @@ LLVMModuleRef radeon_llvm_get_kernel_module(LLVMContextRef ctx, unsigned index, kernel_metadata = MALLOC(num_kernels * sizeof(LLVMValueRef)); LLVMGetNamedMetadataOperands(mod, opencl.kernels, kernel_metadata); for (i = 0; i num_kernels; i++) { - LLVMValueRef kernel_signature, kernel_function; + LLVMValueRef kernel_signature, *kernel_function; + unsigned num_kernel_md_operands; if (i == index) { continue; } kernel_signature = kernel_metadata[i]; - LLVMGetMDNodeOperands(kernel_signature, kernel_function); - LLVMDeleteFunction(kernel_function); + num_kernel_md_operands = LLVMGetMDNodeNumOperands(kernel_signature); + kernel_function = MALLOC(num_kernel_md_operands * sizeof (LLVMValueRef)); + LLVMGetMDNodeOperands(kernel_signature, kernel_function); + LLVMDeleteFunction(*kernel_function); + FREE(kernel_function); } FREE(kernel_metadata); radeon_llvm_optimize(mod); ___ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit
Mesa (10.2): draw: (trivial) fix clamping of viewport index
Module: Mesa Branch: 10.2 Commit: 6ae4aff3035dd93cd589310674cecb541780e609 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=6ae4aff3035dd93cd589310674cecb541780e609 Author: Roland Scheidegger srol...@vmware.com Date: Mon Jun 23 22:06:15 2014 +0200 draw: (trivial) fix clamping of viewport index The old logic would let all negative values go through unclamped, with potentially disastrous results (probably trying to fetch viewport values from random memory locations). GL has undefined rendering for vp indices outside valid range but that's a bit too undefined... (The logic is now the same as in llvmpipe.) CC: 10.1 10.2 mesa-sta...@lists.freedesktop.org Reviewed-by: Jose Fonseca jfons...@vmware.com Reviewed-by: Ilia Mirkin imir...@alum.mit.edu Tested-by: Ilia Mirkin imir...@alum.mit.edu (cherry picked from commit 604e54de78aa00430b1d61d030656e387866e840) --- src/gallium/auxiliary/draw/draw_private.h |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/auxiliary/draw/draw_private.h b/src/gallium/auxiliary/draw/draw_private.h index 783c3ef..d8dc2ab 100644 --- a/src/gallium/auxiliary/draw/draw_private.h +++ b/src/gallium/auxiliary/draw/draw_private.h @@ -493,7 +493,7 @@ draw_stats_clipper_primitives(struct draw_context *draw, static INLINE unsigned draw_clamp_viewport_idx(int idx) { - return ((PIPE_MAX_VIEWPORTS idx || idx 0) ? idx : 0); + return ((PIPE_MAX_VIEWPORTS idx idx = 0) ? idx : 0); } /** ___ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit
Mesa (10.2): nvc0: add a memory barrier when there are persistent UBOs
Module: Mesa Branch: 10.2 Commit: 95ff8c6f18f218b56f6735079a3e7716ce83ddf5 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=95ff8c6f18f218b56f6735079a3e7716ce83ddf5 Author: Ilia Mirkin imir...@alum.mit.edu Date: Tue Jul 1 00:49:34 2014 -0400 nvc0: add a memory barrier when there are persistent UBOs Signed-off-by: Ilia Mirkin imir...@alum.mit.edu Cc: 10.2 mesa-sta...@lists.freedesktop.org (cherry picked from commit 9a37eb8adb6558a4abf47774b583cb582a0ae116) --- src/gallium/drivers/nouveau/nvc0/nvc0_context.c | 22 +- src/gallium/drivers/nouveau/nvc0/nvc0_context.h |2 ++ src/gallium/drivers/nouveau/nvc0/nvc0_state.c |5 + src/gallium/drivers/nouveau/nvc0/nvc0_vbo.c | 27 ++- src/gallium/drivers/nouveau/nvc0/nvc0_winsys.h |5 +++-- 5 files changed, 57 insertions(+), 4 deletions(-) diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_context.c b/src/gallium/drivers/nouveau/nvc0/nvc0_context.c index 2e6e3fe..2c6c59e 100644 --- a/src/gallium/drivers/nouveau/nvc0/nvc0_context.c +++ b/src/gallium/drivers/nouveau/nvc0/nvc0_context.c @@ -60,7 +60,7 @@ static void nvc0_memory_barrier(struct pipe_context *pipe, unsigned flags) { struct nvc0_context *nvc0 = nvc0_context(pipe); - int i; + int i, s; if (flags PIPE_BARRIER_MAPPED_BUFFER) { for (i = 0; i nvc0-num_vtxbufs; ++i) { @@ -73,6 +73,26 @@ nvc0_memory_barrier(struct pipe_context *pipe, unsigned flags) if (nvc0-idxbuf.buffer nvc0-idxbuf.buffer-flags PIPE_RESOURCE_FLAG_MAP_PERSISTENT) nvc0-base.vbo_dirty = TRUE; + + for (s = 0; s 5 !nvc0-cb_dirty; ++s) { + uint32_t valid = nvc0-constbuf_valid[s]; + + while (valid !nvc0-cb_dirty) { +const unsigned i = ffs(valid) - 1; +struct pipe_resource *res; + +valid = ~(1 i); +if (nvc0-constbuf[s][i].user) + continue; + +res = nvc0-constbuf[s][i].u.buf; +if (!res) + continue; + +if (res-flags PIPE_RESOURCE_FLAG_MAP_PERSISTENT) + nvc0-cb_dirty = TRUE; + } + } } } diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_context.h b/src/gallium/drivers/nouveau/nvc0/nvc0_context.h index 76416a0..612e306 100644 --- a/src/gallium/drivers/nouveau/nvc0/nvc0_context.h +++ b/src/gallium/drivers/nouveau/nvc0/nvc0_context.h @@ -154,6 +154,8 @@ struct nvc0_context { struct nvc0_constbuf constbuf[6][NVC0_MAX_PIPE_CONSTBUFS]; uint16_t constbuf_dirty[6]; + uint16_t constbuf_valid[6]; + boolean cb_dirty; struct pipe_vertex_buffer vtxbuf[PIPE_MAX_ATTRIBS]; unsigned num_vtxbufs; diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_state.c b/src/gallium/drivers/nouveau/nvc0/nvc0_state.c index 74f8a76..a708847 100644 --- a/src/gallium/drivers/nouveau/nvc0/nvc0_state.c +++ b/src/gallium/drivers/nouveau/nvc0/nvc0_state.c @@ -808,10 +808,15 @@ nvc0_set_constant_buffer(struct pipe_context *pipe, uint shader, uint index, if (nvc0-constbuf[s][i].user) { nvc0-constbuf[s][i].u.data = cb-user_buffer; nvc0-constbuf[s][i].size = cb-buffer_size; + nvc0-constbuf_valid[s] |= 1 i; } else if (cb) { nvc0-constbuf[s][i].offset = cb-buffer_offset; nvc0-constbuf[s][i].size = align(cb-buffer_size, 0x100); + nvc0-constbuf_valid[s] |= 1 i; + } + else { + nvc0-constbuf_valid[s] = ~(1 i); } } diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_vbo.c b/src/gallium/drivers/nouveau/nvc0/nvc0_vbo.c index c05878f..117d1aa 100644 --- a/src/gallium/drivers/nouveau/nvc0/nvc0_vbo.c +++ b/src/gallium/drivers/nouveau/nvc0/nvc0_vbo.c @@ -797,7 +797,7 @@ nvc0_draw_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info) { struct nvc0_context *nvc0 = nvc0_context(pipe); struct nouveau_pushbuf *push = nvc0-base.pushbuf; - int i; + int i, s; /* NOTE: caller must ensure that (min_index + index_bias) is = 0 */ nvc0-vb_elt_first = info-min_index + info-index_bias; @@ -830,6 +830,31 @@ nvc0_draw_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info) push-kick_notify = nvc0_draw_vbo_kick_notify; + for (s = 0; s 5 !nvc0-cb_dirty; ++s) { + uint32_t valid = nvc0-constbuf_valid[s]; + + while (valid !nvc0-cb_dirty) { + const unsigned i = ffs(valid) - 1; + struct pipe_resource *res; + + valid = ~(1 i); + if (nvc0-constbuf[s][i].user) +continue; + + res = nvc0-constbuf[s][i].u.buf; + if (!res) +continue; + + if (res-flags PIPE_RESOURCE_FLAG_MAP_COHERENT) +nvc0-cb_dirty = TRUE; + } + } + + if (nvc0-cb_dirty) { + IMMED_NVC0(push, NVC0_3D(MEM_BARRIER), 0x1011); + nvc0-cb_dirty = FALSE; + } + if (nvc0-state.vbo_mode) { nvc0_push_vbo(nvc0, info); push-kick_notify = nvc0_default_kick_notify; diff --git
Mesa (10.2): freedreno: update generated headers
Module: Mesa Branch: 10.2 Commit: 9580efe76ca4438e61dc23faee4f419378133161 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=9580efe76ca4438e61dc23faee4f419378133161 Author: Rob Clark robcl...@freedesktop.org Date: Fri Jun 13 13:34:55 2014 -0400 freedreno: update generated headers Signed-off-by: Rob Clark robcl...@freedesktop.org (cherry picked from commit ba6a490bbc81380fdffcb080752682b7f38b95e6) --- src/gallium/drivers/freedreno/a2xx/a2xx.xml.h |8 src/gallium/drivers/freedreno/a3xx/a3xx.xml.h | 15 +++ src/gallium/drivers/freedreno/adreno_common.xml.h |8 src/gallium/drivers/freedreno/adreno_pm4.xml.h|8 4 files changed, 23 insertions(+), 16 deletions(-) diff --git a/src/gallium/drivers/freedreno/a2xx/a2xx.xml.h b/src/gallium/drivers/freedreno/a2xx/a2xx.xml.h index 113fd00..d6ce26b 100644 --- a/src/gallium/drivers/freedreno/a2xx/a2xx.xml.h +++ b/src/gallium/drivers/freedreno/a2xx/a2xx.xml.h @@ -10,11 +10,11 @@ git clone https://github.com/freedreno/envytools.git The rules-ng-ng source files this header was generated from are: - /home/robclark/src/freedreno/envytools/rnndb/adreno.xml ( 364 bytes, from 2013-11-30 14:47:15) - /home/robclark/src/freedreno/envytools/rnndb/freedreno_copyright.xml ( 1453 bytes, from 2013-03-31 16:51:27) -- /home/robclark/src/freedreno/envytools/rnndb/adreno/a2xx.xml ( 32901 bytes, from 2014-05-21 20:40:21) -- /home/robclark/src/freedreno/envytools/rnndb/adreno/adreno_common.xml ( 9859 bytes, from 2014-05-21 20:39:42) +- /home/robclark/src/freedreno/envytools/rnndb/adreno/a2xx.xml ( 32901 bytes, from 2014-06-02 15:21:30) +- /home/robclark/src/freedreno/envytools/rnndb/adreno/adreno_common.xml ( 9859 bytes, from 2014-06-02 15:21:30) - /home/robclark/src/freedreno/envytools/rnndb/adreno/adreno_pm4.xml( 14477 bytes, from 2014-05-16 11:51:57) -- /home/robclark/src/freedreno/envytools/rnndb/adreno/a3xx.xml ( 57954 bytes, from 2014-05-26 12:57:46) -- /home/robclark/src/freedreno/envytools/rnndb/adreno/a4xx.xml ( 26602 bytes, from 2014-05-21 20:46:17) +- /home/robclark/src/freedreno/envytools/rnndb/adreno/a3xx.xml ( 58020 bytes, from 2014-06-13 17:29:47) +- /home/robclark/src/freedreno/envytools/rnndb/adreno/a4xx.xml ( 26602 bytes, from 2014-06-13 17:28:10) Copyright (C) 2013-2014 by the following authors: - Rob Clark robdcl...@gmail.com (robclark) diff --git a/src/gallium/drivers/freedreno/a3xx/a3xx.xml.h b/src/gallium/drivers/freedreno/a3xx/a3xx.xml.h index 92380eb..5878807 100644 --- a/src/gallium/drivers/freedreno/a3xx/a3xx.xml.h +++ b/src/gallium/drivers/freedreno/a3xx/a3xx.xml.h @@ -10,11 +10,11 @@ git clone https://github.com/freedreno/envytools.git The rules-ng-ng source files this header was generated from are: - /home/robclark/src/freedreno/envytools/rnndb/adreno.xml ( 364 bytes, from 2013-11-30 14:47:15) - /home/robclark/src/freedreno/envytools/rnndb/freedreno_copyright.xml ( 1453 bytes, from 2013-03-31 16:51:27) -- /home/robclark/src/freedreno/envytools/rnndb/adreno/a2xx.xml ( 32901 bytes, from 2014-05-21 20:40:21) -- /home/robclark/src/freedreno/envytools/rnndb/adreno/adreno_common.xml ( 9859 bytes, from 2014-05-21 20:39:42) +- /home/robclark/src/freedreno/envytools/rnndb/adreno/a2xx.xml ( 32901 bytes, from 2014-06-02 15:21:30) +- /home/robclark/src/freedreno/envytools/rnndb/adreno/adreno_common.xml ( 9859 bytes, from 2014-06-02 15:21:30) - /home/robclark/src/freedreno/envytools/rnndb/adreno/adreno_pm4.xml( 14477 bytes, from 2014-05-16 11:51:57) -- /home/robclark/src/freedreno/envytools/rnndb/adreno/a3xx.xml ( 57954 bytes, from 2014-05-26 12:57:46) -- /home/robclark/src/freedreno/envytools/rnndb/adreno/a4xx.xml ( 26602 bytes, from 2014-05-21 20:46:17) +- /home/robclark/src/freedreno/envytools/rnndb/adreno/a3xx.xml ( 58020 bytes, from 2014-06-13 17:29:47) +- /home/robclark/src/freedreno/envytools/rnndb/adreno/a4xx.xml ( 26602 bytes, from 2014-06-13 17:28:10) Copyright (C) 2013-2014 by the following authors: - Rob Clark robdcl...@gmail.com (robclark) @@ -988,6 +988,7 @@ static inline uint32_t A3XX_RB_COPY_CONTROL_MSAA_RESOLVE(enum a3xx_msaa_samples { return ((val) A3XX_RB_COPY_CONTROL_MSAA_RESOLVE__SHIFT) A3XX_RB_COPY_CONTROL_MSAA_RESOLVE__MASK; } +#define A3XX_RB_COPY_CONTROL_DEPTHCLEAR 0x0008 #define A3XX_RB_COPY_CONTROL_MODE__MASK 0x0070 #define A3XX_RB_COPY_CONTROL_MODE__SHIFT 4 static inline uint32_t A3XX_RB_COPY_CONTROL_MODE(enum adreno_rb_copy_control_mode val) @@ -1536,6 +1537,12 @@ static inline uint32_t A3XX_VFD_DECODE_INSTR_REGID(uint32_t val) { return ((val) A3XX_VFD_DECODE_INSTR_REGID__SHIFT) A3XX_VFD_DECODE_INSTR_REGID__MASK; } +#define
Mesa (10.2): freedreno/a3xx: fix depth/stencil GMEM positioning
Module: Mesa Branch: 10.2 Commit: 007a77f9b22264227f9f438c26748ac976cfa373 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=007a77f9b22264227f9f438c26748ac976cfa373 Author: Rob Clark robcl...@freedesktop.org Date: Tue May 20 14:02:18 2014 -0400 freedreno/a3xx: fix depth/stencil GMEM positioning In cases where there was no color buf bound, there were inconsistancies in register settings related to position of depth/stencil inside GMEM. Signed-off-by: Rob Clark robcl...@freedesktop.org (cherry picked from commit f3ba761129e39c299fe39fa91b542f459cad9f83) --- src/gallium/drivers/freedreno/a3xx/fd3_gmem.c | 30 +++-- 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/src/gallium/drivers/freedreno/a3xx/fd3_gmem.c b/src/gallium/drivers/freedreno/a3xx/fd3_gmem.c index f11731f..7db049f 100644 --- a/src/gallium/drivers/freedreno/a3xx/fd3_gmem.c +++ b/src/gallium/drivers/freedreno/a3xx/fd3_gmem.c @@ -106,9 +106,17 @@ emit_mrt(struct fd_ringbuffer *ring, unsigned nr_bufs, } static uint32_t -depth_base(struct fd_gmem_stateobj *gmem) +depth_base(struct fd_context *ctx) { - return align(gmem-bin_w * gmem-bin_h, 0x4000); + struct fd_gmem_stateobj *gmem = ctx-gmem; + struct pipe_framebuffer_state *pfb = ctx-framebuffer; + uint32_t cpp = 4; + if (pfb-cbufs[0]) { + struct fd_resource *rsc = + fd_resource(pfb-cbufs[0]-texture); + cpp = rsc-cpp; + } + return align(gmem-bin_w * gmem-bin_h * cpp, 0x4000); } static bool @@ -399,12 +407,7 @@ fd3_emit_tile_gmem2mem(struct fd_context *ctx, struct fd_tile *tile) }}, 1); if (ctx-resolve (FD_BUFFER_DEPTH | FD_BUFFER_STENCIL)) { - uint32_t base = 0; - if (pfb-cbufs[0]) { - struct fd_resource *rsc = - fd_resource(pfb-cbufs[0]-texture); - base = depth_base(ctx-gmem) * rsc-cpp; - } + uint32_t base = depth_base(ctx); emit_gmem2mem_surf(ctx, RB_COPY_DEPTH_STENCIL, base, pfb-zsbuf); } @@ -558,7 +561,7 @@ fd3_emit_tile_mem2gmem(struct fd_context *ctx, struct fd_tile *tile) bin_h = gmem-bin_h; if (ctx-restore (FD_BUFFER_DEPTH | FD_BUFFER_STENCIL)) - emit_mem2gmem_surf(ctx, depth_base(gmem), pfb-zsbuf, bin_w); + emit_mem2gmem_surf(ctx, depth_base(ctx), pfb-zsbuf, bin_w); if (ctx-restore FD_BUFFER_COLOR) emit_mem2gmem_surf(ctx, 0, pfb-cbufs[0], bin_w); @@ -789,6 +792,7 @@ fd3_emit_tile_init(struct fd_context *ctx) { struct fd_ringbuffer *ring = ctx-ring; struct fd_gmem_stateobj *gmem = ctx-gmem; + uint32_t rb_render_control; fd3_emit_restore(ctx); @@ -813,8 +817,10 @@ fd3_emit_tile_init(struct fd_context *ctx) patch_draws(ctx, IGNORE_VISIBILITY); } - patch_rbrc(ctx, A3XX_RB_RENDER_CONTROL_ENABLE_GMEM | - A3XX_RB_RENDER_CONTROL_BIN_WIDTH(gmem-bin_w)); + rb_render_control = A3XX_RB_RENDER_CONTROL_ENABLE_GMEM | + A3XX_RB_RENDER_CONTROL_BIN_WIDTH(gmem-bin_w); + + patch_rbrc(ctx, rb_render_control); } /* before mem2gmem */ @@ -827,7 +833,7 @@ fd3_emit_tile_prep(struct fd_context *ctx, struct fd_tile *tile) uint32_t reg; OUT_PKT0(ring, REG_A3XX_RB_DEPTH_INFO, 2); - reg = A3XX_RB_DEPTH_INFO_DEPTH_BASE(depth_base(gmem)); + reg = A3XX_RB_DEPTH_INFO_DEPTH_BASE(depth_base(ctx)); if (pfb-zsbuf) { reg |= A3XX_RB_DEPTH_INFO_DEPTH_FORMAT(fd_pipe2depth(pfb-zsbuf-format)); } ___ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit
Mesa (10.2): freedreno: use OUT_RELOCW when buffer is written
Module: Mesa Branch: 10.2 Commit: a1b7c7d88e43205dc74d5e9c552c97ab04a0f523 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=a1b7c7d88e43205dc74d5e9c552c97ab04a0f523 Author: Rob Clark robcl...@freedesktop.org Date: Wed May 21 09:24:20 2014 -0400 freedreno: use OUT_RELOCW when buffer is written These aren't buffers we ever read back from CPU, so using incorrect reloc fxn wasn't really harming anything. But might as well be correct. Signed-off-by: Rob Clark robcl...@freedesktop.org (cherry picked from commit 0d54904c04842517c98b82ba7510e022eb8d5ce9) --- src/gallium/drivers/freedreno/a3xx/fd3_gmem.c |8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/gallium/drivers/freedreno/a3xx/fd3_gmem.c b/src/gallium/drivers/freedreno/a3xx/fd3_gmem.c index 2d4763d..f11731f 100644 --- a/src/gallium/drivers/freedreno/a3xx/fd3_gmem.c +++ b/src/gallium/drivers/freedreno/a3xx/fd3_gmem.c @@ -156,7 +156,7 @@ emit_binning_workaround(struct fd_context *ctx) OUT_RING(ring, A3XX_RB_COPY_CONTROL_MSAA_RESOLVE(MSAA_ONE) | A3XX_RB_COPY_CONTROL_MODE(0) | A3XX_RB_COPY_CONTROL_GMEM_BASE(0)); - OUT_RELOC(ring, fd_resource(fd3_ctx-solid_vbuf)-bo, 0x20, 0, -1); /* RB_COPY_DEST_BASE */ + OUT_RELOCW(ring, fd_resource(fd3_ctx-solid_vbuf)-bo, 0x20, 0, -1); /* RB_COPY_DEST_BASE */ OUT_RING(ring, A3XX_RB_COPY_DEST_PITCH_PITCH(128)); OUT_RING(ring, A3XX_RB_COPY_DEST_INFO_TILE(LINEAR) | A3XX_RB_COPY_DEST_INFO_FORMAT(RB_R8G8B8A8_UNORM) | @@ -458,7 +458,7 @@ fd3_emit_tile_mem2gmem(struct fd_context *ctx, struct fd_tile *tile) y1 = ((float)tile-yoff + bin_h) / ((float)pfb-height); OUT_PKT3(ring, CP_MEM_WRITE, 5); - OUT_RELOC(ring, fd_resource(fd3_ctx-blit_texcoord_vbuf)-bo, 0, 0, 0); + OUT_RELOCW(ring, fd_resource(fd3_ctx-blit_texcoord_vbuf)-bo, 0, 0, 0); OUT_RING(ring, fui(x0)); OUT_RING(ring, fui(y0)); OUT_RING(ring, fui(x1)); @@ -639,7 +639,7 @@ update_vsc_pipe(struct fd_context *ctx) int i; OUT_PKT0(ring, REG_A3XX_VSC_SIZE_ADDRESS, 1); - OUT_RELOC(ring, fd3_ctx-vsc_size_mem, 0, 0, 0); /* VSC_SIZE_ADDRESS */ + OUT_RELOCW(ring, fd3_ctx-vsc_size_mem, 0, 0, 0); /* VSC_SIZE_ADDRESS */ for (i = 0; i 8; i++) { struct fd_vsc_pipe *pipe = ctx-pipe[i]; @@ -654,7 +654,7 @@ update_vsc_pipe(struct fd_context *ctx) A3XX_VSC_PIPE_CONFIG_Y(pipe-y) | A3XX_VSC_PIPE_CONFIG_W(pipe-w) | A3XX_VSC_PIPE_CONFIG_H(pipe-h)); - OUT_RELOC(ring, pipe-bo, 0, 0, 0);/* VSC_PIPE[i].DATA_ADDRESS */ + OUT_RELOCW(ring, pipe-bo, 0, 0, 0); /* VSC_PIPE[i].DATA_ADDRESS */ OUT_RING(ring, fd_bo_size(pipe-bo) - 32); /* VSC_PIPE[i].DATA_LENGTH */ } } ___ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit
Mesa (10.2): freedreno: fix for null textures
Module: Mesa Branch: 10.2 Commit: 1840ac43fbc2074c4e5102168434a7dadbc258a7 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=1840ac43fbc2074c4e5102168434a7dadbc258a7 Author: Rob Clark robcl...@freedesktop.org Date: Mon Jun 9 13:34:07 2014 -0400 freedreno: fix for null textures Some apps seem to give us a null sampler/view for texture slots which come before the last used texture slot. In particular 0ad triggers this. Signed-off-by: Rob Clark robcl...@freedesktop.org (cherry picked from commit 6aeeb706d218be030b39e431e53ec07edb974564) --- src/gallium/drivers/freedreno/a3xx/fd3_emit.c | 12 src/gallium/drivers/freedreno/freedreno_texture.c |4 ++-- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/gallium/drivers/freedreno/a3xx/fd3_emit.c b/src/gallium/drivers/freedreno/a3xx/fd3_emit.c index c78d5e8..4c6b5c1 100644 --- a/src/gallium/drivers/freedreno/a3xx/fd3_emit.c +++ b/src/gallium/drivers/freedreno/a3xx/fd3_emit.c @@ -195,8 +195,10 @@ emit_textures(struct fd_ringbuffer *ring, OUT_RING(ring, CP_LOAD_STATE_1_STATE_TYPE(ST_CONSTANTS) | CP_LOAD_STATE_1_EXT_SRC_ADDR(0)); for (i = 0; i tex-num_textures; i++) { - struct fd3_pipe_sampler_view *view = - fd3_pipe_sampler_view(tex-textures[i]); + static const struct fd3_pipe_sampler_view dummy_view = {}; + const struct fd3_pipe_sampler_view *view = tex-textures[i] ? + fd3_pipe_sampler_view(tex-textures[i]) : + dummy_view; OUT_RING(ring, view-texconst0); OUT_RING(ring, view-texconst1); OUT_RING(ring, view-texconst2 | @@ -213,8 +215,10 @@ emit_textures(struct fd_ringbuffer *ring, OUT_RING(ring, CP_LOAD_STATE_1_STATE_TYPE(ST_CONSTANTS) | CP_LOAD_STATE_1_EXT_SRC_ADDR(0)); for (i = 0; i tex-num_textures; i++) { - struct fd3_pipe_sampler_view *view = - fd3_pipe_sampler_view(tex-textures[i]); + static const struct fd3_pipe_sampler_view dummy_view = {}; + const struct fd3_pipe_sampler_view *view = tex-textures[i] ? + fd3_pipe_sampler_view(tex-textures[i]) : + dummy_view; struct fd_resource *rsc = view-tex_resource; for (j = 0; j view-mipaddrs; j++) { diff --git a/src/gallium/drivers/freedreno/freedreno_texture.c b/src/gallium/drivers/freedreno/freedreno_texture.c index 8fb9419..212e506 100644 --- a/src/gallium/drivers/freedreno/freedreno_texture.c +++ b/src/gallium/drivers/freedreno/freedreno_texture.c @@ -57,7 +57,7 @@ static void bind_sampler_states(struct fd_texture_stateobj *prog, for (i = 0; i nr; i++) { if (hwcso[i]) - new_nr++; + new_nr = i + 1; prog-samplers[i] = hwcso[i]; prog-dirty_samplers |= (1 i); } @@ -78,7 +78,7 @@ static void set_sampler_views(struct fd_texture_stateobj *prog, for (i = 0; i nr; i++) { if (views[i]) - new_nr++; + new_nr = i + 1; pipe_sampler_view_reference(prog-textures[i], views[i]); prog-dirty_samplers |= (1 i); } ___ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit