aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* dri_util: Fix prologue comment for driCreateConfigsIan Romanick2012-11-091-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 <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* swrast: swrastFillInModes doesn't do 8-bit modes, so don't tryIan Romanick2012-11-091-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 <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=56555 Cc: Vinson Lee <[email protected]>
* Fix use of glsl_parser.{cc,h} where source dir != build dir.Darren Salt2012-11-091-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 <[email protected]>
* Revert "mesa: assert that key->fragprog_inputs_read value isn't too large"Brian Paul2012-11-091-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.
* glcpp: wire up glcpp-test to make checkMatt Turner2012-11-092-4/+14
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* glcpp/tests: Add tests for multiline #elifMatt Turner2012-11-092-0/+15
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* glcpp/tests: Add test for multiline #ifMatt Turner2012-11-092-0/+13
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* glcpp/tests: Add test for multiline #lineMatt Turner2012-11-092-0/+11
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* glcpp/tests: Add test to check #line followed by codeMatt Turner2012-11-092-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 <[email protected]>
* glcpp: don't push #line directives into next lineFabian Bieler2012-11-092-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 <[email protected]> Reviewed-by: Carl Worth <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* glcpp: Reject garbage after #else and #endif tokensMatt Turner2012-11-095-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 <[email protected]> (glcpp-parse.y) Acked-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* r600g: fix printk warningsDave Airlie2012-11-101-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 <[email protected]>
* softpipe: fix unused variable warning.Dave Airlie2012-11-101-1/+1
| | | | Signed-off-by: Dave Airlie <[email protected]>
* gallium: fix unused cap warnings in drivers for cube map array cap.Dave Airlie2012-11-103-0/+3
| | | | Signed-off-by: Dave Airlie <[email protected]>
* r600g: add initial cube map array support (v2)Dave Airlie2012-11-109-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 <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* u_blitter: fix cube array checkDave Airlie2012-11-101-1/+1
| | | | | | | | Pointed out by Marek on irc, no committing after beer! Signed-off-by: Dave Airlie <[email protected]>
* util/u_surface: Support 3D/array textures in util_resource_copy_region().José Fonseca2012-11-091-26/+44
| | | | | Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* draw: Remove redundant draw_geometry_shader_delete().José Fonseca2012-11-092-8/+2
| | | | | | | draw_delete_geometry_shader() seems to be the real one. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* trace: Support geometry shaders.José Fonseca2012-11-091-115/+71
| | | | | Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* util/u_surface: Fix util_clear_depth_stencil for Z32_FLOAT_S8X24_UINT.José Fonseca2012-11-091-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 <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* galahad: Support geometry shader / stream-output methods.José Fonseca2012-11-091-82/+110
| | | | | Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* softpipe,util: Fix blending of R and RG formats.José Fonseca2012-11-091-25/+1
| | | | | | | | | Alpha is also 1 for formats like R32G32_FLOAT. NOTE: Candidate for the stable branches. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* softpipe: Fix rgb_dst_factor == PIPE_BLENDFACTOR_SRC_ALPHA_SATURATE.José Fonseca2012-11-091-3/+3
| | | | | | | | | We must multiply the factor against the destination, not the source. NOTE: Candidate for the stable branches. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* tgsi: Lift the requirement of indirection being done by ADDR register.José Fonseca2012-11-091-1/+0
| | | | | | | For drivers with native integer / SM4 support this is just an hindrance. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* util: Fix reduction of line adjacency primitives.José Fonseca2012-11-091-0/+2
| | | | | Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* softpipe: Handle adjacency primitives.José Fonseca2012-11-091-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 <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* util/u_rect: Make it C++ safe.José Fonseca2012-11-091-0/+15
| | | | | Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* u_blitter: don't create fragment program for cube maps unless supported.Dave Airlie2012-11-091-1/+6
| | | | | | should fix http://bugs.freedesktop.org/56906 Signed-off-by: Dave Airlie <[email protected]>
* mesa: Don't glPopAttrib() GL_POINT_SPRITE_COORD_ORIGIN on < OpenGL-2.0Mario Kleiner2012-11-081-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 <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: Fix glGetVertexAttribI[u]iv now that we have real integer attribs.Kenneth Graunke2012-11-081-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 <[email protected]> Reviewed-by: Marek Olšák <[email protected]> [v1]
* mesa: Fix typo in glDeleteQueriesARB debug message.Kenneth Graunke2012-11-081-1/+1
| | | | "Deleete" all the extra letters!
* svga: Fix memory leak in svga_buffer_transfer_map.Vinson Lee2012-11-081-0/+2
| | | | | | | Fixes resource leak defect reported by Coverity. Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* u_blitter: add cube map array support.Dave Airlie2012-11-091-2/+3
| | | | | | | This adds cube array support to the blitter. Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* softpipe: add ARB_texture_cube_map_array support (v1.1)Dave Airlie2012-11-096-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 <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* st/mesa: add support for ARB_texture_cube_map_array (v2)Dave Airlie2012-11-095-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 <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* gallium: add defines/shader opcode for texture cube map arrayDave Airlie2012-11-096-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 <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* mesa: arb_texture_cube_map_array: fix attrib push/popDave Airlie2012-11-091-2/+4
| | | | | | fdo9833 piglit test caught this. Signed-off-by: Dave Airlie <[email protected]>
* glsl: add ARB_texture_cube_map_array support (v2)Dave Airlie2012-11-0912-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 <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* mesa: add get support for TEXTURE_BINDING_CUBE_MAP_ARRAY_ARBDave Airlie2012-11-092-0/+5
| | | | | | Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* mesa: add fbo/texture support for ARB_texture_cube_map_array (v2)Dave Airlie2012-11-0910-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 <[email protected]> Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* mesa: add ARB_texture_cube_map_array extension bitsDave Airlie2012-11-092-0/+2
| | | | | | | | This just adds the bit + extension name. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* glapi: add ARB_texture_cube_map_array.Dave Airlie2012-11-092-1/+19
| | | | | | | | This adds the ARB_texture_cube_map_array enums. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* r600g: fix lod bias/explicit lod with cube maps.Dave Airlie2012-11-091-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 <[email protected]>
* r600g: clarify const buffer numbering and handlingDave Airlie2012-11-094-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 <[email protected]>
* i965: Fix slow leak of brw->wm.compile_data->storeEric Anholt2012-11-083-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 <[email protected]>
* i965/fs: Add support for global copy propagation.Eric Anholt2012-11-082-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.
* glsl_to_tgsi: fix dst register for texturing fetches.Dave Airlie2012-11-091-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 <[email protected]>
* r600g: fix pre eg export with llvmVincent Lejeune2012-11-081-1/+1
| | | | | Reviewed-by: Alex Deucher <alexander.deucher at amd.com> Reviewed-by: Tom Stellard <thomas.stellard at amd.com>
* i965: Fix assertion in brw_alu3.Vinson Lee2012-11-071-1/+1
| | | | | | | Fixes side effect in assertion defect reported by Coverity. Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* wayland: Destroy frame callback when destroying surfaceJonas Ådahl2012-11-072-0/+6
| | | | | | | | | | | | | | If a frame callback is not destroyed when destroying a surface, its handler function will be invoked if the surface was destroyed after the callback was requested but before it was invoked, causing a write on free:ed memory. This can happen if eglDestroySurface() is called shortly after eglSwapBuffers(). Note: This is a candidate for stable branches. Reviewed-by: Kristian Høgsberg <[email protected]>