summaryrefslogtreecommitdiffstats
path: root/src/mesa
Commit message (Collapse)AuthorAgeFilesLines
* i965: Add support for sampling texture buffer objects on gen7+.Eric Anholt2012-04-094-1/+71
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Add real support for texturing/rendering with MESA_FORMAT_RGBA8888_REV.Eric Anholt2012-04-091-5/+1
| | | | | | | | | | | This was hacked in in one place for EGL image stuff, but the right thing to do was just to provide the mapping from the mesa format to the native hardware format, which includes render target support. This turns out to be required for GL_ARB_texture_buffer_object, which sees data in this layout. Reviewed-by: Kenneth Graunke <[email protected]>
* i965/gen7: Fix the /* ignored */ comment on constant surface setup.Eric Anholt2012-04-091-1/+1
| | | | | | | It turns out this field *is* used, and it's the stride between samples from the buffer. Discovered during TBO debugging. Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Add support for the GL 3.1 R/RG formats in texture buffer objects.Eric Anholt2012-04-091-0/+54
| | | | | Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Track a gl_format for the texture buffer format.Eric Anholt2012-04-093-168/+76
| | | | | | | | | | | There was a function full of unused mappings from the GLenum to datatype/comps, but that wasn't all the information a driver would want, which includes the other fields that a gl_format has. Given that all the texture buffer formats were represented in gl_format, just use that as our description. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Handle updating texture state for buffer textures.Eric Anholt2012-04-092-0/+12
| | | | | | | | | We have to skip some work that wants to look at texture images, since buffer textures don't have any of that complexity. Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Create the default (name==0) buffer texture.Eric Anholt2012-04-091-0/+5
| | | | | | | | All that should be needed is that it exists. Fixes segfaults on first _mesa_update_context() with a samplerBuffer-using shader active but without a particular buffer texture enabled. Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Set the correct initial value of the texture buffer object format.Eric Anholt2012-04-091-0/+1
| | | | | | | Fixes piglit GL_ARB_texture_buffer_object/get Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Set up glTexBuffer{,ARB} for display list compile.Eric Anholt2012-04-091-0/+3
| | | | | | | | We're supposed to just immediately call it. Fixes piglit GL_ARB_texture_buffer_object/dlist Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* glapi: regen for TBO change.Eric Anholt2012-04-092-2890/+2872
|
* ff_fragment_shader: Remove some dead fields.Eric Anholt2012-04-091-11/+0
| | | | Reviewed-by: Brian Paul <[email protected]>
* x86-64: Don't print "Initializing x86-64 optimizations" in debug builds.Kenneth Graunke2012-04-091-11/+1
| | | | | | | | | | In "release" builds, Mesa would print this message if the MESA_DEBUG variable was set. Make it so for debug builds as well. I build debug builds all the time, but I'm not debugging this. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* ir_to_mesa: Remove pretense of support for function calls.Kenneth Graunke2012-04-091-181/+5
| | | | | | | | | | | | | | | | | While ir_to_mesa contains code that attempts to support functions, I honestly doubt it's been tested and have little confidence that it works. The comment in visit(ir_function *ir) doesn't inspire confidence: /* Ignore function bodies other than main() -- we shouldn't see calls to * them since they should all be inlined before we get to ir_to_mesa. */ Furthermore, hardware drivers such as i915, i965, and (AFAICT) r200 don't support the BGNSUB/ENDSUB/CAL opcodes anyway. Only swrast does. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* i965: Remove vestiges of function call support from the old VS backend.Kenneth Graunke2012-04-094-188/+0
| | | | | | | | This never worked. brwProgramStringNotify also explicitly rejects programs that use CAL and RET. So there's no need for this to exist. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* i915: set SPRITE_POINT_ENABLE bit correctlyYuanhan Liu2012-04-094-12/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When SPRITE_POINT_ENABLE bit is set, the texture coord would be replaced, and this is only needed when we called something like glTexEnvi(GL_POINT_SPRITE, GL_COORD_REPLACE, GL_TRUE). And more, we currently handle varying inputs as texture coord, we would be careful when setting this bit and set it just when needed, or you will find the value of varying input is not right and changed. Thus we do set SPRITE_POINT_ENABLE bit only when all enabled tex coord units need do CoordReplace. Or fallback is needed to make sure the rendering is right. With handling the bit setup at i915_update_sprite_point_enable(), we don't need the relative code at i915Enable then. This patch would _really_ fix the webglc point-size.html test case and of course, not regress piglit point-sprite and glean-pointSprite testcase. NOTE: This is a candidate for stable release branches. v2: fallback just when all enabled tex coord units need do CoordReplace (Eric) v3: move the sprite point validate code at I915InvalidateState (Eric) v4: sprite point enable bit update based on _NEW_PROGRAM, too add relative _NEW-state comments to show what state is being used(Eric) Signed-off-by: Yuanhan Liu <[email protected]>
* st/mesa: fix max_offset computation for base vertexBrian Paul2012-04-061-2/+18
| | | | | | | | | | | | | | Add the maximum base vertex offset to max_index for computing the buffer size. Fixes a failed assertion in the u_upload_mgr.c code with the VMware svga driver. Fixes https://bugs.freedesktop.org/show_bug.cgi?id=48141 v2: incorporate Marek's suggestions. NOTE: This is a candidate for the 8.0 branch. Reviewed-by: Marek Olšák <[email protected]>
* i965: Actually upload sampler state pointers for the VS unit on Gen6.Kenneth Graunke2012-04-051-1/+1
| | | | | | | | | | | | | | We already program all the sampler state correctly, we just didn't give the GPU a pointer to it for the VS stage. Thus, any texturing other than texelFetch() wouldn't work. Fixes piglit test vs-textureLod-miplevels and 99 of oglconform's glsl-bif-tex subtests. NOTE: This is a candidate for the 8.0 branch. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* swrast: Fix memory leaks in blit_linear.Vinson Lee2012-04-021-0/+9
| | | | | | | | | Fixes Coverity resource leak defects. NOTE: This is a candidate for the 8.0 branch. Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* glsl: Demote 'type' from ir_instruction to ir_rvalue and ir_variable.Kenneth Graunke2012-04-021-1/+1
| | | | | | | | | | | | | Variables have types, expression trees have types, but statements don't. Rather than have a nonsensical field that stays NULL in the base class, just move it to where it makes sense. Fix up a few places that lazily used ir_instruction even though they actually knew the particular subclass. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* glsl: Remove ir_call::get_callee() and set_callee().Kenneth Graunke2012-04-022-2/+2
| | | | | | | | | | | | | Previously, set_callee() performed some assertions about the type of the ir_call; protecting the bare pointer ensured these checks would be run. However, ir_call no longer has a type, so the getter and setter methods don't actually do anything useful. Remove them in favor of accessing callee directly, as is done with most other fields in our IR. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* i965/aub: Dump a final bitmap from DestroyContext.Kenneth Graunke2012-04-023-29/+41
| | | | | | | | | | | | | | | Certain applications don't call SwapBuffers before exiting. Yet, we'd really like to see a bitmap containing the final rendered image even if they choose never to present it. In particular, Piglit tests (at least with -auto -fbo) fall into this category. Many of them failed to dump any images at all. Dumping one final image at context destruction time seems to work. We may wish to pursue a more elegant solution later. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* intel: add PCI IDs for Ivy Bridge GT2 server variantEugeni Dodonov2012-04-012-1/+4
| | | | | | | Those IDs are used by Bromolow. Reviewed-by: Kenneth Graunke <[email protected]> Signed-off-by: Eugeni Dodonov <[email protected]>
* intel: Add some PCI IDs for Haswell.Kenneth Graunke2012-03-302-2/+20
| | | | | | Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eugeni Dodonov <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* i965: Set "Shader Channel Select" fields in Haswell's SURFACE_STATE.Kenneth Graunke2012-03-303-1/+37
| | | | | | | | | | | | These can be used to implement EXT_texture_swizzle without baking state-dependent swizzle instructions into the shader and forcing recompiles. For now, just set them to pass-through mode, so everything continues to work as it did on Ivybridge. We can optimize this later. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* i965: Fill in Sample Mask in Haswell's 3DSTATE_PS.Kenneth Graunke2012-03-302-0/+5
| | | | | | | We only need one sample, since we don't support multisampling yet. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* i965: Set "Stencil Buffer Enable" bit on Haswell.Kenneth Graunke2012-03-302-1/+5
| | | | | Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* i965: Set Line Stipple enable bit in 3DSTATE_SF for Haswell.Kenneth Graunke2012-03-302-0/+5
| | | | | | | Apparently this needs to be the same as in 3DSTATE_WM. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* i965: Update max VS/PS threads shift offsets for Haswell.Kenneth Graunke2012-03-304-4/+10
| | | | | | | These now start at bit 23 instead of bit 24/25. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* i965: Disable HiZ on Haswell for now.Kenneth Graunke2012-03-301-1/+1
| | | | | | | | Getting HiZ working means updating all the state packets for resolves and clears. It's not worth doing until we get the basics working. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* i965: Add initial IS_HASWELL() macros.Kenneth Graunke2012-03-303-5/+14
| | | | | | | | | | | For now, these all return 0, as I don't yet want to enable Haswell support. Eventually they will be filled in with proper PCI IDs. Also add an is_haswell field similar to is_g4x to make it easy to distinguish Gen7 and Gen7.5. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* i965: Avoid explicit accumulator operands in SIMD16 mode on Gen7.Kenneth Graunke2012-03-301-0/+3
| | | | | | | | | | | | | | | According to the BSpec ISA volume's "Accumulator Register" section: "[DevIVB] SIMD16 execution on dwords is not allowed when accumulator is explicit source or destination operand." Fixes piglit tests: - fs-multiply-const-ivec4 - fs-multiply-const-uvec4 - fs-multiply-ivec4-const - fs-multiply-uvec4-const Signed-off-by: Kenneth Graunke <[email protected]>
* gallium: adapt to get_query_result interface changeMarek Olšák2012-03-301-2/+2
| | | | Reviewed-by: Brian Paul <[email protected]>
* intel: fix un-blanced map_refcount issueYuanhan Liu2012-03-281-4/+4
| | | | | | | | | | | | | | | This is a regression introduced by commit cdcfd5, which forget to increase the map_refcount for successfully-mapped region. Thus caused a wrong non-blanced map_refcount. This would fix the regression found in the two following webglc testcase on Pineview platform: texture-npot.html gl-max-texture-dimensions.html Cc: Anuj Phogat <[email protected]> Signed-off-by: Yuanhan Liu <[email protected]> Reviewed-by: Anuj Phogat <[email protected]>
* Add support for GL_EXT_unpack_subimage on GLES2Neil Roberts2012-03-272-5/+22
| | | | | | This extension just permits GL_UNPACK_ROW_LENGTH, GL_UNPACK_SKIP_ROWS and GL_UNPACK_SKIP_PIXELS to be passed to glPixelStore on GLES2 so it is trivial to implement.
* gles: Enable the GL_EXT_read_format_bgra extensionBenjamin Franzke2012-03-272-0/+3
| | | | | | | Also fixes the usage of GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES, which may be set to a BGRA format e.g. for a MESA_FORMAT_ARGB8888 fb. Reviewed-by: Kenneth Graunke <[email protected]>
* gles1: Enable GL_EXT_texture_format_BGRA8888 in APIspecBenjamin Franzke2012-03-271-0/+1
| | | | | | | The extension is already exposed for GLES1, but the APIspec doesnt allow the usage of GL_BGRA_EXT in glTex(Sub)Image2D. Reviewed-by: Kenneth Graunke <[email protected]>
* glapi: regenerate enums.cDylan Noblesmith2012-03-261-3900/+4056
| | | | | | | | | For previous four commits: glapi: add GL_ARB_texture_float glapi: add GL_ARB_depth_buffer_float glapi: add GL_ARB_texture_compression_rgtc glapi: add ARB_texture_rg
* regen for "glapi: sort ARB extensions by number"Dylan Noblesmith2012-03-261-1984/+1984
|
* mesa: Fix memory leak in generate_mipmap_compressed.Vinson Lee2012-03-261-0/+1
| | | | | | | | | | Fixes Coverity resource leak defect. NOTE: This is a candidate for the 8.0 branch. Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: José Fonseca <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* glapi: ARB_blend_func_extended support + regen. (v2)Dave Airlie2012-03-263-4754/+4804
| | | | | | | | | | This adds the xml file covering ARB_blend_func_extended. v2: fix SRC1_ALPHA Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* intel: fix TFP at 16-bppDave Airlie2012-03-251-6/+11
| | | | | | | | don't ask why I had to debug this. tested to fix g-s and kwin at 16-bpp on Ironlake. Signed-off-by: Dave Airlie <[email protected]>
* mesa: Fix memory leak in _mesa_get_uniform_location.Vinson Lee2012-03-231-1/+3
| | | | | | | | | | Fixes Coverity resource leak defect. NOTE: This is a candidate for the 8.0 branch. Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: José Fonseca <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* st/mesa: fix mipmap image size computation w.r.t. texture arraysBrian Paul2012-03-231-3/+15
| | | | | | | | | The image height or depth is the array_size for array textures. Fixes https://bugs.freedesktop.org/show_bug.cgi?id=47742 NOTE: This is a candidate for the 8.0 branch. Reviewed-by: Jakob Bornecrantz <[email protected]>
* mesa: set numFaces=6 for cube maps in _mesa_test_texobj_completeness()Brian Paul2012-03-231-1/+2
| | | | Reviewed-by: José Fonseca <[email protected]>
* intel: fix null dereference processing HiZ bufferDylan Noblesmith2012-03-221-0/+6
| | | | | | | | | | | Or technically, a near-null dereference. https://bugs.freedesktop.org/show_bug.cgi?id=46303 https://bugs.freedesktop.org/show_bug.cgi?id=46739 NOTE: This is a candidate for the 8.0 branch. Reviewed-by: Chad Versace <[email protected]>
* st/mesa: set MaxUnrollIterations = 255Brian Paul2012-03-211-0/+2
| | | | | | | | | | The default was 32 for the EmitNoLoops=0 case. This allows the oZone3D soft shadows test to work properly with the vmware driver. Jose reported that SM3 supports up to 255 loop iterations. NOTE: This is a candidate for the 8.0 branch. Reviewed-by: José Fonseca <[email protected]>
* intel: Make use of the new GPU-unsynchronized map functionality in libdrm.Eric Anholt2012-03-211-1/+3
| | | | | | | | Improves Unigine Tropics performance at 1024x768 by 2.06236% +/- 0.50272% (n=11). Reviewed-by: Chris Wilson <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* intel: Drop the tracking of bo_map vs bo_map_gtt for unmapping.Eric Anholt2012-03-212-15/+2
| | | | | | drm_intel_bo_unmap() supports both in the current libdrm version. Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Avoid flushing the batch for busy BOs for ARB_mbr with INVALIDATE_BUFFER.Eric Anholt2012-03-211-15/+20
| | | | | | | | | Unigine Tropics uses INVALIDATE_BUFFER and not UNSYNCHRONIZED to reset the buffer object when its streaming wraps. Don't penalize it by flushing the batch at the wrap point, just allocate a new BO and get to using it. Reviewed-by: Kenneth Graunke <[email protected]>
* intel: Handle devid overrides using libdrm.Eric Anholt2012-03-211-19/+4
| | | | | Reviewed-by: Yuanhan Liu <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>