Commit graph

37181 commits

Author SHA1 Message Date
Carl Worth
3a530b8ef6 glcpp: Make test suite report final count of passed/total tests.
And report PASS or FAIL for each test along the way as well.
2010-07-20 17:01:11 -07:00
Carl Worth
41d525f2df Build a standalone glcpp binary.
This is convenient for testing the preprocessor independent of the rest of
mesa, (just run glcpp-test in the src/glsl/glcpp/tests).
2010-07-20 17:01:11 -07:00
Carl Worth
f15e27ec1d glcpp: Delete copies of hash_table.c, hash_table.h, and other headers.
These were only ever intended to exist in the original, standalone
implementation of glcpp, (with the idea of dropping them as soon as
the code moved into mesa). The current build system wasn't compiling
this C file, but the presence of the header files could cause problems
if the two copies diverge in the future.

We head those problems off by deleting al of these redundant files.
2010-07-20 17:01:11 -07:00
Eric Anholt
325a49701f glsl2: Fix handling of out values in function inlining.
The parameters[i] is our inlined variables representing the
parameters, so they are always ir_var_auto.  Walk the signature params
in handling "out" values like we do for "in" values to find the mode.

Fixes (with the previous 2 commits):
glsl1-function call with in, out params
glsl1-function call with inout params
2010-07-20 16:21:07 -07:00
Eric Anholt
2927c81ed1 glsl2: Don't mark a variable as constant if it was used as an out param. 2010-07-20 15:59:04 -07:00
Eric Anholt
02d3711a21 glsl2: Always insert function calls into the instruction stream.
If they have a return value, this means putting it into a temporary
and making a deref of the temp be the rvalue, since we don't know if
the rvalue will be used or not.
2010-07-20 15:59:04 -07:00
Vinson Lee
c4889fa5f0 radeon: Remove unnecessary header. 2010-07-20 14:18:42 -07:00
Eric Anholt
f8946699ec glsl2: Add definitions of the builtin constants present in GLSL 1.10.
Fixes:
glsl1-built-in constants
2010-07-20 14:03:35 -07:00
Eric Anholt
1245babe0c glsl2: Fix asin() implementation.
I'd flipped around the order of two operations in paren-balancing
adventures, and left out the multiply by sign(x) required for negative x.

Fixes:
glsl1-acos(vec4) function
glsl1-asin(vec4) function
glsl1-atan(vec4) function
2010-07-20 12:24:01 -07:00
Jerome Glisse
62f8b56dc6 r600g: split trans unit computation
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-07-20 15:07:32 -04:00
Eric Anholt
117d154b4d glsl2: notEqual() produces a boolean value, not the base type of the args.
Fixes:
glsl1-vector relational (bvec2 ==,!=)
glsl1-vector relational (vec4 !=)
2010-07-20 12:01:40 -07:00
Eric Anholt
14f8e16132 glsl2: Constant-fold assignment conditions. 2010-07-20 12:01:40 -07:00
Ian Romanick
5a2e0b8ce5 glsl2: Don't validate IR if there were compilation errors 2010-07-20 11:38:54 -07:00
Eric Anholt
18ab797d3a ir_to_mesa: Fix swizzled writemasks with swapped component ordering.
I hadn't noticed you could do this, but glsl1 tests caught it.  Fixes:
glsl1-Swizzled writemask
glsl1-Swizzled writemask (2)
glsl1-Swizzled writemask (rgba)
glsl1-Swizzled writemask (stpq)
2010-07-20 11:28:33 -07:00
Marek Olšák
5ed6627ceb st/mesa: implement and advertise GL_ARB_draw_elements_base_vertex
Signed-off-by: Brian Paul <brianp@vmware.com>
2010-07-20 11:53:43 -06:00
Brian Paul
691c1fb074 draw: correctly handle max_index=0xffffffff case in vcache code
If max_index=0xffffffff and elt_bias > 0 the test for
elt_bias + max_index >= DRAW_PIPE_MAX_VERTICES
was wrong.  Check earlier if max_index=0xffffffff and do the
"fail" case.

This fixes the piglit draw-elements-base-vertex test (and probably
some other things).
2010-07-20 11:53:43 -06:00
Marek Olšák
e794fac35a st/mesa: implement depth texture modes 2010-07-20 18:09:12 +02:00
Brian Paul
bab484a59b mesa: call ctx->Driver.ChooseTextureFormat() only when necessary.
When defining mipmap level 'L' and level L-1 exists and the new level's
internalFormat matches level L-1's internalFormat, then use the same hw
format.  Otherwise, do the regular ctx->Driver.ChooseTextureFormat() call.

This avoids a problem where we end up choosing different hw formats for
different mipmap levels depending on how the levels are defined (glTexImage
vs. glCopyTexImage vs. glGenerateMipmap, etc).

The root problem is the ChooseTextureFormat() implementation in some
drivers uses the user's glTexImage format/type parameters in the choosing
heuristic.  Later mipmap levels might be generated with different calls
(ex: glCopyTexImage()) so we don't always have format/type info and the
driver may choose a different format.

For more background info see the July 2010 mesa-dev thread "Bug in
_mesa_meta_GenerateMipmap"
2010-07-20 08:50:32 -06:00
Brian Paul
895086467e graw/tests: pass -e option to test draw_elements_instanced() 2010-07-20 08:50:32 -06:00
Michal Krol
3b2ca688a7 softpipe: Support non-depth-stencil formats in sp_tile_cache_flush_clear(). 2010-07-20 15:01:25 +02:00
Kristian Høgsberg
c1cbdbfde0 glx: #ifdef DRI specific prototype
https://bugs.freedesktop.org/show_bug.cgi?id=29162
2010-07-20 07:43:50 -04:00
Michel Dänzer
bd3d2724f5 glx/dri2: Fix dri2CopySubBuffer() again.
Only refresh the fake front buffer if there is one, and only destroy the region
once.

Fixes X11 protocol errors reported by 'mcgreg' on IRC.
2010-07-20 12:21:17 +02:00
Marek Olšák
bdde9d2fce util: mempool: initialize last block's magic number in a page 2010-07-20 10:23:54 +02:00
Chia-I Wu
87290a383b st/egl: Fixes for recent GLX cleanup.
Mainly, the type of __GLXdisplayPrivateRec::screenConfigs has changed
from "__GLXscreenConfigs *" to "__GLXscreenConfigs **".
2010-07-20 12:39:23 +08:00
Chia-I Wu
c7ad2a4e79 st/dri: Remove driFrameTrackingExtension.
The extension has been removed in
22266c391f.
2010-07-20 12:37:13 +08:00
Kristian Høgsberg
a7292f2920 glx: Move DRI CopySubBuffer extension to DRI1 code
We do this in the X server for DRI2.
2010-07-19 22:45:51 -04:00
Kristian Høgsberg
bab13969d8 glx: Move driver_configs to DRI screen privates 2010-07-19 22:45:51 -04:00
Kristian Høgsberg
e3e8196c02 glx: Move drawHash to display private
The XIDs are display wide so the natural location of the hash is here.
This way we don't have to lookup in each of the screen hashes.
2010-07-19 22:45:51 -04:00
Kristian Høgsberg
037755122e glx: Don't use __glXInitialize() when we might be holding __glXLock() 2010-07-19 22:45:51 -04:00
Kristian Høgsberg
8d0228912b glx: Workaround mismatch in signedness between extensions and protocol
The DRI2 protocol for ust, msc and sbc are unsigned but the extensions
talk about int64_t.  Do a little dance to make the compiler shut up.
2010-07-19 22:45:50 -04:00
Kristian Høgsberg
271c3c3a90 glx: Move __DRIdrawable pointers to DRI drawable privates 2010-07-19 22:45:50 -04:00
Kristian Høgsberg
22266c391f glx: Remove support for MESA_swap_frame_usage
The extension never worked, the implementation returns GLX_BAD_CONTEXT
when enabling the frame tracking.
2010-07-19 22:45:50 -04:00
Kristian Høgsberg
70887d5172 glx: Move __driScreen into the dri screen privates 2010-07-19 22:45:50 -04:00
Kristian Høgsberg
089fc37c6f glx: Move DRI1 specific extensions and code to DRI1 screen private 2010-07-19 22:45:50 -04:00
Kristian Høgsberg
9e546ecfd4 glx: Move DRI2 extensions to DRI2 screen private 2010-07-19 22:45:50 -04:00
Kristian Høgsberg
cb2a66fd0c glx: Drop support for GLX_MESA_allocate_memory
Only r200 implemented it.
2010-07-19 22:45:50 -04:00
Kristian Høgsberg
f972115d33 glx: Add screen privates for dri drivers and moved some fields there
GLXscreenConfigs is badly named and a dumping ground for a lot of stuff.
This patch creates private screen structs for the dri drivers and moves
some of their fields over there.
2010-07-19 22:45:50 -04:00
Kristian Høgsberg
a296d96de4 glx: Rename various DRI structs away from obnoxious __GLXfooRec convention
Enough is enough.
2010-07-19 22:45:50 -04:00
Kristian Høgsberg
308e13ecd1 glx: Factor out common code from dri2WaitGL() and dri2WaitX() 2010-07-19 22:45:50 -04:00
Kristian Høgsberg
b006d465ea glx: Dont use dri2WaitX() to update fake front
This saves a superfluous flush and a create/destryo region.
2010-07-19 22:45:50 -04:00
Eric Anholt
f9d11b8cee i965: Mostly fix glsl-max-varyings.
There was confusion on both the size of message we can send, and on
what the URB destination offset means.

The remaining problems appear to be due to spilling of regs in the
fragment shader being broken.
2010-07-19 19:29:48 -07:00
Eric Anholt
e179fa9a0a i965: Clean up message register setup in emit_vertex_write(). 2010-07-19 19:29:03 -07:00
Eric Anholt
09788ce10e i965: Reduce repeated calculation of the attribute-offset-in-VUE.
This cleans up some chipset dependency sprinkled around, and fixes a
potential overflow of the attribute offset array for many vertex
results.
2010-07-19 19:29:03 -07:00
Eric Anholt
e29cff6273 i965: Clarify the nr_regs calculation in brw_clip.c 2010-07-19 19:29:03 -07:00
Eric Anholt
bdcaaed6ff i965: Don't set up VUE space for the disabled user clip distances on gen6. 2010-07-19 19:29:03 -07:00
Brian Paul
37692e5dc9 draw: fix incorrect instancing divisor in LLVM code 2010-07-19 18:29:12 -06:00
Ian Romanick
cd6764ed6e linker: Remove the FINISHME comment for intrastage linking 2010-07-19 14:50:43 -07:00
Ian Romanick
1a03a644d2 linker: Remove redundant check for 'main' in shaders
This is now handled in link_intrastage_shaders.
2010-07-19 14:50:43 -07:00
Ian Romanick
25f51d3b9b linker: Track and validate GLSL versions used in shaders 2010-07-19 14:50:43 -07:00
Ian Romanick
b64e979971 glsl2: Use Elements macro 2010-07-19 14:50:43 -07:00