Commit Graph

42376 Commits

Author SHA1 Message Date
Chia-I Wu 218381d927 egl_dri2: Export glapi symbols for DRI drivers.
When an app loads libEGL.so dynamically with RTLD_LOCAL, loading DRI
drivers would fail because of missing glapi symbols.  This commit makes
egl_dri2 load libglapi.so with RTLD_GLOBAL to export glapi symbols for
future symbol resolutions.

The same trick can be found in GLX.  However, egl_dri2 can only do so
when --enable-shared-glapi is given.  Because, otherwise, both libGL.so
and libglapi.so define glapi symbols and egl_dri2 cannot tell which
library to load.
2011-01-30 05:28:24 +08:00
Chia-I Wu f36cba6cf3 egl: Make the transition to built-in drivers more smooth.
When the user sets EGL_DRIVER to egl_dri2 (or egl_glx), make sure the
built-in driver is used.  The user might leave the outdated egl_dri2.so
(or egl_glx.so) on the filesystem and we do not want to load it.
2011-01-30 04:55:08 +08:00
Chia-I Wu b825e49552 mapi: Workaround a bug in makedepend.
makedepend would crash when a source includes a header indirectly, such
as

  #define HEADER "some-header.h"
  #include HEADER

Do not define HEADER (makedepend would detects this as an incomplete
include) and add the dependency manually in the Makefile.

This should hopefully fix bug #33374.
2011-01-29 19:22:54 +08:00
Marek Olšák 2a456dc123 u_blitter: use user buffers instead of real buffers
User buffers may be the fastest way to upload data.
2011-01-29 05:17:43 +01:00
Brian Paul c5fb0518f4 gallium/docs: add info about transfer boxes and array textures 2011-01-28 20:25:27 -07:00
Brian Paul f9a36a496f gallium: added comments to pipe_transfer 2011-01-28 20:25:27 -07:00
Brian Paul 1dd8e27578 st/mesa: fix texture array dimensions
For 1D/2D texture arrays use the pipe_resource::array_size field.
In OpenGL 1D arrays texture use the height dimension as the array
size and 2D array textures use the depth dimension as the array size.
Gallium uses a special array_size field instead.  When setting up
gallium textures or comparing Mesa textures to gallium textures we
need to be extra careful that we're comparing the right fields.

The new st_gl_texture_dims_to_pipe_dims() function maps OpenGL
texture dimensions to gallium texture dimensions and simplifies
this quite a bit.
2011-01-28 20:25:27 -07:00
Brian Paul 80777743b7 softpipe: fix array textures to use resource array_size
Don't use height for 1D array textures or depth for 2D array textures.
2011-01-28 20:25:27 -07:00
Brian Paul b3cfcdf923 mesa: fix typo, wrap long line 2011-01-28 20:25:26 -07:00
Brian Paul db3a8af7f9 st/mesa: pass layers param to st_texture_create() 2011-01-28 20:25:26 -07:00
Carl Worth 2a18d1950c Revert "glcpp: Demote "macro redefined" from an error to a warning"
This reverts commit d3df641f0a.

The original commit had sat unpushed on my machine for months. By the
time I found it again, I had forgotten that we had decided not to use
this change after all, (the relevant test was removed long ago).
2011-01-29 08:21:05 +10:00
Jakob Bornecrantz 3451ee056c util: Fix leak of transfers in upload manager 2011-01-28 22:10:53 +01:00
Brian Paul e89fc33d7a docs: removed VC8 project files 2011-01-28 13:40:47 -07:00
Brian Paul f247175e4a mesa: omit VC8 project files from tarball 2011-01-28 13:40:47 -07:00
Thierry Vignaud d3d6beec96 Fix missing files in Mesa tarballs.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
2011-01-28 12:31:04 -08:00
Chad Versace c494763579 mesa: Fix available APIs for AMD_conservative_depth
Remove ES2, since AMD_conservative_depth is not listed in the OpenGL ES
extension registry.
2011-01-28 11:19:51 -08:00
Marek Olšák c6ace30028 r300/compiler: print stats based on the initial number of instructions
The same number of shaders is now printed regardless of optimizations being
enabled or not, so that we can compare shader stats side by side easily.
2011-01-28 19:37:31 +01:00
Marek Olšák 0029979eee r300g: fix resource_copy_region for DXT SRGB formats 2011-01-28 17:15:22 +01:00
Carl Worth d3df641f0a glcpp: Demote "macro redefined" from an error to a warning
The GLSL specification is vague here, (just says "as is standard for
C++"), though the C specifications seem quite clear that this should
be an error.

However, an existing piglit test (CorrectPreprocess11.frag) expects
this to be a warning, not an error, so we change this, and document in
README the deviation from the specification.
2011-01-28 15:16:36 +10:00
Dave Airlie 476db2bd3d dri: add a placeholder for the framebuffer sRGB capable bit.
This is needed to build the X server GLX_EXT_framebuffer_sRGB bits.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-01-28 11:45:44 +10:00
Dimitry Andric cfb9aae3ec glapi: add @GOTPCREL relocation type
Fixes http://bugs.freedesktop.org/show_bug.cgi?id=33440
This replaces commit 731ec60da3

NOTE: This is a candidate for the 7.9 and 7.10 branches

Signed-off-by: Brian Paul <brianp@vmware.com>
2011-01-27 18:04:57 -07:00
Marek Olšák 6dc0a0e71f r600g: handle PIPE_CAP_ARRAY_TEXTURES 2011-01-28 01:58:30 +01:00
Marek Olšák 588c925224 r300g: handle PIPE_CAP_ARRAY_TEXTURES 2011-01-28 01:56:57 +01:00
Marek Olšák baf2a795eb r300g: 8x8-compressed zbuffer can only be point-sampled 2011-01-28 01:16:27 +01:00
Marek Olšák 2050f2ab96 r300g: fix and re-enable 8x8 zbuffer compression mode
Also cleanup the whole thing.
2011-01-28 01:04:51 +01:00
Marek Olšák 82e60236a9 r300g: print driver info if RADEON_DEBUG=info 2011-01-27 23:17:41 +01:00
Marek Olšák 39f16e2aa7 r300g: add winsys flag CAN_AACOMPRESS 2011-01-27 23:13:28 +01:00
Marek Olšák 2e3ccada07 r300g: rename flag squaretiling -> drm_2_1_0 2011-01-27 23:06:15 +01:00
Marek Olšák e0b98cde41 docs: update GL3 status 2011-01-27 21:17:25 +01:00
Marek Olšák 387fe8dd47 util: fix parsing debug options
So that 'foo' can be found in: OPTION=prefixfoosuffix,foo

Also allow that debug options can be separated by a non-alphanumeric characters
instead of just commas.
2011-01-27 20:32:03 +01:00
Marek Olšák db299a9f82 r300g: fix some bugs with zbuffer compression (v4)
This drops the memblock manager for ZMASK. Instead, only one zbuffer can be
compressed at a time. Note that this does not necessarily have to be slower.
When there is a large number of zbuffers, compression might be used more often
than it was before. It's also easier to debug.

How it works:
1) 'clear' turns the compression on.
2) If some other zbuffer is set or the currently-bound zbuffer is used
   for texturing, the driver decompresses it and then turns the compression off.

Notes:
- The ZMASK clear has been refactored, so that only one packet3 is used to clear
  ZMASK.
- The 8x8 compression mode is disabled. I couldn't make it work without issues.
- Also removed driver-specific stuff from u_blitter.

Driver status:
- RV530 and R580 appear to just work (finally).
- RV570 should work, but there may be an issue that we don't correctly
  calculate the number of dwords to clear, resulting in a partially
  uninitialized zbuffer.
- RS690 misrenders as if no ZMASK clear happened. No idea what's going on.
- RV350 may even hardlock. This issue was already present and this patch doesn't
  fix it.

I think we are still missing some hardware info we need to make the zbuffer
compression work fully.

Note that there is also an issue with HiZ, resulting in a sort of blocky
zigzagged corruption around some objects.
2011-01-27 18:12:01 +01:00
Brian Paul 7a4345fd83 glsl: use 'this' pointer to be consistent 2011-01-26 21:16:41 -07:00
Brian Paul 2b7be12d54 glsl: remove needless conditional 2011-01-26 21:16:32 -07:00
Brian Paul 86471246f0 glsl: move ir_var_out code 2011-01-26 21:16:14 -07:00
Brian Paul 7baa498ae4 glsl: move ir_var_system_value code 2011-01-26 21:15:52 -07:00
Brian Paul 304b239869 glsl: use local var to simplify code a bit 2011-01-26 21:15:39 -07:00
Zack Rusin 59dbdbbb7d mesa: fix compilation
this isn't c++ please don't mix declerations with code
2011-01-26 21:20:53 -05:00
Chad Versace 67c67ee80f glsl: Refresh autogenerated lexer file
For previous commit.
2011-01-26 16:37:45 -08:00
Chad Versace cc4a787044 glsl: Remove extraneously extraneous parens
I found this parenthetical usage of parentheses to be extraneously
extraneous:
   (yyextra->ARB_fragment_coord_conventions_enable)
2011-01-26 16:37:45 -08:00
Chad Versace ad3dc370d8 mesa: Allow extensions in MESA_EXTENSION_OVERRIDE to be prefixed with '+'
If an extension is prefixed with '+', attempt to enable it.  This
introduces symmetry with the prefix '-', which is already allowed.
2011-01-26 16:37:45 -08:00
Chad Versace 7cbcf4c583 mesa: Simplify logic in get_extension_override()
* Reduce max indentation level from 7 to 3.
* Eliminate counter variables.
* Remove function append().
2011-01-26 16:37:45 -08:00
Chad Versace 8ba260e099 glsl: Enable AMD_conservative_depth in parser
All the necessary compiler infrastructure for AMD_conservative_depth is in
place, so it's safe to enable it in the parser.
2011-01-26 16:37:45 -08:00
Chad Versace a1b83464ff mesa: Propagate gl_FragDepth layout from GLSL IR to Mesa IR 2011-01-26 16:37:45 -08:00
Chad Versace addae33d6b glsl: Raise linking error if gl_FragDepth layout is inconsistent
From the AMD_conservative_depth spec:
   If gl_FragDepth is redeclared in any fragment shader in a program, it
   must be redeclared in all fragment shaders in that program that have
   static assignments to gl_FragDepth. All redeclarations of gl_FragDepth in
   all fragment shaders in a single program must have the same set of
   qualifiers.
2011-01-26 16:37:45 -08:00
Chad Versace bc04d244f5 glsl: Propagate depth layout qualifier from AST to IR 2011-01-26 16:37:44 -08:00
Chad Versace 5fc57f471b glsl: Define enum ir_depth_layout 2011-01-26 16:37:44 -08:00
Chad Versace 39cad66a88 glsl: Refresh autogenerated parser files
For commits titled:
glcpp: Conditionally define macro GL_AMD_conservative_depth
glsl: Add support for AMD_conservative_depth to parser
2011-01-26 16:37:44 -08:00
Chad Versace fb5db0570c glsl: Add support for AMD_conservative_depth to parser
When AMD_conservative_depth is enabled:
* Let 'layout' be a token.
* Extend the production rule of layout_qualifier_id to process the tokens:
   depth_any
   depth_greater
   depth_less
   depth_unchanged
2011-01-26 16:37:44 -08:00
Chad Versace 565a22090c glsl: Add depth layout qualifiers to ast_type_qualifier 2011-01-26 16:37:44 -08:00
Chad Versace 0423f24eb8 glcpp: Conditionally define macro GL_AMD_conservative_depth
Define macro GL_AMD_conservative_depth to 1 when its extension is
enabled.
2011-01-26 16:37:44 -08:00