Commit Graph

44719 Commits

Author SHA1 Message Date
Emil Velikov 9b5c538726 st/mesa: Use correct internal target
Commit 1a339b6c(st/mesa: prefer native texture formats when possible)
introduced two new arguments to the st_choose_format() functions.
This patch fixes the order and passes the correct internal_target
rather than GL_NONE

NOTE: This is a candidate for the 7.11 branch
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Brian Paul <brianp@vmware.com>
2011-06-29 07:18:32 -06:00
Thomas Hellstrom 5d2fad5444 st/glx: Fix compilation error
Fix compilation error due to commit
"Rework how drawables are invalidated v3"

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2011-06-29 15:03:52 +02:00
Andre Maasikas 19789e403c st/mesa: fix overwriting gl_format with pipe_format since 9d380f48
fixes assert later on in texcompress2/r600g

Signed-off-by: Brian Paul <brianp@vmware.com>
2011-06-29 06:52:45 -06:00
Thomas Hellstrom ade9f0d727 st/dri: Get rid of the evil struct dri_drawable::context member
It's incorrect to assume a single context bound to a drawable.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2011-06-29 12:48:59 +02:00
Thomas Hellstrom ac8fdbc1c7 st-api: Rework how drawables are invalidated v3.
The api and the state tracker manager code as well as the state tracker code
assumed that only a single context could be bound to a drawable. That is not
a valid assumption, since multiple contexts can bind to the same drawable.

Fix this by making it the state tracker's responsibility to update all
contexts binding to a drawable

Note that the state trackers themselves don't use atomic stamps on
frame-buffers. Multiple context rendering to the same drawable should
be protected by the application.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2011-06-29 12:48:59 +02:00
Stéphane Marchesin 1a7e17e44a i915g: Fix unimplemented Abs comment. 2011-06-29 01:23:44 -07:00
Stéphane Marchesin 4e6120576f i915g: If we have a program, that means the other fields are ours and we can free them.
Otherwise they probably belong to draw.
2011-06-28 20:42:39 -07:00
Stéphane Marchesin c66877c290 i915g: Don't overflow the program buffer.
Otherwise it corrupts other fields of the struct and hilarity ensues.
2011-06-28 20:42:38 -07:00
Stéphane Marchesin dd691032c8 i915g: Update the TODO with another idea. 2011-06-28 20:42:38 -07:00
Paul Berry 3097715d41 glsl: Rewrote _mesa_glsl_process_extension to use table-driven logic.
Instead of using a chain of manually maintained if/else blocks to
handle "#extension" directives, we now consult a table that specifies,
for each extension, the circumstances under which it is available, and
what flags in _mesa_glsl_parse_state need to be set in order to
activate it.

This makes it easier to add new GLSL extensions in the future, and
fixes the following bugs:

- Previously, _mesa_glsl_process_extension would sometimes set the
  "_enable" and "_warn" flags for an extension before checking whether
  the extension was supported by the driver; as a result, specifying
  "enable" behavior for an unsupported extension would sometimes cause
  front-end support for that extension to be switched on in spite of
  the fact that back-end support was not available, leading to strange
  failures, such as those in
  https://bugs.freedesktop.org/show_bug.cgi?id=38015.

- "#extension all: warn" and "#extension all: disable" had no effect.

Notes:

- All extensions are currently marked as unavailable in geometry
  shaders.  This should not have any adverse effects since geometry
  shaders aren't supported yet.  When we return to working on geometry
  shader support, we'll need to update the table for those extensions
  that are available in geometry shaders.

- Previous to this commit, if a shader mentioned
  ARB_shader_texture_lod, extension ARB_texture_rectangle would be
  automatically turned on in order to ensure that the types
  sampler2DRect and sampler2DRectShadow would be defined.  This was
  unnecessary, because (a) ARB_shader_texture_lod works perfectly well
  without those types provided that the builtin functions that
  reference them are not called, and (b) ARB_texture_rectangle is
  enabled by default in non-ES contexts anyway.  I eliminated this
  unnecessary behavior in order to make the behavior of all extensions
  consistent.

NOTE: This is a candidate for the 7.10 and 7.11 branches.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2011-06-28 14:00:20 -07:00
Paul Berry 9c4445de6e glsl: Changed extension enable bits to bools.
These were previously 1-bit-wide bitfields.  Changing them to bools
has a negligible performance impact, and allows them to be accessed by
offset as well as by direct structure access.

NOTE: This is a candidate for the 7.10 and 7.11 branches.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2011-06-28 13:57:03 -07:00
Paul Berry b078aad8ab glsl: permit explicit locations on fragment shader outputs, not inputs
From the OpenGL docs for GL_ARB_explicit_attrib_location:

    This extension provides a method to pre-assign attribute locations to
    named vertex shader inputs and color numbers to named fragment shader
    outputs.

This was accidentally implemented for fragment shader inputs.  This
patch fixes it to apply to fragment shader outputs.

Fixes piglit tests
spec/ARB_explicit_attrib_location/1.{10,20}/compiler/layout-{01,03,06,07,08,09,10}.frag

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>

NOTE: This is a candidate for the 7.10 and 7.11 branches.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=38624
2011-06-28 13:49:11 -07:00
Stéphane Marchesin fe36bc0c41 i915g: Fix comment about sin/cos constants. 2011-06-28 12:07:11 -07:00
Stéphane Marchesin bd1ee76442 i915g: Fix staging texture uploads a bit.
They still look corrupted, but at least now they don't look tiled any more.
2011-06-28 12:05:28 -07:00
Eric Anholt a09c5c2e30 i965: Reissue PIPELINE_POINTERS and BINDING_TABLE_POINTERS on SBA change.
This was a requirement we didn't run into until we started using
STATE_BASE_ADDRESS for instruction data.
2011-06-28 10:17:39 -07:00
Eric Anholt cd7bfd5d44 i965/gen6: Fix scissors using invalid STATE_BASE_ADDRESS.
The scissor state was incorrectly in a .prepare function instead of
.emit, so the packet would end up in the batch before the
STATE_BASE_ADDRESS.  It appears that this doesn't actually hurt, as
the scissor address gets dereferenced according to the current SBA at
draw time.
2011-06-28 10:17:39 -07:00
Alan Hourihane 6479922499 glx: Check HAVE_XF86VIDMODE before adding it as an implicit link
library.
2011-06-28 17:41:39 +01:00
Jon TURNEY db78643182 Don't use -fvisibilty=hidden on cygwin
All it's going to do is generate lots and lots and lots of
'warning: visibility attribute not supported in this configuration; ignored'
warnings

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
2011-06-28 17:07:02 +01:00
Jon TURNEY 560f76227c Fix config check that claims to test if CXX supports -fvisibility=hidden option to actually test the C++ compiler.
Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2011-06-28 17:06:59 +01:00
Stéphane Marchesin de33b0dd23 i915g: Add a debug_printf when we get the Abs flag. 2011-06-28 02:14:43 -07:00
Stéphane Marchesin 2e481e5fc4 i915g: Support PIPE_FORMAT_B10G10R10A2_UNORM. 2011-06-28 01:41:57 -07:00
Stéphane Marchesin 062a1e291f i915g: Improve SIN/COS a bit. 2011-06-28 00:59:41 -07:00
Stéphane Marchesin 77896b256a i915g: When emulating LUMINANCE8 and INTENSITY8 texutres, route alpha properly.
That fixes some formats in fbo-alphatest-formats.
2011-06-28 00:59:40 -07:00
Stéphane Marchesin 6f62a25448 i915g: fix shadow compare.
"Works" as well as i915c now.
2011-06-28 00:59:40 -07:00
Chia-I Wu 24137afb31 targets/egl-static: fix library search order
Use

  $(MKLIB) -ldflags '-L$(TOP)/$(LIB_DIR)'

instead of

  $(MKLIB) -L$(TOP)/$(LIB_DIR)

to make sure the local library path appears before system's.
2011-06-28 15:25:00 +09:00
Chia-I Wu aa281dd392 st/egl: update fbdev backend
Considering fbdev as an in-kernel window system,

 - opening a device opens a connection
 - there is only one window: the framebuffer
 - fb_var_screeninfo decides window position, size, and even color format
 - there is no pixmap

Now EGL is built on top of this window system.  So we should have

 - the fd as the handle of the native display
 - reject all but one native window: NULL
 - no pixmap support

modeset support is still around, but it should be removed soon.
2011-06-28 15:07:30 +09:00
Stéphane Marchesin a2537bbc95 i915g: Enable GL_ARB_instanced_arrays. 2011-06-27 19:27:58 -07:00
Stéphane Marchesin 8dd1e3670f i915g: Fix a bug in facing.
However doesn't work because of limitations in the draw module.
2011-06-27 18:29:50 -07:00
Ben Widawsky 6750226e6d i965: step message register allocation
The system routine requires m0 be reserved for saving off architectural
state. Moved the allocation to start at 2 instead of 0.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
2011-06-27 14:21:22 -07:00
Ian Romanick d2c6cef18a glsl: Fix depth unbalancing problem in if-statement flattening
Previously, if max_depth were 1, the following code would see the
first if-statement (correctly) not get flattened, but the second
if-statement would (incorrectly) get flattened:

void main()
{
    if (a)
        gl_Position = vec4(0);

    if (b)
        gl_Position = vec4(1);
}

This is because the visit_leave(ir_if*) method would not decrement the
depth before returning on the first if-statement.

NOTE: This is a candidate for the 7.10 and 7.11 branches.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-06-27 14:00:14 -07:00
Stéphane Marchesin c191c87c81 i915g: Remove unused cbuf_dirty. 2011-06-27 02:08:44 -07:00
Stéphane Marchesin e2422f77a2 i915g: Add a comment about a bug. 2011-06-27 02:06:00 -07:00
Stéphane Marchesin ef3dac2aff i915g: initial support for SEMANTIC_FACE.
Doesn't work yet, see TODO.
2011-06-27 02:06:00 -07:00
Stéphane Marchesin 4887e1c31a i915g: update TODO. 2011-06-27 02:06:00 -07:00
Stéphane Marchesin 9d29d48bb0 i915g: Return the max result for the fake occlusion queries. 2011-06-27 02:05:59 -07:00
Stéphane Marchesin b13865e694 i915g: Fix depth texture formats.
Depth compare still looks broken though.
2011-06-27 02:05:59 -07:00
Stéphane Marchesin a8ebc5400e i915g: Fix u_blitter comment. 2011-06-27 02:05:59 -07:00
Stéphane Marchesin 811963a7ae i915g: Implement fake DDX/DDY. 2011-06-27 02:05:59 -07:00
Stéphane Marchesin d2f05283d2 i915g: Fix gl_FragCoord. 2011-06-27 02:05:58 -07:00
Benjamin Franzke 992680c8b4 egl: Fix Terminate with shared gbm screens
NOTE: This is a candidate for the 7.11 branch.
2011-06-27 10:25:12 +02:00
Thomas Hellstrom 69140b719b st/xa: Update README.
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2011-06-27 10:23:37 +02:00
Thomas Hellstrom 9a0c5b4634 st/xa: Add a function to check for supported formats
Typically this was done by having a surface creation function fail if
the format was not supported.
However, in some situations when changing hardware surface formats,
it's desirable to do this check before attempting costly readback operations.

Also updated the surface_redefine interface.

Bump minor.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2011-06-27 10:14:39 +02:00
Thomas Hellstrom ab3587f70d st/xa: Various fixes for composite.
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2011-06-27 10:14:34 +02:00
Chia-I Wu 3a07d9594a st/d3d1x: fix for st/egl native.h interface change
The interface was changed in 73df31eedd.
2011-06-27 12:20:52 +09:00
Marek Olšák 618dbc8130 configure.ac: sort Gallium directories alphabetically 2011-06-27 03:12:57 +02:00
Chia-I Wu a1cadf2b5c targets/egl-static: fix building without libudev
Thanks to José for pointing out.
2011-06-26 18:04:42 +09:00
Chia-I Wu 450f486276 targets/egl-static: refactor drm_fd_get_screen_name
Add drm_fd_get_pci_id to get the PCI ID.  Fix a leak with udev on error.
2011-06-26 08:17:52 +09:00
Chia-I Wu ed47d65c7c st/egl: fix a compile error
It is triggered when --with-driver=xlib is specified.
2011-06-26 08:16:59 +09:00
Chia-I Wu 56ec8e17d3 targets/gbm: attemp to fix unresolved symbols
Move system libraries (usually .so) out of --start-group / --end-group
pair.  Add possiblly missing archives, defines, and shared libraries.
2011-06-26 07:42:04 +09:00
Marek Olšák bc517d64da r300g: drop support for ARGB, ABGR, XRGB, XBGR render targets
Blending and maybe even alpha-test don't work with those formats.

Only supporting RGBA, BGRA, RGBX, BGRX.

NOTE: This is a candidate for the 7.10 and 7.11 branches.
2011-06-25 18:34:09 +02:00