summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* svga: Fix user clip planes.José Fonseca2012-01-122-4/+3
| | | | | | | | Dirty flags also need to be updated in face of recent interface change. Fixes regression in compiz. Reviewed-by: Brian Paul <[email protected]>
* softpipe: bump max texture array layers to 256.Dave Airlie2012-01-121-1/+1
| | | | | | This as per GL3 specification. Signed-off-by: Dave Airlie <[email protected]>
* gallium/svga: Pass the SVGA3D_SURFACE_HINT_RENDERTARGET flag to the deviceThomas Hellstrom2012-01-121-3/+6
| | | | | | | | Some hardware versions rely on it to render correctly. Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: José Fonseca <[email protected]> Reviewed-by: Jakob Bornecrantz <[email protected]>
* vbo: fix breakage from previous commitBrian Paul2012-01-111-1/+1
| | | | Don't know how that slipped by.
* vbo: fix void * arithmetic compilation error on MSVCBrian Paul2012-01-111-4/+5
| | | | | Also, call vbo_sizeof_ib_type() once and fix argument cast in MapBufferRange() call.
* docs/GL3: consolidate FBO extensions into one ARBMarek Olšák2012-01-121-3/+1
|
* docs/GL3: document r300 extension supportMarek Olšák2012-01-121-24/+24
|
* docs/GL3: document what's missing for GL3Marek Olšák2012-01-121-2/+2
|
* vbo: introduce vbo_get_minmax_indices functionYuanhan Liu2012-01-128-17/+53
| | | | | | | | | | | | | | | | | | | | | | | Introduce vbo_get_minmax_indices() function to handle the min/max index computation for nr_prims(>= 1). The old code just compute the first prim's min/max index; this would results an error rendering if user called functions like glMultiDrawElements(). This patch servers as fixing this issue. As when nr_prims = 1, we can pass 1 to paramter nr_prims, thus I made vbo_get_minmax_index() static. v2: per Roland's suggestion, put the indices address compuation into vbo_get_minmax_index() instead. Also do comination if possible to reduce map/unmap count v3: per Brian's suggestion, use a pointer for start_prim to avoid structure copy per loop. Signed-off-by: Yuanhan Liu <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: remove const qualifier from fProg to silence warningBrian Paul2012-01-111-1/+1
| | | | The args to _mesa_reference_shader_program() can't be const.
* mesa: include uniforms.h to silence warning, remove unused varBrian Paul2012-01-111-2/+1
|
* mesa: Include glx tests Makefile.in in tarball8.0-branchpointJakob Bornecrantz2012-01-121-0/+2
| | | | | | | Fix suggested by Kenneth Graunke. Signed-off-by: Jakob Bornecrantz <[email protected]> Kenneth Graunke <[email protected]>
* Enable is_front_buffer_rendering variable in case of GL_FRONT_AND_BACKAnuj Phogat2012-01-111-1/+1
| | | | | | | | | | glDrawBuffer(GL_FRONT_AND_BACK) results in to segmentation fault if intel->is_front_buffer_rendering is not enabled with GL_FRONT_AND_BACK. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=44153 Reported-by: Yi Sun <[email protected]> Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: Remove unused opengl version macroJakob Bornecrantz2012-01-111-11/+0
| | | | | Signed-off-by: Jakob Bornecrantz <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* rbug: Silence warningJakob Bornecrantz2012-01-111-1/+2
| | | | | Signed-off-by: Jakob Bornecrantz <[email protected]> Reviewed-by Brian Paul <[email protected]>
* i965: Don't use _mesa_ir_link_shader to do our dirty workIan Romanick2012-01-111-7/+85
| | | | | | | | | | | | | | | | | | | | | Instead, do the uniform setting and input / output mapping directly in brw_link_shader. Hurray for not generating Mesa IR! However, once the i965 driver stops calling _mesa_ir_link_shader, UsesClipDistance and UsesKill are no longer set. Ideally gen6_upload_vs_push_constants should use the gl_shader_program, but I don't see a way to propagate the information there. The other alternative, since this is the only usage, is to move gl_vertex_program::UsesClipDistance to brw_vertex_program. The compile (and precompile) stages use UsesKill to determine the cache key for the shader. This is then used to determine whether or not to compile the shader. Calculating this data during compilation is too late. Signed-off-by: Ian Romanick <[email protected]> Acked-by: Kenneth Graunke <[email protected]> Acked-by: Eric Anholt <[email protected]>
* i965: Don't calculate masks of used FS inputsIan Romanick2012-01-111-0/+15
| | | | | | | | | | | | | This previously enabled some optimizations in the fragment shader (interpolation, etc.) if some input components were always 0.0 or 1.0. However, this data was generated by analyzing Mesa IR. The next patch in this series removes generation of Mesa IR for GLSL paths. When we detect that case, just set the used mask to ~0 and circumvent the optimizations. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* linker: Calculate used samplers and shadow samplers in the linkerIan Romanick2012-01-114-39/+64
| | | | | | | | | | | | It used to be done in ir_to_mesa, and that was kind of a bad place. I didn't change st_glsl_to_tgsi because there is some strange stuff happening in the code that generates glDrawPixels shaders. It looked like this would break horribly if I touched anything. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* linker: Calculate the sampler to texture target mapping during linkingIan Romanick2012-01-118-17/+28
| | | | | | | | | Track the calculated data in gl_shader_program instead of the individual assembly shaders. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* glsl: Add glsl_type::sampler_indexIan Romanick2012-01-112-0/+35
| | | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Validate sampler settings using uniform storageIan Romanick2012-01-113-62/+48
| | | | | | | | | | | | | Rather than looking at the settings in individual assembly programs, look at the settings in the top-level uniform values. The old code was flawed because examining each shader stage in isolation could allow inconsitent usage across stages (e.g., bind unit 0 to a sampler2D in the vertex shader and sampler1DShadow in the fragment shader). Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Track fixed-function fragment shader as a shaderIan Romanick2012-01-117-5/+50
| | | | | | | | | | | | Previously the fixed-function fragment shader was tracked as a gl_program. This means that it shows up in the driver as a Mesa IR program instead of as a GLSL IR program. If a driver doesn't generate Mesa IR from the GLSL IR, that program is empty. If the program is empty there is either no rendering or a GPU hang. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Acked-by: Kenneth Graunke <[email protected]>
* mesa: Use static buffer for uniform nameIan Romanick2012-01-111-1/+6
| | | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Use uniform interfaces in fixed-function fragment shader codeIan Romanick2012-01-111-5/+24
| | | | | | | | | | | Poking directly at the backing resources works only by luck. Core Mesa code should only know about the gl_uniform_storage structure. Soon other code that looks at samplers will use the gl_uniform_storage structures instead of the data in the gl_program. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Acked-by: Kenneth Graunke <[email protected]>
* Clean up GL3 statusMatt Turner2012-01-111-39/+39
| | | | | Reviewed-by: Ian Romanick <[email protected]> Signed-off-by: Matt Turner <[email protected]>
* configure.ac: use AC_PROG_SEDMatt Turner2012-01-111-1/+1
| | | | | | | | | It looks like AC_PROG_SED was added in 2.59b, and wasn't in the original 2.59 in the original 2.59. Presumably that's why, though it could've been an oversight. Reviewed-by: Kenneth Graunke <[email protected]> Signed-off-by: Matt Turner <[email protected]>
* configure.ac: don't set HAVE_GTEST twiceMatt Turner2012-01-111-1/+0
| | | | | Reviewed-by: Ian Romanick <[email protected]> Signed-off-by: Matt Turner <[email protected]>
* i965: Don't reallocate push constant URB space on new VS programs.Kenneth Graunke2012-01-113-10/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The gen7_urb atom depends on CACHE_NEW_VS_PROG and CACHE_NEW_GS_PROG, causing gen7_upload_urb() to be called when switching to a new VS program. In addition to partitioning the URB space between the VS and GS, gen7_upload_urb() also allocated space for VS and PS push constants. Unfortunately, this meant that whenever CACHE_NEW_VS was flagged, we'd reallocate the space for the PS push constants. According to the BSpec, after sending 3DSTATE_PUSH_CONSTANT_ALLOC_PS, we must reprogram 3DSTATE_CONSTANT_PS prior to the next 3DPRIMITIVE. Since our URB allocation for push constants is entirely static, it makes sense to split it out into its own atom that only subscribes to BRW_NEW_CONTEXT. This avoids reallocating the space and trashing constants. Fixes a rendering artifact in Extreme Tuxracer, where instead of a snow trail, you'd get a bright red streak (affectionately known as the "bloody penguin bug"). This also explains why adding VS-related dirty bits to gen7_ps_state made the problem disappear: it made 3DSTATE_CONSTANT_PS be emitted after every 3DSTATE_PUSH_CONSTANT_ALLOC_PS packet. NOTE: This is a candidate for the 7.11 branch. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=38868 Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Paul Berry <[email protected]>
* glx/dri: Initialize api even if num_attribs == 0.Kenneth Graunke2012-01-111-1/+3
| | | | | | | | | | | | Both dri2_create_context_attribs and drisw_create_context_attribs call dri2_convert_glx_attribs, expecting it to fill in *api on success. However, when num_attribs == 0, it was returning true without setting *api, causing the caller to use an uninitialized value. Tested-by: Vadim Girlin <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Signed-off-by: Kenneth Graunke <[email protected]>
* svga: don't reference count svga_sampler_view's textureBrian Paul2012-01-111-2/+12
| | | | | | | | | | | | | | | | svga_sampler_view contains a pointer to a pipe_resource (base class of svga_texture) and svga_texture contains a pointer to an svga_sampler_view. This circular dependency prevented the objects from ever being freed when they pointed to each other. Make the svga_sampler_view::texture pointer a "weak reference" (no reference counting) to break the dependency. This is safe to do because the pipe_resource/texture always has a longer lifespan than the sampler view so when svga_sampler_view stops referencing the texture, the texture's refcount never hits zero. Fixes a memory leak seen with google earth and other apps. Reviewed-by: Jakob Bornecrantz <[email protected]>
* i965: Fix compiler warning from uninitialized "success" value.Eric Anholt2012-01-111-1/+1
| | | | | This shouldn't happen, because the DDX should only load this driver if IS_965. But better to do something defined in that case.
* i965/gen7: Fix segfault in transform feedback to DYNAMIC_DRAW buffers.Eric Anholt2012-01-111-2/+3
| | | | Fixes piglit EXT_transform_feedback/buffer-usage.
* i965/vs: Try to emit more components of constant vectors at once.Eric Anholt2012-01-111-2/+27
| | | | | | | | | | | | | | We were naively emitting each component at a time, even if we were emitting the same value to multiple channels. Improves on a codegen regression from the old VS to the new VS on some unigine shaders (because we emit constant vecs/matrices as immediates instead of loading them as push constants, so we had over 4x the instructions for using them). shader-db results: Total instructions: 58594 -> 58540 11/870 programs affected (1.3%) 765 -> 711 instructions in affected programs (7.1% reduction)
* mesa: add _mesa_HashNumEntries() functionBrian Paul2012-01-112-0/+23
| | | | | Useful when debugging to find the number of texture objects, shader programs, etc.
* st/wgl: Return NULL for NULL HDCs in wglGetExtensionsStringARB.José Fonseca2012-01-111-1/+3
| | | | | | | WGL_ARB_extensions_string states that wglGetExtensionsStringARB should return NULL for invalid HDCs. And some applications rely on it. Reviewed-By: "Keith Whitwell" <[email protected]>
* llvmpipe: disable native integersDave Airlie2012-01-111-1/+8
| | | | | | llvmpipe shouldn't be reporting native integer support. Signed-off-by: Dave Airlie <[email protected]>
* xlib: stop calling XShmQueryVersion()Brian Paul2012-01-111-8/+8
| | | | | | | | | | It caused an X protocol error in some (rare) situations. This is a follow-on to the previous commits which fixes a bug reported by Wayne E. Robertz. NOTE: This is a candidate for the 7.11 branch. Reviewed-by: Adam Jackson <[email protected]>
* st/glx/xlib: call register_with_display() in glXChooseFBConfig()Brian Paul2012-01-111-0/+3
| | | | | | | | | This is the same fix as the previous commit, except it's for the gallium glx/xlib state tracker. NOTE: This is a candidate for the 7.11 branch. Reviewed-by: Adam Jackson <[email protected]>
* xlib: call register_with_display() in Fake_glXChooseFBConfig()Brian Paul2012-01-111-0/+3
| | | | | | | | | | | | as we do in Fake_glXChooseVisual(). This registers the MesaGLX extension on the display so we can clean up buffers, etc. when the display connection is closed. Fixes a bug reported by Wayne E. Robertz. NOTE: This is a candidate for the 7.11 branch. Reviewed-by: Adam Jackson <[email protected]>
* nv50/ir: handle TGSI_OPCODE_ISSGChristoph Bumiller2012-01-111-3/+8
|
* nv50/ir: handle TGSI_TEXTURE_SHADOWCUBEChristoph Bumiller2012-01-111-0/+1
|
* nv50,nvc0: zero out program struct on program_destroyChristoph Bumiller2012-01-112-3/+13
| | | | | | | Prevent any state from carrying over to a new translation in cases where we assume that data is still zero from initial calloc (these would require us to do individual zeroing before translation which would be more code).
* wayland-drm: Drop the non-premul formats, use format codes from drm_fourcc.hKristian Høgsberg2012-01-119-67/+97
|
* draw: Store the new pre_clip_pos member as well.José Fonseca2012-01-111-6/+16
| | | | | Again, not much testing nor peer review, but should be better than what's now.
* egl_dri2: Put the _eglError call in the case switch caseKristian Høgsberg2012-01-111-2/+2
| | | | | Log an error in case we get an unknown format, not in case for XRGB32. I botched the edit of Roberts patch.
* st/mesa: rename translate_texture_target, and make translate_opcode static.Dave Airlie2012-01-113-8/+5
| | | | | | As suggested by Brian. Signed-off-by: Dave Airlie <[email protected]>
* softpipe: route correct coordinates for shadow cube sampling.Dave Airlie2012-01-111-1/+2
| | | | | | This fixes the shadow cube map sampling on softpipe. Signed-off-by: Dave Airlie <[email protected]>
* glsl_to_tgsi: add support for shadow cube map sampling.Dave Airlie2012-01-112-2/+4
| | | | | | | This along with the TGSI support lets the piglit sampler-cube-shadow test pass on softpipe. Signed-off-by: Dave Airlie <[email protected]>
* tgsi: add TGSI_TEXTURE_SHADOWCUBEMAPDave Airlie2012-01-114-1/+6
| | | | | | | | This adds support for shadow cubemap texture sampling instructions. This is required for GL 3.0. Signed-off-by: Dave Airlie <[email protected]>
* llvmpipe: Update for TGSI_INTERPOLATE_COLOR.José Fonseca2012-01-111-7/+3
| | | | | Not thoroughly tested nor reviewed. But should at least prevent the assertion failure.