summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* mesa version: add _mesa_get_gl_version_overrideJordan Justen2013-02-282-27/+70
| | | | | | | | | This will allow other code to get access to the override version before a context is available. Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* glsl: allow GLSL compiler version to be overridden to 1.50Jordan Justen2013-02-282-0/+3
| | | | | | | | | | | | | Although GLSL 1.50 compiler support is not available, this change will allow MESA_GLSL_VERSION_OVERRIDE=150 to be used while 1.50 support is being developed. Since no drivers claim 1.50 GLSL support, this change should only impact Mesa when MESA_GLSL_VERSION_OVERRIDE=150 is set. Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965/fs: Put immediate operand as src2Matt Turner2013-02-281-1/+1
| | | | | | | | Immediate operands can only be src2 in 2-source instructions. Fixes piglit failures since 0a1d145e (oops!). Spotted-by: Eric Anholt <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* intel: Remove intel_mipmap_tree::wraps_etcChad Versace2013-02-282-21/+3
| | | | | | | | | | | | | | The field was equivalent to (etc_format != MESA_FORMAT_NONE), and therefore duplicate information. This patch removes field and replaces all references to it with `etc_format != MESA_FORMAT_NONE`. No Piglit ETC test regresses on Intel Sandybridge. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Anuj Phogat <[email protected]> Signed-off-by: Chad Versace <[email protected]>
* ir_to_mesa: Translate ir_triop_lrp to OPCODE_LRP.Matt Turner2013-02-281-2/+5
| | | | | Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965/vs: Assert that ir_triop_lrp was lowered.Matt Turner2013-02-281-0/+4
| | | | | Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965/fp: Use the LRP instruction for OPCODE_LRP.Matt Turner2013-02-281-8/+4
| | | | | Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965/fs: Use the LRP instruction for ir_triop_lrp when possible.Kenneth Graunke2013-02-287-5/+75
| | | | | | | | | | | | | | | | | | | v2 [mattst88]: - Add BRW_OPCODE_LRP to list of CSE-able expressions. - Fix op_var[] array size. - Rename arguments to emit_lrp to (x, y, a) to clear confusion. - Add LRP function to brw_fs.cpp/.h. - Corrected comment about LRP instruction arguments in emit_lrp. v3 [mattst88]: - Duplicate MAD code for LRP instead of using a function pointer. - Check for != GRF instead of == IMM in emit_lrp. - Lower LRP on gen < 6. Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Signed-off-by: Kenneth Graunke <[email protected]> 1
* i965: Add support for emitting the LRP instruction.Kenneth Graunke2013-02-284-0/+4
| | | | | | | | Like MAD, this is another three-source instruction. Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Signed-off-by: Kenneth Graunke <[email protected]>
* glsl: Optimize ir_triop_lrp(x, y, a) with a = 0.0f or 1.0fMatt Turner2013-02-281-0/+11
| | | | | Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* glsl: Convert mix() to use a new ir_triop_lrp opcode.Kenneth Graunke2013-02-2811-12/+84
| | | | | | | | | | | | | | | | | | | | | | | | Many GPUs have an instruction to do linear interpolation which is more efficient than simply performing the algebra necessary (two multiplies, an add, and a subtract). Pattern matching or peepholing this is more desirable, but can be tricky. By using an opcode, we can at least make shaders which use the mix() built-in get the more efficient behavior. Currently, all consumers lower ir_triop_lrp. Subsequent patches will actually generate different code. v2 [mattst88]: - Add LRP_TO_ARITH flag to ir_to_mesa.cpp. Will be removed in a subsequent patch and ir_triop_lrp translated directly. v3 [mattst88]: - Move changes from the next patch to opt_algebraic.cpp to accept 3-src operations. Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Signed-off-by: Kenneth Graunke <[email protected]>
* glsl: Rework ir_reader to handle expressions with three operands.Kenneth Graunke2013-02-281-26/+19
| | | | | Reviewed-by: Matt Turner <[email protected]> Signed-off-by: Kenneth Graunke <[email protected]>
* glsl: Consolidate ir_expression constructors that use explicit types.Kenneth Graunke2013-02-282-37/+10
| | | | | | | | | | | | | | | | | | | Previously, we had separate constructors for one, two, and four operand expressions. This patch consolidates them into a single constructor which uses NULL default parameters. The unary and binary operator constructors had assertions to verify that the caller supplied the correct number of operands for the expression, but the four-operand version did not. Since get_num_operands for ir_quadop_vector returns the number of vector_elements, we can safely add that without breaking the semantics of ir_quadop_vector. This also paves the way for expressions with three operands. Currently, none can be constructed since get_num_operands() never returns 3. Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Signed-off-by: Kenneth Graunke <[email protected]>
* i965/vs/gen7: Allow MATH instructions to have MRF as a destinationMatt Turner2013-02-281-1/+1
| | | | | | | | | total instructions in shared programs: 346873 -> 346847 (-0.01%) instructions in affected programs: 364 -> 338 (-7.14%) (All affected shaders are from Lightsmark) Reviewed-by: Eric Anholt <[email protected]>
* i965/fs/gen7: Allow MATH instructions to have MRF as a destinationMatt Turner2013-02-281-1/+1
| | | | | | | total instructions in shared programs: 1376297 -> 1375626 (-0.05%) instructions in affected programs: 35977 -> 35306 (-1.87%) Reviewed-by: Eric Anholt <[email protected]>
* i965/gen7: Relax restrictions on fake MRFsMatt Turner2013-02-281-2/+4
| | | | | | | | | | | | | Gen6 has write-only MRF registers, and for ease of implementation we paritition off 16 general purposes registers to act as MRFs on Gen7. Knowing that our Gen7 MRFs are actually GRFs, we can do things we can't do with real MRFs: - read from them; - return values directly to them from a send instruction; and - compute directly to them with math instructions. Reviewed-by: Eric Anholt <[email protected]>
* i965/fs: Remove duplicate scan_inst->mlen checkMatt Turner2013-02-281-5/+0
| | | | | | Is already checked 20 lines below. Reviewed-by: Eric Anholt <[email protected]>
* clover: Fix build with LLVM 3.3 v2Tom Stellard2013-02-282-9/+40
| | | | | | | | v2: - Fix order that the clang libraries are passed to the linker to avoid missing symbol errors. Acked-by: Francisco Jerez <[email protected]>
* attrib: push/pop FRAGMENT_PROGRAM_ARB stateJordan Justen2013-02-281-0/+12
| | | | | | | | | | | | | | This requirement was added by ARB_fragment_program When the Steam overlay is enabled, this fixes: * Menu corruption with the Puddle game * The screen going black on Rochard when the Steam overlay is accessed NOTE: This is a candidate for the 9.0 and 9.1 branches. Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* scons: Fix Windows build with LLVM 3.2Keith Kriewall2013-02-281-1/+13
| | | | | | | | Fixes fdo bug 61299 NOTE: This is a candidate for the stable branches. Signed-off-by: José Fonseca <[email protected]>
* autotools: oprofilejit should be included in the list of LLVM components ↵Adam Sampson2013-02-281-0/+3
| | | | | | | | required NOTE: This is a candidate for the stable branch. Signed-off-by: José Fonseca <[email protected]>
* r600g: workaround hyperz lockup on evergreenJerome Glisse2013-02-284-2/+23
| | | | | | | | | | | This work around disable hyperz if write to zbuffer is disabled. Somehow using hyperz when not writting to the zbuffer trigger GPU lockup. See : https://bugs.freedesktop.org/show_bug.cgi?id=60848 Candidate for 9.1 Signed-off-by: Jerome Glisse <[email protected]>
* texobj: add verbose api trace messages to several routinesJordan Justen2013-02-271-0/+21
| | | | | | | | Motivated by wanting to see if GenTextures was called by an application while debugging another Steam overlay issue. Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* llvmpipe: check buffers in llvmpipe_is_resource_referenced.Roland Scheidegger2013-02-283-8/+24
| | | | | | | | | | | Now that buffers can be used as textures or render targets make sure they aren't skipped. Fix suggested by Jose Fonseca. v2: added a couple of assertions so we can actually guarantee we check the resources and don't skip them. Also added some comments that this is actually a lie due to the way the opengl buffer api works.
* llvmpipe: support rendering to buffer render targets.Roland Scheidegger2013-02-284-47/+61
| | | | | | | | | | Unfortunately not usable from OpenGL, and no cap bit. Pretty similar to a 1d texture, though allows specifying a start element. v2: also fix up renderbuffer width (which will get promoted to fb width) to be the number of elements Reviewed-by: Jose Fonseca <[email protected]>
* util: fix issues with util_clear_render_target.Roland Scheidegger2013-02-281-9/+46
| | | | | | | | For PIPE_BUFFER we need coord adjustments for the transfer. And for pure integer formats util_pack_color just crashes, need to handle that differently due to clear colors being ints/uints. Reviewed-by: Jose Fonseca <[email protected]>
* softpipe/draw/tgsi: simplify driver/tgsi sampler interfaceRoland Scheidegger2013-02-2815-189/+249
| | | | | | | | | | | | | | | Use a single sampler adapter instead of per-sampler-unit samplers, and just pass along texture unit and sampler unit in the calls. The reason is that for dx10-style sample opcodes pre-wired samplers including all the texture state aren't really feasible (and for sample_i/sviewinfo we don't even have samplers). Of course right now softpipe doesn't actually do anything more than just look up all its pre-wired per-texunit/per-samplerunit sampler as it did before so this doesn't really achieve much except one more function call, however this is now all softpipe's fault (fixing that in a way which doesn't suck is still an unsolved problem). Reviewed-by: Jose Fonseca <[email protected]>
* gallivm: fix mis-matching AOS instruction emissionMaxence Le Doré2013-02-271-1/+1
| | | | Signed-off-by: José Fonseca <[email protected]>
* glx: Fix glXCreateWindow() when GLX_DIRECT_RENDERING is undefinedJon TURNEY2013-02-271-1/+1
| | | | | | | | glXCreateWindow() and glXCreatePbuffer() always fail when built without GLX_DIRECT_RENDERING defined since commit 48331047. Reviewed-by: Adam Jackson <[email protected]> Signed-off-by: Jon TURNEY <[email protected]>
* configure.ac: Clarify the description of the --with-opencl-libdir parameter ↵Francisco Jerez2013-02-271-1/+1
| | | | | | | | a little. https://bugs.freedesktop.org/show_bug.cgi?id=61415 Signed-off-by: Francisco Jerez <[email protected]>
* radeonsi: Fix memory leak in si_set_constant_buffer.Vinson Lee2013-02-261-0/+1
| | | | | | | | Fixes resource leak defect reported by Coverity. Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
* st/vega: Fix memory leak in combine_shaders.Vinson Lee2013-02-261-1/+3
| | | | | | | Fixes resource leak defect reported by Coverity. Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* egl/wayland: Don't block on EGL_DEFAULT_DISPAY under waylandKristian Høgsberg2013-02-261-0/+4
| | | | | | | Normally the application will own the main event queue and be responsible for moving events. In case of EGL_DEFAULT_DISPLAY, EGL opens the display and has to own the main queue so it can move the events itself. Call wl_display_dispatch_pending() to take ownership.
* egl: Allow 24-bit visuals for 32-bit RGBA8888 configsIan Romanick2013-02-261-1/+8
| | | | | | | | | | | | | | | | | | | | | Previously only the 32-bit X visual would match the 32-bit RGBA8888 configs. This resulted in every config with alpha getting the "magic" visual whose alpha is used by the compositor. This also resulted in no multisample visuals being advertised. How many ways could we lose? This patch inverts the problem... now you can't get the visual with alpha used by the compositor even if you want it. I think we need to invent a new value for EGL_TRANSPARENT_TYPE that apps can use to get this. I'm surprised that there isn't already a choice for EGL_TRANSPARENT_ALPHA. NOTE: This is a candidate for the 9.1 branch. Signed-off-by: Ian Romanick <[email protected]> Tested-by: Tian Ye <[email protected]> Acked-by: Kristian Høgsberg <[email protected]> Reviewed-by: Chad Versace <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=59783
* st/mesa: remove some conditionals in update_raster_state()Brian Paul2013-02-261-15/+8
| | | | | | Just use simple assignments. Reviewed-by: Marek Olšák <[email protected]>
* r600g: add missing emit_flush for R600_CONTEXT_FLUSH_AND_INV caseAlex Deucher2013-02-261-0/+1
| | | | | | | | We set the cp_coher_cntl bits but never emit them. Signed-off-by: Alex Deucher <[email protected]> Reviewed-by: Jerome Glisse <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* r600g: synchronize streamout buffers on r6xx too (v3)Alex Deucher2013-02-261-1/+1
| | | | | | | | | | | Streamout buffers need to be synchronized on r6xx as well. v2: Add DEST flush as well. v3: drop DEST flush Signed-off-by: Alex Deucher <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* winsys/null: fix var typo templet->templatBrian Paul2013-02-261-1/+1
|
* svga: fix comment typosBrian Paul2013-02-261-1/+1
|
* r300g: implement 3D transfersMarek Olšák2013-02-261-2/+18
| | | | Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=61351
* gallium/util: add helper util_max_layer from r600gMarek Olšák2013-02-267-47/+31
|
* llvmpipe: (trivial) get rid of old function prototypes.Roland Scheidegger2013-02-251-7/+0
| | | | | llvmpipe_init_screen/context_texture_funcs have long been replaced with the respective "resource" funcs.
* draw: make sure pipeline is revalidated when sampler views or samplers change.Roland Scheidegger2013-02-252-1/+6
| | | | | | | | | | | Since with llvm execution parts of sampler view and sampler state is baked into the shader, we need to revalidate otherwise the wrong shader might get used. (Not completely sure but I think this would not be required for non-llvm case, along with everything else in these functions.) This caused bugs in piglit arb_texture_buffer_object-formats, because we never noticed that the view format changed. Reviewed-by: Jose Fonseca <[email protected]>
* llvmpipe: support GL_ARB_texture_buffer_object/GL_ARB_texture_buffer_rangeRoland Scheidegger2013-02-2512-115/+191
| | | | | | | | | | | | | | | | | | | | This also fixes not honoring first/last_layer view parameters for array textures, plus not honoring last_level view parameter for all textures (neither is really used by OpenGL). This mostly passes piglit arb_texture_buffer_object tests (it needs, however, glsl 140 version override, plus GL 3.1 override, the latter only because mesa does not allow ARB_tbo in non-core contexts). Most arb_texture_buffer_object tests pass, with the exception of arb_texture_buffer_object-formats. With "arb" parameter it passes most weirdo formats before it segfaults in the state tracker, this looks to be some issue with using legacy formats in core context (fails the same in softpipe). With "core" parameter it passes with "fs", however fails with "vs" (for most formats). This will be fixed later (debugging shows we're completely missing the shader recompile depending on format). v2: based on Jose's feedback, fix comments, variable/function names. Reviewed-by: Jose Fonseca <[email protected]>
* i965: Fix the W value of deprecated pointcoords on pre-gen6.Eric Anholt2013-02-251-1/+18
| | | | | | | | | | | | | | When you didn't have a texcoord array bound (or a non-1 current w attrib), we were telling the fragment shader that it could just use "1" instead of doing expensive pre-gen6 math to invert it. If you drew the point with a non-1 W value, then you'd get the right size (since all the vertex computations worked), but we'd mis-interpolate the coordinate across the face. Fixes the mesa pointsprite demo on GM45. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=30232 Reviewed-and-tested-by: Ian Romanick <[email protected]> Note: This is a candidate for the stable branches.
* mesa/es: NULL check in EGLImageTargetTexture2DOESTapani Pälli2013-02-251-0/+6
| | | | | | | | | check that pointer passed is valid and return error if not. Note: This is a candidate for the stable branches. Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* mesa: add missing case in _mesa_GetTexParameterfv()Tapani Pälli2013-02-251-0/+6
| | | | | | | | | | missing case GL_REQUIRED_TEXTURE_IMAGE_UNITS_OES is required by OES_EGL_image_external extension. Note: This is a candidate for the stable branches. Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* docs: add news item for mesa-demos 8.1.0 releaseAndreas Boll2013-02-251-0/+9
|
* docs: import release notes for 9.1, add news itemAndreas Boll2013-02-252-2/+14
|
* glsl: Remove VS output varyings which are optimized out of the FSJordan Justen2013-02-231-1/+18
| | | | | | | | | | | | | Previously when an input varying was optimized out of the FS we would still retain it as an output of the VS. We now build a hash of live FS input varyings rather than looking in the FS symbol table. (The FS symbol table will still contain the optimized out varyings.) Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Paul Berry <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>