summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2012-11-09dri_util: Fix prologue comment for driCreateConfigsIan Romanick1-17/+5
The parameters and operation of this function changed, but I didn't bother to change the prologue comment. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
2012-11-09swrast: swrastFillInModes doesn't do 8-bit modes, so don't tryIan Romanick1-3/+1
Support for 8-bit modes was removed in commits 0398a26 and bda208a4. However, I didn't notice code in dri_init_screen that explicitly tries to create this modes. This is structurally different from other drivers (that only create modes that match the display color depth). Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=56555 Cc: Vinson Lee <vlee@freedesktop.org>
2012-11-09Fix use of glsl_parser.{cc,h} where source dir != build dir.Darren Salt1-1/+2
Fixes a regression caused by commit 9948a3365. https://bugs.freedesktop.org/show_bug.cgi?id=56787 https://bugs.freedesktop.org/show_bug.cgi?id=56685 Reviewed-by: Matt Turner <mattst88@gmail.com>
2012-11-09Revert "mesa: assert that key->fragprog_inputs_read value isn't too large"Brian Paul1-2/+0
This reverts commit 0d61f879a1f2e6bb37368731a29d5267e1c25195. Assigning the FS inputs to the 12 bit field is fine since we don't care about the higher FS inputs. Maybe I'll revisit silencing the compiler warning another day.
2012-11-09glcpp: wire up glcpp-test to make checkMatt Turner2-4/+14
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-11-09glcpp/tests: Add tests for multiline #elifMatt Turner2-0/+15
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-11-09glcpp/tests: Add test for multiline #ifMatt Turner2-0/+13
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-11-09glcpp/tests: Add test for multiline #lineMatt Turner2-0/+11
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-11-09glcpp/tests: Add test to check #line followed by codeMatt Turner2-0/+5
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=51802 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=51506 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=41152 Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-11-09glcpp: don't push #line directives into next lineFabian Bieler2-9/+9
By moving the HASH_LINE rule out of control_line: and into line:, we avoid adding control_line's additional \n (as seen in the first hunk). mattst88: Carl and I determined independently of Fabian that the 091 test needed to be modified identically to this, and our patch to fix the test was more complicated. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=51506 Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Carl Worth <cworth@cworth.org> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-11-09glcpp: Reject garbage after #else and #endif tokensMatt Turner5-4/+15
Previously we were accepting garbage after #else and #endif tokens when the previous preprocessor conditional evaluated to false (eg, #if 0). When the preprocessor hits a false conditional, it switches the lexer into the SKIP state, in which it ignores non-control tokens. The parser pops the SKIP state off the stack when it reaches the associated #elif, #else, or #endif. Unfortunately, that meant that it only left the SKIP state after the lexing the entire line containing the #token and thus would accept garbage after the #token. To fix this we use a mid-rule, which is executed immediately after the #token is parsed. NOTE: This is a candidate for the stable branch Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=56442 Fixes: preprocess17_frag.test from oglconform Reviewed-by: Carl Worth <cworth@cworth.org> (glcpp-parse.y) Acked-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-11-10r600g: fix printk warningsDave Airlie1-4/+4
Brian reported seeing: r600_texture.c: In function ‘r600_texture_create_object’: r600_texture.c:468:12: warning: format ‘%llu’ expects type ‘long long unsigned int’, but argument 3 has type ‘uint64_t’ r600_texture.c:468:12: warning: format ‘%llu’ expects type ‘long long unsigned int’, but argument 4 has type ‘uint64_t’ r600_texture.c:485:12: warning: format ‘%llu’ expects type ‘long long unsigned int’, but argument 3 has type ‘uint64_t’ r600_texture.c:485:12: warning: format ‘%llu’ expects type ‘long long unsigned int’, but argument 4 has type ‘uint64_t’ this should wrap over them fine. Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-11-10softpipe: fix unused variable warning.Dave Airlie1-1/+1
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-11-10gallium: fix unused cap warnings in drivers for cube map array cap.Dave Airlie3-0/+3
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-11-10r600g: add initial cube map array support (v2)Dave Airlie9-15/+238
This contains the evergreen support. Support is possible on rv670 upwards and the code in here should work, but it doesn't and I haven't debugged it to figure out why. Beyond just adding support for the cube map array sampling, r600 resinfo isn't conformant with the GL specification, which states the number of layers should be returned for the textureSize, so we have to track in an external constant buffer the layers for each sampler if we need them in the shader. v2: only update the sampler constants if the sampler views have changed, as suggested by Marek. Reviewed-by: Marek Olšák <maraeo@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-11-10u_blitter: fix cube array checkDave Airlie1-1/+1
Pointed out by Marek on irc, no committing after beer! Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-11-09util/u_surface: Support 3D/array textures in util_resource_copy_region().José Fonseca1-26/+44
Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2012-11-09draw: Remove redundant draw_geometry_shader_delete().José Fonseca2-8/+2
draw_delete_geometry_shader() seems to be the real one. Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2012-11-09trace: Support geometry shaders.José Fonseca1-115/+71
Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2012-11-09util/u_surface: Fix util_clear_depth_stencil for Z32_FLOAT_S8X24_UINT.José Fonseca1-12/+6
util_pack_z_stencil was being unconditionally invoked for all formats, causing an assertion failure for Z32_FLOAT_S8X24_UINT. NOTE: Candidate for the stable branches. Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2012-11-09galahad: Support geometry shader / stream-output methods.José Fonseca1-82/+110
Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2012-11-09softpipe,util: Fix blending of R and RG formats.José Fonseca1-25/+1
Alpha is also 1 for formats like R32G32_FLOAT. NOTE: Candidate for the stable branches. Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2012-11-09softpipe: Fix rgb_dst_factor == PIPE_BLENDFACTOR_SRC_ALPHA_SATURATE.José Fonseca1-3/+3
We must multiply the factor against the destination, not the source. NOTE: Candidate for the stable branches. Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2012-11-09tgsi: Lift the requirement of indirection being done by ADDR register.José Fonseca1-1/+0
For drivers with native integer / SM4 support this is just an hindrance. Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2012-11-09util: Fix reduction of line adjacency primitives.José Fonseca1-0/+2
Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2012-11-09softpipe: Handle adjacency primitives.José Fonseca1-0/+46
Not fully tested. Based on diagrams from http://msdn.microsoft.com/en-us/library/windows/desktop/bb205124.aspx#Primitive_Adjacency v2: Fix based on Brian's feedback. Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2012-11-09util/u_rect: Make it C++ safe.José Fonseca1-0/+15
Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2012-11-09u_blitter: don't create fragment program for cube maps unless supported.Dave Airlie1-1/+6
should fix http://bugs.freedesktop.org/56906 Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-11-08mesa: Don't glPopAttrib() GL_POINT_SPRITE_COORD_ORIGIN on < OpenGL-2.0Mario Kleiner1-2/+5
The GL_POINT_BIT state attribute GL_POINT_SPRITE_COORD_ORIGIN is only supported on OpenGL-2.0 or later. Prevent glPopAttrib() from trying to restore it on OpenGL-1.4 implementations which support GL_ARB_POINT_SPRITE, as otherwise the sequence... glPushAttrib(GL_POINT_BIT); glPopAttrib(); throws an GL_INVALID_ENUM error in glPopAttrib(). See also commit f778174ea1e431a7113f12c12beb4aba9e825a9f NOTE: This is a candidate for the 9.0 branch. Signed-off-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2012-11-08mesa: Fix glGetVertexAttribI[u]iv now that we have real integer attribs.Kenneth Graunke1-12/+4
Since cf438f5375e242, we store actual integers for the attribute data. We just need to reinterpret the GLfloat array as a GLint/GLuint array so we can read the proper data. Fixes oglconform's glsl-vertex-attrib/basic.VertexAttribI[1234][u]i subtests (after fixing an unrelated bug in those test cases). v2: Use the COPY_4V macro to be concise. NOTE: This is a candidate for the stable branches. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Marek Olšák <maraeo@gmail.com> [v1]
2012-11-08mesa: Fix typo in glDeleteQueriesARB debug message.Kenneth Graunke1-1/+1
"Deleete" all the extra letters!
2012-11-08svga: Fix memory leak in svga_buffer_transfer_map.Vinson Lee1-0/+2
Fixes resource leak defect reported by Coverity. Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Brian Paul <brianp@vmware.com>
2012-11-09docs: update with ARB_texture_cube_map_array supportDave Airlie2-1/+2
just mention softpipe is done, r600g will come soon. Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-11-09u_blitter: add cube map array support.Dave Airlie1-2/+3
This adds cube array support to the blitter. Reviewed-by: Brian Paul <brianp@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-11-09softpipe: add ARB_texture_cube_map_array support (v1.1)Dave Airlie6-44/+274
This adds support to the softpipe texture sampler and tgsi exec. In order to handle the extra input to the texture sampling, I've had to expand the interfaces to take a c1 value for storing the texture compare value for the TEX2 case. v1.1: add comments (Brian) Reviewed-by: Brian Paul <brianp@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-11-09st/mesa: add support for ARB_texture_cube_map_array (v2)Dave Airlie5-23/+64
This adds mesa state tracker support for the new extension, along with glsl->tgsi conversion to use the new opcodes where appropriate. v2: fix assert found running textureSize tests. Reviewed-by: Brian Paul <brianp@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-11-09gallium: add defines/shader opcode for texture cube map arrayDave Airlie6-6/+25
This just adds the texture target and capability along with 3 new opcodes required to support this extension. As this extension requires some texture opcodes with samp + 5 args, we need to use another src register, this is only required for TEX, TXL and TXB opcodes to implement this spec. TEX2 is required for shadow cube map arrays TXL2 is required for cube map array sampler + explicit lod TXB2 is required for cube map array sampler + lod bias Reviewed-by: Brian Paul <brianp@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-11-09mesa: arb_texture_cube_map_array: fix attrib push/popDave Airlie1-2/+4
fdo9833 piglit test caught this. Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-11-09glsl: add ARB_texture_cube_map_array support (v2)Dave Airlie12-7/+114
This adds all the new builtins + the new sampler types, and hooks them up if the extension is supported. v2: fix missing signatures for grad/lod fix missing textureSize clarifications fix compare vs starts with usage Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-11-09mesa: add get support for TEXTURE_BINDING_CUBE_MAP_ARRAY_ARBDave Airlie2-0/+5
Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-11-09mesa: add fbo/texture support for ARB_texture_cube_map_array (v2)Dave Airlie10-7/+107
This adds the mesa core + texture + fbo support for the texture cube map array extension. v2: add comment to _mesa_num_tex_faces related to cube map arrays (Brian) drop wrong comment cut-n-paste (Brian) fix / 6 maximum check issue (Kenneth) coalsece some array case statements (Kenneth) Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Brian Paul <brianp@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-11-09mesa: add ARB_texture_cube_map_array extension bitsDave Airlie2-0/+2
This just adds the bit + extension name. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Brian Paul <brianp@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-11-09glapi: add ARB_texture_cube_map_array.Dave Airlie2-1/+19
This adds the ARB_texture_cube_map_array enums. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Brian Paul <brianp@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-11-09r600g: fix lod bias/explicit lod with cube maps.Dave Airlie1-8/+20
While developing cube map array support I found that we didn't support this properly, also piglit didn't test for it at all. I've submitted a test to piglit to check for this, and this fixes explicit lod and lod bias with cube maps. NOTE: This is a candidate for the 9.0 branch. Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-11-09r600g: clarify const buffer numbering and handlingDave Airlie4-4/+10
For cube map arrays I'll need another driver private constant buffer, and looking forward to UBOs. So clean up with some defines, that can be modified when adding cube map array and ubos later. Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-11-08i965: Fix slow leak of brw->wm.compile_data->storeEric Anholt3-20/+6
We were successfully freeing our compile data at context destroy, but until then we were allocating a new store every compile without freeing it. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=56019 Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-11-08i965/fs: Add support for global copy propagation.Eric Anholt2-20/+199
It is common for complicated shaders, particularly code-generated ones, to have a big array of uniforms or attributes, and a prologue in the shader that dereferences from the big array to more informatively-named local variables. Then there will be some small control flow operation (like a ? : statement), and then use of those informatively-named variables. We were emitting extra MOVs in these cases, because copy propagation couldn't reach across control flow. Instead, implement dataflow analysis on the output of the first copy propagation pass and re-run it to propagate those extra MOVs out. On one future Steam release, reduces VS+FS instruction count from 42837 to 41437. No statistically significant performance difference (n=48), though, at least at the low resolution I'm running it at. shader-db results: total instructions in shared programs: 722170 -> 702545 (-2.72%) instructions in affected programs: 260618 -> 240993 (-7.53%) Some shaders do get hurt by up to 2 instructions, because a choice to copy propagate instead of coalesce or something like that results in a dead write sticking around. Given that we already have instances of those instructions in the affected programs (particularly unigine), we should just improve dead code elimination to fix the problem.
2012-11-09glsl_to_tgsi: fix dst register for texturing fetches.Dave Airlie1-1/+1
I've no idea why there isn't a piglit that triggers this behaviour, but while enabling TBOs for softpipe and r600g, I noticed all the integer tests failed. I tracked it back to the TXF returning a float when it should be returning an int. This fixed it and I haven't seen any regressions in a full piglit run on softpipe. http://bugs.freedesktop.org/55010 NOTE: This is a candidate for the 9.0 branch. Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-11-08r600g: fix pre eg export with llvmVincent Lejeune1-1/+1
Reviewed-by: Alex Deucher <alexander.deucher at amd.com> Reviewed-by: Tom Stellard <thomas.stellard at amd.com>
2012-11-07i965: Fix assertion in brw_alu3.Vinson Lee1-1/+1
Fixes side effect in assertion defect reported by Coverity. Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>