mesa.git
13 years agoi915g: Don't emit FS constants when VS contants change
Jakob Bornecrantz [Mon, 29 Nov 2010 20:37:09 +0000 (21:37 +0100)]
i915g: Don't emit FS constants when VS contants change

13 years agoi915g: Use slab allocator for transfers
Jakob Bornecrantz [Fri, 3 Dec 2010 18:42:45 +0000 (19:42 +0100)]
i915g: Use slab allocator for transfers

Also remove unused i915_transfer struct

13 years agost/dri: Fix warning
Jakob Bornecrantz [Fri, 21 Jan 2011 17:10:31 +0000 (18:10 +0100)]
st/dri: Fix warning

13 years agor600g: check if hardware blits are possible bevore enabling tilling
Christian König [Sun, 9 Jan 2011 12:18:48 +0000 (13:18 +0100)]
r600g: check if hardware blits are possible bevore enabling tilling

13 years agor600g: FLT_TO_INT_FLOOR is trans instruction
Alex Deucher [Fri, 21 Jan 2011 17:39:07 +0000 (12:39 -0500)]
r600g: FLT_TO_INT_FLOOR is trans instruction

Add missing evergreen FLT_TO_INT_FLOOR instruction.

13 years agomesa: EXT_framebuffer_sRGB interface additions.
Dave Airlie [Sun, 16 Jan 2011 23:45:26 +0000 (09:45 +1000)]
mesa: EXT_framebuffer_sRGB interface additions.

This adds the get/enable enums and internal gl_config storage
for this extension.

In theory this is all that is needed to enable this extension
from what I can see, since its not mandatory to implement the
features if you don't advertise the visuals or the fb configs.

Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agor600c: get OQ results only for 4 DBs on r600 class
Andre Maasikas [Fri, 21 Jan 2011 09:48:03 +0000 (11:48 +0200)]
r600c: get OQ results only for 4 DBs on r600 class

- since evergreen addition which increased this to 8 depth backends
  other bytes may contain garbage values

13 years agodocs: update README.WIN32 per Karl's request
Brian Paul [Fri, 21 Jan 2011 01:52:39 +0000 (18:52 -0700)]
docs: update README.WIN32 per Karl's request

13 years agointel: Fix typeos from 3d028024 and 790ff232
Ian Romanick [Thu, 20 Jan 2011 21:51:07 +0000 (13:51 -0800)]
intel: Fix typeos from 3d028024 and 790ff232

...and remove egg from face.

13 years agoi915: Set correct values for range/precision of fragment shader types
Ian Romanick [Thu, 20 Jan 2011 20:07:51 +0000 (12:07 -0800)]
i915: Set correct values for range/precision of fragment shader types

13 years agoi965: Set correct values for range/precision of fragment shader types
Ian Romanick [Thu, 20 Jan 2011 20:07:21 +0000 (12:07 -0800)]
i965: Set correct values for range/precision of fragment shader types

13 years agomesa: Set correct values for range/precision of shader integer types
Ian Romanick [Thu, 20 Jan 2011 20:05:38 +0000 (12:05 -0800)]
mesa: Set correct values for range/precision of shader integer types

13 years agomesa: Connect glGetShaderPrecisionFormat into the dispatch table
Ian Romanick [Thu, 20 Jan 2011 20:05:14 +0000 (12:05 -0800)]
mesa: Connect glGetShaderPrecisionFormat into the dispatch table

13 years agosoftpipe: check for null pointers during context create/destroy
Brian Paul [Thu, 20 Jan 2011 20:46:53 +0000 (13:46 -0700)]
softpipe: check for null pointers during context create/destroy

See http://bugs.freedesktop.org/show_bug.cgi?id=32309
Apparently, malloc() is failing during context creation.  Not
checking for nulls here led to crashes elsewhere.

13 years agograw: fix logic error in pixel format selection
Brian Paul [Thu, 20 Jan 2011 20:32:35 +0000 (13:32 -0700)]
graw: fix logic error in pixel format selection

The loop to choose a pixel format for the window was incrementing
'i' after we succeeded in creating the window so if we chose format[0]
for graw_create_window_and_screen() we were putting format[1] in
the pipe_resource template for creating the render target.

This only worked because of the order of the elements in the formats[]
array.

The graw_xlib.c code now properly compares the requested gallium pixel
format against the visual's color layout.

Update all the graw demos to fix the off-by-one-i error.

13 years agoFix the build from 887d2b64
Ian Romanick [Thu, 20 Jan 2011 19:30:14 +0000 (11:30 -0800)]
Fix the build from 887d2b64

Thanks to all the include frobbing, GLuint is not known in some places
that included enums.h.

13 years agomesa: clean-up _mesa_lookup_prim_by_nr()
Brian Paul [Thu, 20 Jan 2011 16:38:49 +0000 (09:38 -0700)]
mesa: clean-up _mesa_lookup_prim_by_nr()

Remove the redundant public _mesa_prim_name[] array.

13 years agomesa: move extra prim mode #defines
Brian Paul [Thu, 20 Jan 2011 16:38:08 +0000 (09:38 -0700)]
mesa: move extra prim mode #defines

13 years agovbo: added comment
Brian Paul [Thu, 20 Jan 2011 16:33:43 +0000 (09:33 -0700)]
vbo: added comment

13 years agomesa: minor formatting fixes
Brian Paul [Thu, 20 Jan 2011 16:10:03 +0000 (09:10 -0700)]
mesa: minor formatting fixes

13 years agost/mesa: clean up the sampler view format code
Brian Paul [Thu, 20 Jan 2011 15:51:07 +0000 (08:51 -0700)]
st/mesa: clean up the sampler view format code

13 years agomesa: document sRGBDecode field
Brian Paul [Thu, 20 Jan 2011 15:50:39 +0000 (08:50 -0700)]
mesa: document sRGBDecode field

13 years agost/mesa: formatting, whitespace fixes
Brian Paul [Thu, 20 Jan 2011 15:38:19 +0000 (08:38 -0700)]
st/mesa: formatting, whitespace fixes

13 years agor600c: bump sq gpr resources if a shader needs more than default
Andre Maasikas [Thu, 20 Jan 2011 11:05:21 +0000 (13:05 +0200)]
r600c: bump sq gpr resources if a shader needs more than default

ideally this should be set once in the beginning of CS but there's
no way to change values there while in the middle of rendering.
For now reemitting SQ setup seems to work probably due to
r700WaitForIdleClean after each render

currently does not to try to decrease values once increased

fixes hangs in glsl-vs-vec4-indexing-temp-src-in-nested-loop-combined
glsl-vs-vec4-indexing-temp-dst-in-nested-loop-combined for my rv740
maybe more for other chips

13 years agoglapi: Fix OpenGL and OpenGL ES interop.
Chia-I Wu [Sun, 26 Dec 2010 10:24:13 +0000 (18:24 +0800)]
glapi: Fix OpenGL and OpenGL ES interop.

When --enable-shared-glapi is specified, libGL will share libglapi with
OpenGL ES instead of defining its own copy of glapi.  This makes sure an
app will get only one copy of glapi in its address space.

The new option is disabled by default.  When enabled, libGL and libglapi
must be built from the same source tree and distributed together.  This
requirement comes from the fact that the dispatch offsets used by these
libraries are re-assigned whenever GLAPI XMLs are changed.

For GLX, indirect rendering for has_different_protocol() functions is
tricky.  A has_different_protocol() function is assigned only one
dispatch offset, yet each entry point needs a different protocol opcode.
It cannot be supported by the shared glapi.  The fix to this is to make
glXGetProcAddress handle such functions specially before calling
_glapi_get_proc_address.

Note that these files are automatically generated/re-generated

 src/glx/indirect.c
 src/glx/indirect.h
 src/mapi/glapi/glapi_mapi_tmp.h

13 years agoglapi: Fix OpenGL ES 1.1 and 2.0 interop.
Chia-I Wu [Sun, 26 Dec 2010 10:02:59 +0000 (18:02 +0800)]
glapi: Fix OpenGL ES 1.1 and 2.0 interop.

Move _glapi_* symbols from libGLESv1_CM.so and libGLESv2.so to
libglapi.so.  This makes sure an app will get only one copy of glapi in
its address space.

Note that with this change, libGLES* and libglapi must be built from the
same source tree and distributed together.  This requirement comes from
the fact that the dispatch offsets used by these libraries are
re-assigned whenever GLAPI XMLs are changed.

13 years agomapi: Add support for bridge mode.
Chia-I Wu [Thu, 16 Dec 2010 16:24:27 +0000 (00:24 +0800)]
mapi: Add support for bridge mode.

In bridge mode, mapi no longer implements glapi.h.  It becomes a user of
glapi.h.  Imagine an app that uses both libGL.so and libGLESv2.so.
There will be two copies of glapi in the app's memory.  It is possible
that _glapi_get_dispatch does not return what _glapi_set_dispatch set,
if they access different copies of the global variables.  The solution
to this situation to build either one of the libraries as a bridge to
the other.  Or build both libraries as bridges to another shared
glapi library.

13 years agomapi: u_current_table may be renamed.
Chia-I Wu [Tue, 24 Aug 2010 07:51:57 +0000 (15:51 +0800)]
mapi: u_current_table may be renamed.

When MAPI_MODE_GLAPI is defined, u_current_table is renamed to
_glapi_Dispatch or _glapi_tls_Dispatch.  The ASM dispatchers should not
use hardcoded name.

13 years agomapi: Add a new glapi.h implementation.
Chia-I Wu [Fri, 10 Dec 2010 19:33:42 +0000 (03:33 +0800)]
mapi: Add a new glapi.h implementation.

The new implementation is based on mapi.  No new script is needed.  As
noted in sources.mk, the way to use it is to compile MAPI_GLAPI_SOURCES
with MAPI_MODE_GLAPI defined.

13 years agomapi: Fix glapi printers for gl_and_es_API.xml.
Chia-I Wu [Tue, 14 Dec 2010 17:21:33 +0000 (01:21 +0800)]
mapi: Fix glapi printers for gl_and_es_API.xml.

Fix GLAPIPrinter, ES1APIPrinter, and ES2APIPrinter to output files that
are ready for compilation.  Since gl_and_es_API.xml is based on
gl_API.xml, the hidden and handcode attributes of entries have to be
overridden for ES1APIPrinter and ES2APIPrinter.

13 years agomapi: Allow prefix to be macro.
Chia-I Wu [Mon, 6 Dec 2010 14:21:51 +0000 (22:21 +0800)]
mapi: Allow prefix to be macro.

Treat prefix as macro when it is all uppercase.  Generate PREFIX(name)
instead of PREFIXname when it is a macro.

13 years agomapi: Add the ability to parse GLAPI XML.
Chia-I Wu [Tue, 7 Dec 2010 02:15:50 +0000 (10:15 +0800)]
mapi: Add the ability to parse GLAPI XML.

A prerequisite if we want to convert vgapi.csv to vgapi.xml, or to use
mapi for glapi.

13 years agoglapi: Add gl_and_es_API.xml.
Chia-I Wu [Sat, 11 Dec 2010 18:21:09 +0000 (02:21 +0800)]
glapi: Add gl_and_es_API.xml.

gl_and_es_API.xml defines OpenGL ES 1.1 and 2.0 API as well as OpenGL
API.  It consists of gl_API.xml and the newly added es_EXT.xml,
ARB_get_program_binary.xml, OES_single_precision.xml, and
OES_fixed_point.xml.

13 years agodoxygen: Add glsl to the Makefile and .gitignore.
Kenneth Graunke [Thu, 20 Jan 2011 07:49:54 +0000 (23:49 -0800)]
doxygen: Add glsl to the Makefile and .gitignore.

13 years agoAdd machine generated files to .gitignore
twied [Mon, 17 Jan 2011 18:46:17 +0000 (19:46 +0100)]
Add machine generated files to .gitignore

13 years agoglsl: Don't bother unsetting a destructor that was never set.
Kenneth Graunke [Sat, 15 Jan 2011 23:25:02 +0000 (15:25 -0800)]
glsl: Don't bother unsetting a destructor that was never set.

This was totally copied and pasted from glsl_symbol_table.

13 years agoautoconf: Fail when --with-state-trackers is incomplete.
Chia-I Wu [Thu, 20 Jan 2011 06:19:13 +0000 (14:19 +0800)]
autoconf: Fail when --with-state-trackers is incomplete.

When --enable-openvg or --enable-gallium-egl is enabled,
--with-state-trackers must have vega or egl.

13 years agosoftpipe: Bind samplers to views instead of the underlying resource.
Henri Verbeet [Thu, 20 Jan 2011 02:11:05 +0000 (19:11 -0700)]
softpipe: Bind samplers to views instead of the underlying resource.

Signed-off-by: Brian Paul <brianp@vmware.com>
13 years agosoftpipe: Get rid of the redundant resource parameter to get_sampler_variant().
Henri Verbeet [Mon, 17 Jan 2011 21:03:29 +0000 (22:03 +0100)]
softpipe: Get rid of the redundant resource parameter to get_sampler_variant().

Signed-off-by: Brian Paul <brianp@vmware.com>
13 years agor200: fix up some problems with TFP on r200
Dave Airlie [Thu, 20 Jan 2011 04:34:32 +0000 (14:34 +1000)]
r200: fix up some problems with TFP on r200

13 years agollvmpipe: implement TGSI_PROPERTY_FS_COLOR0_WRITES_ALL_CBUFS
Brian Paul [Thu, 20 Jan 2011 01:45:43 +0000 (18:45 -0700)]
llvmpipe: implement TGSI_PROPERTY_FS_COLOR0_WRITES_ALL_CBUFS

Fixes http://bugs.freedesktop.org/show_bug.cgi?id=33284

13 years agoi965/fs: Take the shared mathbox into account in instruction scheduling.
Eric Anholt [Wed, 19 Jan 2011 05:26:53 +0000 (21:26 -0800)]
i965/fs: Take the shared mathbox into account in instruction scheduling.

I don't have evidence for this amounting to any improvement,
but it does codify a bit more what we understand so far about
the pipeline.

13 years agoi965/fs: Add a helper function for detecting math opcodes.
Eric Anholt [Wed, 19 Jan 2011 06:48:11 +0000 (22:48 -0800)]
i965/fs: Add a helper function for detecting math opcodes.

13 years agoi965/fs: Assign URB/CURB register numbers after instruction scheduling.
Eric Anholt [Wed, 19 Jan 2011 06:03:34 +0000 (22:03 -0800)]
i965/fs: Assign URB/CURB register numbers after instruction scheduling.

This fixes a bunch of unnecessary barriers due to the scheduler not
knowing what that arbitrary register description refers to when trying
to reason about its dependencies.

The result is rescheduling in the convolution kernel shader in
Lightsmark, which results in avoiding register spilling and increasing
the performance of the first scene from 6-7 fps midway through the
panning to 11fps.  The register spilling was a regression from Mesa
7.9 to Mesa 7.10.

13 years agoi965/fs: Add an instruction scheduler.
Eric Anholt [Wed, 19 Jan 2011 01:16:49 +0000 (17:16 -0800)]
i965/fs: Add an instruction scheduler.

Improves performance of my GLSL demo by 5.1% (+/- 1.4%, n=7).  It also
reschedules the giant multiply tree at the end of
glsl-fs-convolution-1 so that we end up not spilling registers,
producing the expected level of performance.

13 years agoi965/fs: Add a helper for detecting texturing opcodes.
Eric Anholt [Wed, 19 Jan 2011 05:10:03 +0000 (21:10 -0800)]
i965/fs: Add a helper for detecting texturing opcodes.

13 years agor600g: fix segfault if texture operand is a literal
Christian König [Wed, 19 Jan 2011 22:46:27 +0000 (23:46 +0100)]
r600g: fix segfault if texture operand is a literal

This fixes Bug 33262

13 years agomesa: implement glGetShaderPrecisionFormat()
Brian Paul [Wed, 19 Jan 2011 14:41:20 +0000 (07:41 -0700)]
mesa: implement glGetShaderPrecisionFormat()

Drivers should override the default range/precision info as needed.
No drivers do this yet.

13 years agogallium/docs: document result type for some types of queries
Brian Paul [Tue, 18 Jan 2011 23:34:22 +0000 (16:34 -0700)]
gallium/docs: document result type for some types of queries

13 years agoradeon: avoid segfault on 3D textures.
Dave Airlie [Wed, 19 Jan 2011 06:27:13 +0000 (16:27 +1000)]
radeon: avoid segfault on 3D textures.

This is a candidate for 7.9 and 7.10

13 years agoradeon: oops didn't need this logbase2 fn
Dave Airlie [Wed, 19 Jan 2011 06:17:03 +0000 (16:17 +1000)]
radeon: oops didn't need this logbase2 fn

13 years agoradeon: calculate complete texture state inside TFP function
Dave Airlie [Wed, 19 Jan 2011 05:27:54 +0000 (15:27 +1000)]
radeon: calculate complete texture state inside TFP function

(really not sure why I'm doing this).

This is a candidate for 7.9 and 7.10 branches.

13 years agodri/nouveau: allow multiple maps of surface buffers
Ben Skeggs [Wed, 19 Jan 2011 05:51:57 +0000 (15:51 +1000)]
dri/nouveau: allow multiple maps of surface buffers

Can happen during swrast fallbacks if a buffer is somehow bound as
a render target and a texture.

Fixes gnome-shell on nv20, and gets it mostly working on nv10.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agoradeon/r200: fix fbo-clearmipmap + gen-teximage
Dave Airlie [Wed, 19 Jan 2011 00:39:32 +0000 (10:39 +1000)]
radeon/r200: fix fbo-clearmipmap + gen-teximage

sw clears were being used and not getting the correct offsets in the span
code.

also not emitting correct offsets for CB draws to texture levels.

(I've no idea why I'm playing with r100).

This is a candidate for 7.9 and 7.10

13 years agoi965: Fix a comment typo.
Eric Anholt [Tue, 18 Jan 2011 21:28:32 +0000 (13:28 -0800)]
i965: Fix a comment typo.

13 years agoi965: Fix a bug in i965 compute-to-MRF.
Eric Anholt [Tue, 18 Jan 2011 21:12:25 +0000 (13:12 -0800)]
i965: Fix a bug in i965 compute-to-MRF.

Fixes piglit glsl-fs-texture2d-branching.  I couldn't come up with a
testcase that didn't involve dead code, but it's still worthwhile to
fix I think.

13 years agor600g: fix reserve_cfile for R700+
Christian König [Tue, 18 Jan 2011 21:45:23 +0000 (22:45 +0100)]
r600g: fix reserve_cfile for R700+

According to R700 ISA we have only two channels for cfile constants.
This patch makes piglit tests "glsl1-constant array with constant
indexing" happy on RV710.

13 years agoglsl: Fix segfault due to missing printf argument
Chad Versace [Tue, 18 Jan 2011 23:15:19 +0000 (15:15 -0800)]
glsl: Fix segfault due to missing printf argument

Fixes the following Piglit tests:
glslparsertest/shaders/array2.frag
glslparsertest/shaders/dataType6.frag

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

13 years agoglsl: Fix semantic checks on precision qualifiers
Chad Versace [Mon, 17 Jan 2011 23:28:39 +0000 (15:28 -0800)]
glsl: Fix semantic checks on precision qualifiers

The check for
   Precision qualifiers only apply to floating point and integer types.
was incomplete. It rejected only type 'bool' and structures.

13 years agollvmpipe: make sure binning is active when we begin/end a query
Brian Paul [Wed, 12 Jan 2011 23:13:13 +0000 (16:13 -0700)]
llvmpipe: make sure binning is active when we begin/end a query

This fixes a potential failure when a begin/end_query is the first
thing to happen after flushing the scene.

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

13 years agosoftpipe: rename some functions for consistency
Brian Paul [Tue, 18 Jan 2011 19:34:49 +0000 (12:34 -0700)]
softpipe: rename some functions for consistency

13 years agor600g: Kill trailing whitespace.
Henri Verbeet [Tue, 18 Jan 2011 19:43:56 +0000 (20:43 +0100)]
r600g: Kill trailing whitespace.

13 years agor600g: Remove the unused eg_states_inc.h and r600_states_inc.h.
Henri Verbeet [Tue, 18 Jan 2011 19:43:56 +0000 (20:43 +0100)]
r600g: Remove the unused eg_states_inc.h and r600_states_inc.h.

13 years agor600g: Simplify some r600_bc_add_alu_type() calls to r600_bc_add_alu().
Henri Verbeet [Tue, 18 Jan 2011 19:43:56 +0000 (20:43 +0100)]
r600g: Simplify some r600_bc_add_alu_type() calls to r600_bc_add_alu().

13 years agovbo: initialize num_instances in a few places
Brian Paul [Tue, 18 Jan 2011 19:16:58 +0000 (12:16 -0700)]
vbo: initialize num_instances in a few places

This fixes https://bugs.freedesktop.org/show_bug.cgi?id=33247
There might still be some issues with drawing multiple instances
with VBO splitting to investigate someday.

13 years agora: Take advantage of the adjacency list in finding a node to spill.
Eric Anholt [Tue, 18 Jan 2011 09:08:51 +0000 (01:08 -0800)]
ra: Take advantage of the adjacency list in finding a node to spill.

This revealed a bug in ra_get_spill_benefit where we only considered
the benefit of the first adjacency we were to remove, explaining some
of the ugly spilling I've seen in shaders.  Because of the reduced
spilling, it reduces the runtime of glsl-fs-convolution-1 36.9% +/-
0.9% (n=5).

13 years agora: Remove unused "name" field in regs.
Eric Anholt [Tue, 18 Jan 2011 09:04:55 +0000 (01:04 -0800)]
ra: Remove unused "name" field in regs.

13 years agora: Take advantage of the adjacency list in ra_select() too.
Eric Anholt [Tue, 18 Jan 2011 08:33:35 +0000 (00:33 -0800)]
ra: Take advantage of the adjacency list in ra_select() too.

Reduces runtime of glsl-fs-convolution-1 another 13.9% +/- 0.6% (n=5).

13 years agora: Add an adjacency list to trade space for time in ra_simplify().
Eric Anholt [Tue, 18 Jan 2011 08:19:48 +0000 (00:19 -0800)]
ra: Add an adjacency list to trade space for time in ra_simplify().

This was recommended in the original paper, but I figued "make it run"
before "make it fast".  Now we make it fast.  Reduces the runtime of
glsl-fs-convolution-1 by 12.7% +/- 0.6% (n=5).

13 years agoglsl: Skip the rest of loop unrolling if no loops were found.
Eric Anholt [Tue, 18 Jan 2011 06:07:55 +0000 (22:07 -0800)]
glsl: Skip the rest of loop unrolling if no loops were found.

Shaves 1.6% (+/- 1.0%) off of ff_fragment_shader glean texCombine time
(n=5).

13 years agora: Trade off some space to get time efficiency in ra_set_finalize().
Eric Anholt [Tue, 18 Jan 2011 02:34:43 +0000 (18:34 -0800)]
ra: Trade off some space to get time efficiency in ra_set_finalize().

Our use of the register allocator in i965 is somewhat unusual.
Whereas most architectures would have a smaller set of registers with
fewer register classes and reuse that across compilation, we have 1,
2, and 4-register classes (usually) and a variable number up to 128
registers per compile depending on how many setup parameters and push
constants are present.  As a result, when compiling large numbers of
programs (as with glean texCombine going through ff_fragment_shader),
we spent much of our CPU time in computing the q[] array.  By keeping
a separate list of what the conflicts are for a particular reg, we
reduce glean texCombine time 17.0% +/- 2.3% (n=5).

We don't expect this optimization to be useful for 915, which will
have a constant register set, but it would be useful if we were switch
to this register allocator for Mesa IR.

13 years agosoftpipe: added some null pointer checks
Brian Paul [Tue, 18 Jan 2011 16:58:55 +0000 (09:58 -0700)]
softpipe: added some null pointer checks

This shouldn't really be needed but it may help with
http://bugs.freedesktop.org/show_bug.cgi?id=32309

13 years agosoftpipe: s/tex_cache/fragment_tex_cache/
Brian Paul [Tue, 18 Jan 2011 16:57:52 +0000 (09:57 -0700)]
softpipe: s/tex_cache/fragment_tex_cache/

Just to be more consistant with the vertex and geometry tex cache fields.

13 years agoRemove executables from source tree.
José Fonseca [Tue, 18 Jan 2011 15:05:57 +0000 (15:05 +0000)]
Remove executables from source tree.

13 years agor600c: preserve correct buffer when using fbo
Andre Maasikas [Tue, 18 Jan 2011 14:05:45 +0000 (16:05 +0200)]
r600c: preserve correct buffer when using fbo

Hopefully better than previous - this passes more mipgen tests

13 years agor600: set border color as RGBA
Andre Maasikas [Tue, 18 Jan 2011 14:04:43 +0000 (16:04 +0200)]
r600: set border color as RGBA

border color is RGBA for samples - this passes texenv tests

13 years agor600c: use STATE_FB_WPOS_Y_TRANSFORM variable to do wpos transform
Andre Maasikas [Tue, 18 Jan 2011 14:02:45 +0000 (16:02 +0200)]
r600c: use STATE_FB_WPOS_Y_TRANSFORM variable to do wpos transform

use introduced STATE_FB_WPOS_Y_TRANSFORM variable (thanks Marek)
this gets coords also right when using fbo

13 years agoi965: Fix dead pointers to fp->Parameters->ParameterValues[] after realloc.
Eric Anholt [Tue, 18 Jan 2011 00:02:58 +0000 (16:02 -0800)]
i965: Fix dead pointers to fp->Parameters->ParameterValues[] after realloc.

Fixes texrect-many regression with ff_fragment_shader -- as we added
refs to the subsequent texcoord scaling paramters, the array got
realloced to a new address while our params[] still pointed at the old
location.

13 years agollvmpipe: enable PIPE_CAP_INDEP_BLEND_FUNC
Brian Paul [Mon, 17 Jan 2011 23:42:43 +0000 (16:42 -0700)]
llvmpipe: enable PIPE_CAP_INDEP_BLEND_FUNC

The driver was saying that independend blend functions was not supported,
but it really was.  The driver was using the per-target independend blend
factors but the state tracker was only setting the 0th one (per the
Gallium spec).

Fixes a piglit fbo-drawbuffers2-blend regression.
See https://bugs.freedesktop.org/show_bug.cgi?id=33215

13 years agost/mesa: move PIPE_CAP_INDEP_BLEND_FUNC code
Brian Paul [Mon, 17 Jan 2011 23:29:28 +0000 (16:29 -0700)]
st/mesa: move PIPE_CAP_INDEP_BLEND_FUNC code

13 years agodoxygen: Add doxyfile for glsl module
Chad Versace [Mon, 17 Jan 2011 21:52:40 +0000 (13:52 -0800)]
doxygen: Add doxyfile for glsl module

13 years agoglsl: Refresh autogenerated parser files
Chad Versace [Mon, 17 Jan 2011 17:42:08 +0000 (09:42 -0800)]
glsl: Refresh autogenerated parser files

13 years agoglsl: Remove redundant semantic check in parser
Chad Versace [Mon, 17 Jan 2011 05:55:01 +0000 (21:55 -0800)]
glsl: Remove redundant semantic check in parser

The removed semantic check also exists in ast_type_specifier::hir(), which
is a more natural location for it.

The check verified that precision statements are applied only to types
float and int.

13 years agoglsl: Add support for default precision statements
Chad Versace [Mon, 17 Jan 2011 05:44:57 +0000 (21:44 -0800)]
glsl: Add support for default precision statements

* Add new field ast_type_specifier::is_precision_statement.
* Add semantic checks in ast_type_specifier::hir().
* Alter parser rules accordingly.

13 years agoglsl: Add semantic checks for precision qualifiers
Chad Versace [Mon, 17 Jan 2011 06:38:45 +0000 (22:38 -0800)]
glsl: Add semantic checks for precision qualifiers

* Check that precision qualifiers only appear in language versions 1.00,
  1.30, and later.
* Check that precision qualifiers do not apply to bools and structs.

Fixes the following Piglit tests:
* spec/glsl-1.30/precision-qualifiers/precision-bool-01.frag
* spec/glsl-1.30/precision-qualifiers/precision-struct-01.frag
* spec/glsl-1.30/precision-qualifiers/precision-struct-02.frag

13 years agoglsl: Fix parser rule for type_specifier
Chad Versace [Mon, 17 Jan 2011 06:08:56 +0000 (22:08 -0800)]
glsl: Fix parser rule for type_specifier

Do not assign a value to ast_type_specifier::precision when no precision
qualifier is present.

13 years agoglsl: Change default value of ast_type_specifier::precision
Chad Versace [Fri, 14 Jan 2011 17:50:55 +0000 (09:50 -0800)]
glsl: Change default value of ast_type_specifier::precision

Change default value to ast_precision_none, which denotes the absence of
a precision of a qualifier.

Previously, the default value was ast_precision_high. This made it
impossible to detect if a precision qualifier was present or not.

13 years agoglsl: Check that 'centroid in' does not occur in vertex shader
Chad Versace [Wed, 12 Jan 2011 02:24:17 +0000 (18:24 -0800)]
glsl: Check that 'centroid in' does not occur in vertex shader

The check is performed only in GLSL versions >= 1.30.

From section 4.3.4 of the GLSL 1.30 spec:
   "It is an error to use centroid in in a vertex shader."

Fixes Piglit test
spec/glsl-1.30/compiler/storage-qualifiers/vs-centroid-in-01.vert

13 years agoglsl: Check that interpolation quals only apply to vertex ins and fragment outs
Chad Versace [Wed, 12 Jan 2011 02:13:26 +0000 (18:13 -0800)]
glsl: Check that interpolation quals only apply to vertex ins and fragment outs

The check is performed only in GLSL versions >= 1.30.

Fixes the following Piglit tests:
* spec/glsl-1.30/compiler/interpolation-qualifiers/fs-smooth-02.frag
* spec/glsl-1.30/compiler/interpolation-qualifiers/vs-smooth-01.vert

13 years agoglsl: Check that interpolation qualifiers do not precede 'varying'
Chad Versace [Wed, 12 Jan 2011 01:21:18 +0000 (17:21 -0800)]
glsl: Check that interpolation qualifiers do not precede 'varying'

... and 'centroid varying'. The check is performed only in GLSL
versions >= 1.30.

From page 29 (page 35 of the PDF) of the GLSL 1.30 spec:
   "interpolation qualifiers may only precede the qualifiers in, centroid
    in, out, or centroid out in a declaration. They do not apply to the
    deprecated storage qualifiers varying or centroid varying."

Fixes Piglit test
spec/glsl-1.30/compiler/interpolation-qualifiers/smooth-varying-01.frag.

13 years agoglsl: Add method ast_type_qualifier::interpolation_string()
Chad Versace [Wed, 12 Jan 2011 00:59:24 +0000 (16:59 -0800)]
glsl: Add method ast_type_qualifier::interpolation_string()

If an interpolation qualifier is present, then the method returns that
qualifier's string representation. For example, if the noperspective bit
is set, then it returns "noperspective".

13 years agovbo: init num_instances in split_prims()
Brian Paul [Mon, 17 Jan 2011 16:56:56 +0000 (09:56 -0700)]
vbo: init num_instances in split_prims()

Fixes a VTK regression after adding GL_ARB_draw_instanced.

13 years agotnl: assert that num_instances > 0
Brian Paul [Mon, 17 Jan 2011 16:40:16 +0000 (09:40 -0700)]
tnl: assert that num_instances > 0

13 years agomesa: s/primcount/numInstances/
Brian Paul [Mon, 17 Jan 2011 16:33:47 +0000 (09:33 -0700)]
mesa: s/primcount/numInstances/

primcount is also a parameter to glMultiDrawElements().  Use numInstances
to avoid confusion between these things.

13 years agonouveau: fix build against out of tree libdrm
Dave Airlie [Mon, 17 Jan 2011 05:41:49 +0000 (15:41 +1000)]
nouveau: fix build against out of tree libdrm

For doing builds against a separated libdrm these cflags are needed.

Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agor600g: fix PIPE_CAP_INSTANCED_DRAWING warning
Christian König [Sun, 16 Jan 2011 22:52:53 +0000 (23:52 +0100)]
r600g: fix PIPE_CAP_INSTANCED_DRAWING warning

13 years agor600g: fix alu inst group merging for relative adressing
Christian König [Sun, 16 Jan 2011 20:21:41 +0000 (21:21 +0100)]
r600g: fix alu inst group merging for relative adressing

13 years agonvc0: fix and enable instanced drawing and arrays
Christoph Bumiller [Sun, 16 Jan 2011 13:10:46 +0000 (14:10 +0100)]
nvc0: fix and enable instanced drawing and arrays

13 years agod3d1x: Fix broken build.
Chia-I Wu [Sun, 16 Jan 2011 09:34:40 +0000 (17:34 +0800)]
d3d1x: Fix broken build.

st/egl native.h changed its interface in
a22a332fc7cc54d4d0973dcd21a90159cc51de1a.

13 years agomesa: minor tweaks in _mesa_set_fetch_functions()
Brian Paul [Sun, 16 Jan 2011 03:41:26 +0000 (20:41 -0700)]
mesa: minor tweaks in _mesa_set_fetch_functions()