- Jan 11, 2012
-
-
Jakob Bornecrantz authored
Fix suggested by Kenneth Graunke. Signed-off-by:
Jakob Bornecrantz <jakob@vmware.com> Kenneth Graunke <kenneth@whitescape.org>
-
Anuj Phogat authored
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 <yi.sun@intel.com> Signed-off-by:
Anuj Phogat <anuj.phogat@gmail.com> Reviewed-by:
Eric Anholt <eric@anholt.net>
-
Jakob Bornecrantz authored
Signed-off-by:
Jakob Bornecrantz <jakob@vmware.com> Reviewed-by:
Brian Paul <brianp@vmware.com>
-
Jakob Bornecrantz authored
Signed-off-by:
Jakob Bornecrantz <jakob@vmware.com> Reviewed-by Brian Paul <brianp@vmware.com>
-
Ian Romanick authored
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 <ian.d.romanick@intel.com> Acked-by:
Kenneth Graunke <kenneth@whitecape.org> Acked-by:
Eric Anholt <eric@anholt.net>
-
Ian Romanick authored
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 <ian.d.romanick@intel.com> Reviewed-by:
Eric Anholt <eric@anholt.net> Reviewed-by:
Kenneth Graunke <kenneth@whitecape.org>
-
Ian Romanick authored
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 <ian.d.romanick@intel.com> Reviewed-by:
Eric Anholt <eric@anholt.net> Reviewed-by:
Kenneth Graunke <kenneth@whitecape.org>
-
Ian Romanick authored
Track the calculated data in gl_shader_program instead of the individual assembly shaders. Signed-off-by:
Ian Romanick <ian.d.romanick@intel.com> Reviewed-by:
Eric Anholt <eric@anholt.net> Reviewed-by:
Kenneth Graunke <kenneth@whitecape.org>
-
Ian Romanick authored
Signed-off-by:
Ian Romanick <ian.d.romanick@intel.com> Reviewed-by:
Eric Anholt <eric@anholt.net> Reviewed-by:
Kenneth Graunke <kenneth@whitecape.org>
-
Ian Romanick authored
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 <ian.d.romanick@intel.com> Reviewed-by:
Eric Anholt <eric@anholt.net> Reviewed-by:
Kenneth Graunke <kenneth@whitecape.org>
-
Ian Romanick authored
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 <ian.d.romanick@intel.com> Reviewed-by:
Eric Anholt <eric@anholt.net> Acked-by:
Kenneth Graunke <kenneth@whitecape.org>
-
Ian Romanick authored
Signed-off-by:
Ian Romanick <ian.d.romanick@intel.com> Reviewed-by:
Eric Anholt <eric@anholt.net> Reviewed-by:
Kenneth Graunke <kenneth@whitecape.org>
-
Ian Romanick authored
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 <ian.d.romanick@intel.com> Reviewed-by:
Eric Anholt <eric@anholt.net> Acked-by:
Kenneth Graunke <kenneth@whitecape.org>
-
Matt Turner authored
Reviewed-by:
Ian Romanick <ian.d.romanick@intel.com> Signed-off-by:
Matt Turner <mattst88@gmail.com>
-
Matt Turner authored
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 <kenneth@whitecape.org> Signed-off-by:
Matt Turner <mattst88@gmail.com>
-
Matt Turner authored
Reviewed-by:
Ian Romanick <ian.d.romanick@intel.com> Signed-off-by:
Matt Turner <mattst88@gmail.com>
-
Kenneth Graunke authored
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 <kenneth@whitecape.org> Reviewed-by:
Paul Berry <stereotype441@gmail.com>
-
Kenneth Graunke authored
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 <vadimgirlin@gmail.com> Reviewed-by:
Ian Romanick <ian.d.romanick@intel.com> Signed-off-by:
Kenneth Graunke <kenneth@whitecape.org>
-
Brian Paul authored
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 <jakob@vmware.com>
-
Emma Anholt authored
This shouldn't happen, because the DDX should only load this driver if IS_965. But better to do something defined in that case.
-
Emma Anholt authored
Fixes piglit EXT_transform_feedback/buffer-usage.
-
Emma Anholt authored
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)
-
Brian Paul authored
Useful when debugging to find the number of texture objects, shader programs, etc.
-
WGL_ARB_extensions_string states that wglGetExtensionsStringARB should return NULL for invalid HDCs. And some applications rely on it. Reviewed-By:
"Keith Whitwell" <keithw@vmware.com>
-
Dave Airlie authored
llvmpipe shouldn't be reporting native integer support. Signed-off-by:
Dave Airlie <airlied@redhat.com>
-
Brian Paul authored
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 <ajax@redhat.com>
-
Brian Paul authored
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 <ajax@redhat.com>
-
Brian Paul authored
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 <ajax@redhat.com>
-
Christoph Bumiller authored
-
Christoph Bumiller authored
-
Christoph Bumiller authored
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).
-
Kristian Høgsberg authored
-
Jose Fonseca authored
Again, not much testing nor peer review, but should be better than what's now.
-
Kristian Høgsberg authored
Log an error in case we get an unknown format, not in case for XRGB32. I botched the edit of Roberts patch.
-
Dave Airlie authored
As suggested by Brian. Signed-off-by:
Dave Airlie <airlied@redhat.com>
-
Dave Airlie authored
This fixes the shadow cube map sampling on softpipe. Signed-off-by:
Dave Airlie <airlied@redhat.com>
-
Dave Airlie authored
This along with the TGSI support lets the piglit sampler-cube-shadow test pass on softpipe. Signed-off-by:
Dave Airlie <airlied@redhat.com>
-
Dave Airlie authored
This adds support for shadow cubemap texture sampling instructions. This is required for GL 3.0. Signed-off-by:
Dave Airlie <airlied@redhat.com>
-
Jose Fonseca authored
Not thoroughly tested nor reviewed. But should at least prevent the assertion failure.
-
Robert Bragg authored
When creating an EGLImage from a struct wl_buffer * this ensures that we create an XRGB8888 image if the wayland buffer doesn't have an alpha channel. To determine if a wl_buffer has a valid alpha channel this patch adds an internal wayland_drm_buffer_has_alpha() function. It's important to get the internal format for an EGLImage right so that if a GL texture is later created from the image then the GL driver will know if it should sample the alpha from the texture or flatten it to a constant of 1.0. This avoids needing fragment program workarounds in wayland compositors to manually ignore the alpha component of textures created from wayland buffers. krh: Edited to use wl_buffer_get_format() instead of wl_buffer_has_alpha(). Reviewed-by:
Kristian Høgsberg <krh@bitplanet.net>
-