summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2015-10-21i965/gs: Set static_vertex_count unconditionally on GEN8+Jason Ekstrand1-1/+1
We always have NIR, so there's no reason for the check. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2015-10-21nir: Constify nir_gs_count_verticesJason Ekstrand2-2/+2
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2015-10-21nir/info: Add more information about geometry shadersJason Ekstrand2-0/+16
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2015-10-21i965: (trivial) rename computes stencil to gen9Ben Widawsky1-1/+1
All the documentation I can find says that this bit (and functionality) only exists on SKL+. Since the bit isn't yet used, there is no real impact here. The original code was added by Ken here (a surprisingly long time ago): commit f3c6d6f1e151f6a44a76038dccebe4434038dcb1 Author: Kenneth Graunke <kenneth@whitecape.org> Date: Thu Nov 29 21:00:27 2012 -0800 i965: Update 3DSTATE_PS, 3DSTATE_WM, and add 3DSTATE_PS_EXTRA. Signed-off-by: Ben Widawsky <ben@bwidawsk.net> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2015-10-21i965: Correct the comment about fb write payloadBen Widawsky1-2/+2
Signed-off-by: Ben Widawsky <ben@bwidawsk.net> Reviewed-by: Francisco Jerez <currojerez@riseup.net>
2015-10-21mesa/glformats: Undo code changes from _mesa_base_tex_format() moveNanley Chery1-141/+8
The refactoring commit, c6bf1cd, accidentally reverted cd49b97 and 99b1f47. These changes caused more code to be added to the function and removed the existing support for ASTC. This patch reverts those modifications. v2. Actually include ASTC support again. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92221 Cc: "11.0" <mesa-stable@lists.freedesktop.org> Signed-off-by: Nanley Chery <nanley.g.chery@intel.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2015-10-21i965: Mark compacted 3-src instructions as Gen8+.Matt Turner1-16/+16
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
2015-10-21i965: Add const to brw_compact_inst_bits.Matt Turner1-2/+2
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
2015-10-21i965: Add mask_control_ex field and handle it in compaction.Matt Turner2-0/+6
Documentation is sparse, but it appears to have existed on G45 and ILK as a second bit extension of the mask_control field. Setting the pair of bits to 0b11 enables "NoCMask". Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
2015-10-21i965: Add devinfo->gen assertions for acc_wr_control.Matt Turner1-3/+3
... and for flag_subreg_nr since it's right near by. Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
2015-10-21i965: Prepare for next commit by adding more whitespace.Matt Turner1-14/+14
We're going to add a field with a longer name that wouldn't align with the rest. Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
2015-10-21i965: Compact acc_wr_control only on Gen6+.Matt Turner1-2/+8
It only exists on Gen6+, and the next patches will add compaction support for the (unused) field in the same location on earlier platforms. Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
2015-10-21i965: Add devinfo parameter to brw_compact_inst_* funcs.Matt Turner2-57/+91
The next commit will add assertions dependent on devinfo->gen. Use compact()/uncompact() macros where possible, like the 3-src code does. Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
2015-10-21i965/vec4: Don't emit MOVs for unused URB slots.Matt Turner2-6/+14
Otherwise we'd emit a MOV from the null register (which isn't allowed). Helps 24 programs in shader-db (the geometry shaders in GSCloth): instructions in affected programs: 302 -> 262 (-13.25%) Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
2015-10-21osmesa: Expose GL entry points for Windows build via DEF file.Nigel Stewart2-0/+674
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92437 CC: "10.6 11.0" <mesa-stable@lists.freedesktop.org> Signed-off-by: Jose Fonseca <jfonseca@vmware.com>
2015-10-21configure.ac: ensure RM is setJonathan Gray1-0/+2
GNU make predefines RM to rm -f but this is not required by POSIX so ensure that RM is set. This fixes "make clean" on OpenBSD. v2: use AC_CHECK_PROG Signed-off-by: Jonathan Gray <jsg@jsg.id.au> CC: "10.6 11.0" <mesa-stable@lists.freedesktop.org> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-10-21i965/fs: Disable opt_sampler_eot for more message typesNeil Roberts1-6/+8
In bfdae9149e0 I disabled the opt_sampler_eot optimisation for TG4 message types because I found by experimentation that it doesn't work. I wrote in the comment that I couldn't find any documentation for this problem. However I've now found the documentation and it has additional restrictions on further message types so this patch updates the comment and adds the others. Reviewed-by: Matt Turner <mattst88@gmail.com>
2015-10-21i965: Remove block arg from foreach_inst_in_block_*_starting_fromNeil Roberts5-9/+8
Since 49374fab5d793 these macros no longer actually use the block argument. I think this is worth doing to make the macros easier to use because they already have really long names and a confusing set of arguments. Reviewed-by: Matt Turner <mattst88@gmail.com>
2015-10-21glsl: check for arrays of arrays when assigning explicit locationsTimothy Arceri1-1/+2
This fixes assigning explicit locations in the CTS test: ES31-CTS.explicit_uniform_location.uniform-loc-arrays-of-arrays Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
2015-10-21glsl: add is_array_of_arrays() helperTimothy Arceri1-0/+5
As suggested by Ian Romanick Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
2015-10-20glsl: Fix bad indentation in bit_logic_result_type().Kenneth Graunke1-47/+47
The first level of indentation was using 4 spaces. Mesa uses 3. Trivial. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
2015-10-21glsl: add AoA support to subroutinesTimothy Arceri2-6/+39
process_parameters() will now be called earlier because we need actual_parameters processed earlier so we can use it with match_subroutine_by_name() to get the subroutine variable, we need to do this inside the recursive function generate_array_index() because we can't create the ir_dereference_array() until we have gotten to the outermost array. For the remainder of the array dimensions the type doesn't matter so we can just use the existing _mesa_ast_array_index_to_hir() function to process the ast. Reviewed-by: Dave Airlie <airlied@redhat.com>
2015-10-21glsl: fix record type detection in explicit location assignTapani Pälli1-1/+1
Check current_var directly instead of using the passed in record_type. This fixes following failing CTS test: ES31-CTS.explicit_uniform_location.uniform-loc-types-structs No Piglit regressions. Signed-off-by: Tapani Pälli <tapani.palli@intel.com> Reviewed-by: Marta Lofstedt <marta.lofstedt@intel.com> Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
2015-10-21glsl: do not try to reserve explicit locations for buffer variablesTapani Pälli1-2/+2
Explicit locations are only used with uniform variables. Signed-off-by: Tapani Pälli <tapani.palli@intel.com> Reviewed-by: Marta Lofstedt <marta.lofstedt@intel.com> Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
2015-10-21glsl: skip buffer variables when filling UniformRemapTableTapani Pälli1-2/+5
UniformRemapTable is used only for remapping user specified uniform locations to driver internally used ones, shader storage buffer variables should not utilize uniform locations. Signed-off-by: Tapani Pälli <tapani.palli@intel.com> Reviewed-by: Marta Lofstedt <marta.lofstedt@intel.com> Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
2015-10-20svga: add switch case for PIPE_SHADER_CAP_MAX_UNROLL_ITERATIONS_HINTBrian Paul1-0/+2
A third instance of this was needed but missed in the previous commit. Return 32 as for the two other cases. Reviewed-by: Roland Scheidegger <sroland@vmware.com> Reviewed-by: Charmaine Lee <charmainel@vmware.com>
2015-10-20draw: fix splitting of line loops (v2)Brian Paul4-8/+32
When the draw module splits long line loops, the sections are emitted as line strips. But the primitive type wasn't set correctly so each section was being drawn as a loop, introducing extra line segments. To fix this, we pass a new DRAW_LINE_LOOP_AS_STRIP flag to the run() function. The linear/elt_run() functions have to check for this flag and set their primitive type accordingly. No piglit regressions. Fixes piglit's lineloop with -count 4097 or higher. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=81174 Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2015-10-20i965/gen9: Remove temporary variable 'bpp' in tr_mode_..._texture_alignment()Anuj Phogat1-10/+6
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com> Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
2015-10-20i965/gen9: Remove temporary variable 'align_yf' in ↵Anuj Phogat1-17/+9
tr_mode_..._texture_alignment() Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com> Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
2015-10-20i965/gen9: Remove parameter 'brw' from tr_mode_..._texture_alignment()Anuj Phogat1-7/+7
V2: Rebased on master. Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com> Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
2015-10-20i965/gen9: Reuse YF alignment tables in tr_mode_..._texture_alignment()Anuj Phogat1-24/+22
Patch just does some refactoring to make the code look better. No functional changes in here. Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com> Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
2015-10-20vbo: convert display list GL_LINE_LOOP prims to GL_LINE_STRIPBrian Paul1-0/+53
When a long GL_LINE_LOOP prim was split across primitives we drew stray lines. See previous commit for details. This patch converts GL_LINE_LOOP prims into GL_LINE_STRIP prims so that drivers don't have to worry about the _mesa_prim::begin/end flags. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=81174 Reviewed-by: Jose Fonseca <jfonseca@vmware.com> Acked-by: Sinclair Yeh <syeh@vmware.com>
2015-10-20vbo: fix GL_LINE_LOOP stray line bugBrian Paul3-3/+56
When long GL_LINE_LOOP primitives don't fit in one vertex buffer they have to be split across buffers. The code to do this was basically correct but drivers had to pay special attention to the _mesa_prim::begin,end flags in order to draw the sections of the line loop properly. Apparently, the only drivers to do this were those using the old 'tnl' module for software vertex processing. Now we convert the split pieces of GL_LINE_LOOP prims into GL_LINE_STRIP primitives so that drivers don't have to worry about the special begin/end flags. The only time a driver will get a GL_LINE_LOOP prim is when the whole thing fits in one vertex buffer. Mostly fixes bug 81174, but not completely. There's another bug somewhere in the src/gallium/auxiliary/draw/ code. If the piglit lineloop test is run with -count 4096, rendering is correct, but with -count 4097 there are stray lines. 4096 is a magic number in the draw code (search for "4096"). Also note that this does not fix long line loops in display lists. The next patch fixes that. v2: fix incorrect -1 in vbo_compute_max_verts(), per Charmaine. Remove incorrect assertion which was added in vbo_copy_vertices(). Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=81174 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=49779 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=28130 Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Jose Fonseca <jfonseca@vmware.com> Reviewed-by: Sinclair Yeh <syeh@vmware.com>
2015-10-20vbo: add new vbo_compute_max_verts() helper functionBrian Paul3-4/+16
Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Jose Fonseca <jfonseca@vmware.com> Reviewed-by: Sinclair Yeh <syeh@vmware.com>
2015-10-20vbo: simplify some code in vbo_exec_End()Brian Paul1-4/+3
Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Jose Fonseca <jfonseca@vmware.com> Reviewed-by: Sinclair Yeh <syeh@vmware.com>
2015-10-20vbo: simplify some code in vbo_copy_vertices()Brian Paul1-6/+5
As before, use a new 'last_prim' pointer to simplify things. Plus, add some const qualifiers. v2: use 'sz' in another place, per Sinclair. And update subject line. Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Jose Fonseca <jfonseca@vmware.com> Reviewed-by: Sinclair Yeh <syeh@vmware.com>
2015-10-20vbo: simplify some code in vbo_exec_wrap_buffers()Brian Paul1-6/+4
Use a new 'last_prim' pointer to simplify things. v2: remove unneeded assert(exec->vtx.prim_count > 0) Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Jose Fonseca <jfonseca@vmware.com> Reviewed-by: Sinclair Yeh <syeh@vmware.com>
2015-10-20vbo: replace the comment on vbo_copy_vertices()Brian Paul1-3/+7
Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Jose Fonseca <jfonseca@vmware.com> Reviewed-by: Sinclair Yeh <syeh@vmware.com>
2015-10-20vbo: make vbo_exec_vtx_wrap() staticBrian Paul2-3/+2
Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Jose Fonseca <jfonseca@vmware.com> Reviewed-by: Sinclair Yeh <syeh@vmware.com>
2015-10-20vbo: remove unneeded ctx parameter for merge_prims()Brian Paul1-3/+2
Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Jose Fonseca <jfonseca@vmware.com> Reviewed-by: Sinclair Yeh <syeh@vmware.com>
2015-10-20tnl: add some comments in render_line_loop codeBrian Paul1-2/+3
And remove '(void) flags' line which is not needed. Reviewed-by: Jose Fonseca <jfonseca@vmware.com> Reviewed-by: Sinclair Yeh <syeh@vmware.com>
2015-10-20mesa: simple whitespace fix in texstore.cBrian Paul1-0/+2
2015-10-20vbo: reduce number of vertex buffer mappings for vertex attributesBrian Paul1-5/+13
Whenever we got a glColor, glNormal, glTexCoord, etc. call outside a glBegin/End pair, we'd immediately map a vertex buffer to begin accumulating vertex data. In some cases, such as with display lists, this led to excessive vertex buffer mapping. For example, if we have a display list such as: glNewList(42, GL_COMPILE); glBegin(prim); glVertex2f(); ... glVertex2f(); glEnd(); glEndList(); Then did: glColor3f(); glCallList(42); We'd map a vertex buffer as soon as we saw glColor3f but we'd never actually write anything to it. Note that the vertex position data was put into a vertex buffer during display list compilation. With this change, we delay mapping the vertex buffer until we actually have a vertex to write to it (triggered by a glVertex() call). In the above case, we no longer map a vertex buffer when setting the color and calling the list. For drivers such as VMware's, reducing buffer mappings gives improved performance. Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2015-10-20st/mesa: optimize 4-component ubyte glDrawPixelsBrian Paul1-9/+95
If we didn't find a gallium surface format that exactly matched the glDrawPixels format/type combination, we used some other 32-bit packed RGBA format and swizzled the whole image in the mesa texstore/format code. That slow path can be avoided in some common cases by using the pipe_samper_view's swizzle terms to do the swizzling at texture sampling time instead. For now, only GL_RGBA/ubyte and GL_BGRA/ubyte combinations are supported. In the future other formats and types like GL_UNSIGNED_INT_8_8_8_8 could be added. v2: fix incorrect swizzle setup (need to invert the tex format's swizzle) Reviewed by: Jose Fonseca <jfonseca@vmware.com>
2015-10-20mesa: make memcpy_texture() non-staticBrian Paul2-20/+31
So that we can use it directly from the mesa/gallium state tracker. Reviewed-by: Jose Fonseca <jfonseca@vmware.com> Reviewed-by: Sinclair Yeh <syeh@vmware.com>
2015-10-20st/mesa: check for out-of-memory in st_DrawPixels()Brian Paul1-32/+44
Before, if make_texture() or st_create_texture_sampler_view() failed we silently no-op'd the glDrawPixels. Now, set GL_OUT_OF_MEMORY. This also allows us to un-nest a bunch of code. v2: also check if allocation of sv[1] fails, per Jose. Reviewed-by: Jose Fonseca <jfonseca@vmware.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2015-10-20st/mesa: use MAX3() instead of MAX2(MAX2) in draw_textured_quad()Brian Paul1-1/+2
Reviewed-by: Jose Fonseca <jfonseca@vmware.com> Reviewed-by: Sinclair Yeh <syeh@vmware.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2015-10-20mesa: fix incorrect opcode in save_BlendFunci()Brian Paul1-1/+1
Fixes assertion failure with new piglit arb_draw_buffers_blend-state_set_get test. Cc: mesa-stable@lists.freedesktop.org Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2015-10-20mesa: add more cases to print_list() in dlist.cBrian Paul1-0/+46
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2015-10-20i965: silence incompatible pointer type warningEmil Velikov1-1/+1
src/mesa/drivers/dri/i965/brw_program.c:94:39: warning: passing argument 1 of ‘_mesa_init_gl_program’ from incompatible pointer type [-Wincompatible-pointer-types] return _mesa_init_gl_program(&prog->program, target, id); ^ Runtime was unaffected as brw_geometry_program is subclassed from gl_geometry_program, thus the address passed was the same. Fixes: bcb56c2c69d (program: convert _mesa_init_gl_program() to take struct gl_program *) Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Matt Turner <mattst88@gmail.com>