mesa.git
14 years agost/egl: Use profiles to create OpenGL ES contexts.
Chia-I Wu [Fri, 10 Sep 2010 04:59:43 +0000 (12:59 +0800)]
st/egl: Use profiles to create OpenGL ES contexts.

Replace all uses of ST_API_OPENGL_ES{1,2} by profiles.  Having 3
st_api's to provide OpenGL, OpenGL ES 1.1, and OpenGL ES 2.0 is not a
sane abstraction, since all of them share glapi for current
context/dispatch management.

14 years agost/dri: Use profiles to create OpenGL ES contexts.
Chia-I Wu [Fri, 10 Sep 2010 05:23:06 +0000 (13:23 +0800)]
st/dri: Use profiles to create OpenGL ES contexts.

Having 3 st_api's to provide OpenGL, OpenGL ES 1.1, and OpenGL ES 2.0 is
not a sane abstraction, since all of them share glapi for current
context/dispatch management.

14 years agogallium: Add context profile support to st_api.
Chia-I Wu [Fri, 10 Sep 2010 02:31:06 +0000 (10:31 +0800)]
gallium: Add context profile support to st_api.

Add struct st_context_attribs to describe context profiles and
attributes.  Modify st_api::create_context to take the new struct
instead of an st_visual.

st_context_attribs can be used to support GLX_ARB_create_context_profile
and GLX_EXT_create_context_es2_profile in the future.  But the
motivation for doing it now is to be able to replace ST_API_OPENGL_ES1
and ST_API_OPENGL_ES2 by profiles.

Having 3 st_api's to provide OpenGL, OpenGL ES 1.1, and OpenGL ES 2.0 is
not a sane abstraction, since all of them share glapi for current
context/dispatch management.

14 years agor600g: fixup state calculations for picking states.
Dave Airlie [Fri, 10 Sep 2010 12:41:00 +0000 (22:41 +1000)]
r600g: fixup state calculations for picking states.

for evergreen I ended up using a non-contig array of states, but
this code needs a bit of fixing up to deal with that.

14 years agor600g: fixup CB state numbering header
Dave Airlie [Fri, 10 Sep 2010 11:58:43 +0000 (21:58 +1000)]
r600g: fixup CB state numbering header

14 years agor600g: fix warning in r600 pipe driver
Dave Airlie [Fri, 10 Sep 2010 04:07:49 +0000 (14:07 +1000)]
r600g: fix warning in r600 pipe driver

14 years agor600g: evergreen CBs are more sane to support with a single state
Dave Airlie [Fri, 10 Sep 2010 03:50:31 +0000 (13:50 +1000)]
r600g: evergreen CBs are more sane to support with a single state

14 years agor600g: add multi-buffer flush support properly.
Dave Airlie [Fri, 10 Sep 2010 03:50:16 +0000 (13:50 +1000)]
r600g: add multi-buffer flush support properly.

14 years agor600g: fix regression in multi-buffer tests since CB flush merge
Dave Airlie [Fri, 10 Sep 2010 03:48:41 +0000 (13:48 +1000)]
r600g: fix regression in multi-buffer tests since CB flush merge

14 years agoi965: Add switch cases for ir_unop_noise, which should have been lowered.
Eric Anholt [Fri, 10 Sep 2010 02:49:58 +0000 (19:49 -0700)]
i965: Add switch cases for ir_unop_noise, which should have been lowered.

Fixes compiler warnings.

14 years agor600g: add initial evergreen support
Dave Airlie [Fri, 3 Sep 2010 04:38:41 +0000 (14:38 +1000)]
r600g: add initial evergreen support

adds shader opcodes + assembler support (except ARL)
uses constant buffers
add interp instructions in fragment shader
adds all evergreen hw states
adds evergreen pm4 support.

this runs gears for me on my evergreen

14 years agor600g: align flushing of cb/db with DDX/r600c.
Dave Airlie [Fri, 10 Sep 2010 01:27:31 +0000 (11:27 +1000)]
r600g: align flushing of cb/db with DDX/r600c.

the DDX and r600c both flush cb/db after the draw is emitted,
as long as they do that, r600g can't be different, as it races.

We end up with r600g flush, set CB, DDX set CB, flush. This
was causing misrendering on my evergreen, where sometimes the drawing
would go to an old CB.

14 years agor600g: don't need 3 bos here.
Dave Airlie [Fri, 10 Sep 2010 01:22:41 +0000 (11:22 +1000)]
r600g: don't need 3 bos here.

the code should reloc correctly a single BO 3 times.

14 years agograw: added test for finding shader mem leaks
Brian Paul [Fri, 10 Sep 2010 01:18:45 +0000 (19:18 -0600)]
graw: added test for finding shader mem leaks

14 years agodraw: minor reformatting
Brian Paul [Fri, 10 Sep 2010 00:52:27 +0000 (18:52 -0600)]
draw: minor reformatting

14 years agograw: emit warnings when context/surface creation failes
Brian Paul [Fri, 10 Sep 2010 00:52:10 +0000 (18:52 -0600)]
graw: emit warnings when context/surface creation failes

14 years agowinsys: emit warning in null_sw_displaytarget_create()
Brian Paul [Fri, 10 Sep 2010 00:50:49 +0000 (18:50 -0600)]
winsys: emit warning in null_sw_displaytarget_create()

14 years agograw: fix array size, indentation,
Brian Paul [Thu, 9 Sep 2010 21:11:37 +0000 (15:11 -0600)]
graw: fix array size, indentation,

14 years agoglsl2: Fix scons build for all platforms
Jakob Bornecrantz [Thu, 9 Sep 2010 23:16:19 +0000 (01:16 +0200)]
glsl2: Fix scons build for all platforms

14 years agoRevert "glapi: Implement optional dispatch logging"
Kristian Høgsberg [Thu, 9 Sep 2010 22:59:49 +0000 (18:59 -0400)]
Revert "glapi: Implement optional dispatch logging"

This reverts commit b9abc6139a310677a37754ea7172d976dbf56979 and the
follow on fixes (7aae704 and 6fe1b47).  It's changing the glapi/driver
ABI and causes a number of problems for debug/non-debug builds.

14 years agoglsl2: Implement noise[1234] built-in functions using ir_unop_noise
Ian Romanick [Thu, 2 Sep 2010 04:23:52 +0000 (21:23 -0700)]
glsl2: Implement noise[1234] built-in functions using ir_unop_noise

14 years agoglsl2: Add EmitNoNoise flag, use it to remove noise opcodes
Ian Romanick [Thu, 9 Sep 2010 22:25:32 +0000 (15:25 -0700)]
glsl2: Add EmitNoNoise flag, use it to remove noise opcodes

14 years agoglsl2: Add lowering pass to remove noise opcodes
Ian Romanick [Thu, 9 Sep 2010 22:20:09 +0000 (15:20 -0700)]
glsl2: Add lowering pass to remove noise opcodes

14 years agoglsl2: Add ir_unop_noise
Ian Romanick [Thu, 2 Sep 2010 04:12:10 +0000 (21:12 -0700)]
glsl2: Add ir_unop_noise

14 years agoglsl/builtins: normalize of a negative scalar should be -1.0.
Kenneth Graunke [Thu, 9 Sep 2010 22:15:31 +0000 (15:15 -0700)]
glsl/builtins: normalize of a negative scalar should be -1.0.

14 years agomesa: Only reference logging symbols in debug builds
Kristian Høgsberg [Thu, 9 Sep 2010 22:00:44 +0000 (18:00 -0400)]
mesa: Only reference logging symbols in debug builds

14 years agomesa: Don't reuse DummyFramebuffer as the incomplete framebuffer
Kristian Høgsberg [Thu, 9 Sep 2010 21:08:12 +0000 (17:08 -0400)]
mesa: Don't reuse DummyFramebuffer as the incomplete framebuffer

Binding framebuffer 0 on a context that doesn't have a winsys drawable
will try to bind the incomplete framebuffer.  That fails when that's
also the dummy framebuffer.

14 years agoglapi: Fix non-debug builds
Jakob Bornecrantz [Thu, 9 Sep 2010 20:46:49 +0000 (22:46 +0200)]
glapi: Fix non-debug builds

14 years agost/dri: support EGL_MESA_image_drm: queryImage
ben [Thu, 26 Aug 2010 15:32:32 +0000 (17:32 +0200)]
st/dri: support EGL_MESA_image_drm: queryImage

Signed-off-by: Jakob Bornecrantz <wallbraker@gmail.com>
14 years agost/dri: support EGL_MESA_image_drm: createImage
ben [Thu, 26 Aug 2010 15:31:42 +0000 (17:31 +0200)]
st/dri: support EGL_MESA_image_drm: createImage

Signed-off-by: Jakob Bornecrantz <wallbraker@gmail.com>
14 years agoeglglx: Convert glx visuals/fbconfigs straight to EGL configs
Kristian Høgsberg [Thu, 9 Sep 2010 19:00:02 +0000 (15:00 -0400)]
eglglx: Convert glx visuals/fbconfigs straight to EGL configs

In other words, skip the __GLcontextModes middle man.

14 years agoegl: Remove old egldri driver
Kristian Høgsberg [Thu, 9 Sep 2010 18:05:30 +0000 (14:05 -0400)]
egl: Remove old egldri driver

This driver doesn't work with any of the DRI drivers in the source tree.

14 years agoglapi: Implement optional dispatch logging
Kristian Høgsberg [Thu, 9 Sep 2010 16:59:14 +0000 (12:59 -0400)]
glapi: Implement optional dispatch logging

There's a useful feature buried in glapi to log all API calls to stderr.
Unfortunately it requires editing the code and then it's enabled
unconditionally for that build.  This patch builds in API logging for
debug builds and makes it run-time switchable by setting MESA_DEBUG=dispatch.

14 years agoglx: Optimize out no-op make current calls
Kristian Høgsberg [Thu, 9 Sep 2010 17:18:40 +0000 (13:18 -0400)]
glx: Optimize out no-op make current calls

This make a lot more sense now that we might have to recreate the
glx drawables for legacy code paths.

14 years agoegl: Use _EGL_CHECK_DISPLAY in eglCreateContext.
Chia-I Wu [Thu, 9 Sep 2010 16:06:32 +0000 (00:06 +0800)]
egl: Use _EGL_CHECK_DISPLAY in eglCreateContext.

_EGL_CHECK_DISPLAY checks the display and returns from eglCreateContext
on error.

14 years agoegl: Display may be NULL in _eglLookup*.
Chia-I Wu [Thu, 9 Sep 2010 16:02:47 +0000 (00:02 +0800)]
egl: Display may be NULL in _eglLookup*.

This fixes several NULL dereferences.

14 years agollvmpipe: remove redundant tgsi_dup_tokens() call
Brian Paul [Thu, 9 Sep 2010 16:03:46 +0000 (10:03 -0600)]
llvmpipe: remove redundant tgsi_dup_tokens() call

We were calling this twice so the first allocation was orphaned/leaked.

14 years agodri/nouveau: Expose EXT_texture_env_combine.
Francisco Jerez [Thu, 9 Sep 2010 12:07:38 +0000 (14:07 +0200)]
dri/nouveau: Expose EXT_texture_env_combine.

14 years agodri/nv10-nv20: Add support for NV_texture_env_combine4.
Francisco Jerez [Thu, 9 Sep 2010 12:14:48 +0000 (14:14 +0200)]
dri/nv10-nv20: Add support for NV_texture_env_combine4.

14 years agodri/nv04: Add support for NV_texture_env_combine4.
Francisco Jerez [Thu, 9 Sep 2010 12:14:14 +0000 (14:14 +0200)]
dri/nv04: Add support for NV_texture_env_combine4.

14 years agodri/nouveau: Minor cleanup.
Francisco Jerez [Thu, 2 Sep 2010 00:18:02 +0000 (02:18 +0200)]
dri/nouveau: Minor cleanup.

14 years agoglx: Fix another use-after-free problem
Kristian Høgsberg [Thu, 9 Sep 2010 12:06:40 +0000 (08:06 -0400)]
glx: Fix another use-after-free problem

14 years agor600: add TXL instruction and note about TXB
Andre Maasikas [Thu, 2 Sep 2010 15:16:42 +0000 (18:16 +0300)]
r600: add TXL instruction and note about TXB

14 years agor600: remove depth exports move, just set to output x <- z in the export intruction
Andre Maasikas [Thu, 2 Sep 2010 08:37:23 +0000 (11:37 +0300)]
r600: remove depth exports move, just set to output x <- z in the export intruction

14 years agor600: protect cleanup instructions from double free
Andre Maasikas [Thu, 2 Sep 2010 08:09:52 +0000 (11:09 +0300)]
r600: protect cleanup instructions from double free

We might get the cleanup when we have not translated the shader yet
e.g 2 programstringnotifys in a row

14 years agor600: remove mask from output intructions
Andre Maasikas [Thu, 2 Sep 2010 08:03:38 +0000 (11:03 +0300)]
r600: remove mask from output intructions

in case of relative addressing we never get to know which comps
were really written.

14 years agor600: allow relative addressing of temps, inputs, outputs
Andre Maasikas [Thu, 2 Sep 2010 07:49:30 +0000 (10:49 +0300)]
r600: allow relative addressing of temps, inputs, outputs

14 years agor600: handle LIT writemask
Andre Maasikas [Wed, 1 Sep 2010 07:57:35 +0000 (10:57 +0300)]
r600: handle LIT writemask

14 years agor600: fix rsq from negative input
Andre Maasikas [Wed, 1 Sep 2010 07:38:07 +0000 (10:38 +0300)]
r600: fix rsq from negative input

arbfp specifies rsq of abs value

14 years agodocs: Update egl.html.
Chia-I Wu [Thu, 9 Sep 2010 05:51:59 +0000 (13:51 +0800)]
docs: Update egl.html.

Mention that EGL_DRIVERS_PATH should be specified for uninstalled build.
Update TODOs.

14 years agoglsl: add several EmitNo* options, and MaxUnrollIterations
Luca Barbieri [Sun, 5 Sep 2010 20:29:58 +0000 (22:29 +0200)]
glsl: add several EmitNo* options, and MaxUnrollIterations

This increases the chance that GLSL programs will actually work.

Note that continues and returns are not yet lowered, so linking
will just fail if not supported.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
14 years agoglsl: make compiler options per-target
Luca Barbieri [Sun, 5 Sep 2010 16:49:54 +0000 (18:49 +0200)]
glsl: make compiler options per-target

This allows us to specify different options, especially useful for chips
without unified shaders.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
14 years agomesa: add PIPE_SHADER_* like constants and conversions to/from enums (v2)
Luca Barbieri [Sun, 5 Sep 2010 22:56:07 +0000 (00:56 +0200)]
mesa: add PIPE_SHADER_* like constants and conversions to/from enums (v2)

Changes in v2:
- No longer adds tessellation enums

14 years agoglsl: Add info about talloc and optimization passes to the README.
Eric Anholt [Thu, 9 Sep 2010 01:04:35 +0000 (18:04 -0700)]
glsl: Add info about talloc and optimization passes to the README.

14 years agoglsl: Update README talking about multi-instruction operations.
Eric Anholt [Thu, 9 Sep 2010 00:49:10 +0000 (17:49 -0700)]
glsl: Update README talking about multi-instruction operations.

The previous thing taking multiple instructions ended up being handled
at the IR level, as we suggested would be the common result.  Pick a
new one.

14 years agoglx: Destroy pixmap after destroying glx and dri drawables
Kristian Høgsberg [Thu, 9 Sep 2010 00:55:02 +0000 (20:55 -0400)]
glx: Destroy pixmap after destroying glx and dri drawables

Now that we suppress BadDrawable from DRI2DestroyDrawable, this doesn't
matter, but we would get that error before when destroying pbuffers.

14 years agoconfigure: Enable -fvisibility=hidden for g++ as well
Kristian Høgsberg [Thu, 9 Sep 2010 00:34:07 +0000 (20:34 -0400)]
configure: Enable -fvisibility=hidden for g++ as well

14 years agoglsl/builtins: Set the API in the fake context.
Kenneth Graunke [Wed, 8 Sep 2010 23:03:33 +0000 (16:03 -0700)]
glsl/builtins: Set the API in the fake context.

Otherwise it gets used uninitialized.

14 years agoglsl2: Clear out profile pointers in _mesa_glsl_release_functions
Ian Romanick [Thu, 9 Sep 2010 00:13:00 +0000 (17:13 -0700)]
glsl2: Clear out profile pointers in _mesa_glsl_release_functions

Otherwise builtin_profiles contains dangling pointers the next time
_mesa_read_profile is called.  I suspect this may fix bugzilla #29847,
but I was never able to reproduce it.

14 years agomesa: Refactor parameter processing in set_combiner_(operand|source)
Ian Romanick [Wed, 8 Sep 2010 17:46:10 +0000 (10:46 -0700)]
mesa: Refactor parameter processing in set_combiner_(operand|source)

The enum values were chosen to have sequential values for a reason.
Use that to compact and simplify the code.

14 years agomesa: Fix handling of texenv operands for EXT vs ARB version
Ian Romanick [Wed, 8 Sep 2010 17:37:54 +0000 (10:37 -0700)]
mesa: Fix handling of texenv operands for EXT vs ARB version

GL_EXT_texture_env_combine has slightly more restrictive limits on the
valid sources for some operands.  This wasn't caught before because
almost every driver in Mesa that supports the EXT version also
supports the ARB version.

Inspired by a patch posted the the mesa-dev mailing list by Andrew
Randrianasulu.

14 years agoglx: Ignore DRI2 event for drawables we've destroyed
Kristian Høgsberg [Wed, 8 Sep 2010 22:54:30 +0000 (18:54 -0400)]
glx: Ignore DRI2 event for drawables we've destroyed

Since we now actually destroy GLX drawables, we get into situations where
we get events for drawables that no longer exist.  Just ignore the
event in that case.

14 years agoglx: Fix use after free problem
Kristian Høgsberg [Wed, 8 Sep 2010 18:51:18 +0000 (14:51 -0400)]
glx: Fix use after free problem

14 years agoglsl: Fix for scalar float built-in definitions.
Kenneth Graunke [Wed, 8 Sep 2010 22:38:09 +0000 (15:38 -0700)]
glsl: Fix for scalar float built-in definitions.

These need abs, and we need more tests.

14 years agoglsl: regenerate builtins
Eric Anholt [Wed, 8 Sep 2010 22:01:02 +0000 (15:01 -0700)]
glsl: regenerate builtins

14 years agoglsl: Fix typo in builtin step() using a wrong channel.
Eric Anholt [Thu, 9 Sep 2010 05:25:12 +0000 (22:25 -0700)]
glsl: Fix typo in builtin step() using a wrong channel.

14 years agoir_validate: Ensure ir_binop_dot is only used on vector types.
Kenneth Graunke [Wed, 8 Sep 2010 06:22:10 +0000 (23:22 -0700)]
ir_validate: Ensure ir_binop_dot is only used on vector types.

14 years agoglsl: Refresh automatically generated file builtin_function.cpp.
Kenneth Graunke [Wed, 8 Sep 2010 06:23:03 +0000 (23:23 -0700)]
glsl: Refresh automatically generated file builtin_function.cpp.

14 years agoglsl/builtins: Don't use ir_binop_dot on floating point values.
Kenneth Graunke [Wed, 8 Sep 2010 06:21:22 +0000 (23:21 -0700)]
glsl/builtins: Don't use ir_binop_dot on floating point values.

ir_binop_dot is only defined for vector types.  Use ir_binop_mul.

14 years agoglsl/builtins: Simplify degenerate scalar float cases.
Kenneth Graunke [Wed, 8 Sep 2010 06:16:26 +0000 (23:16 -0700)]
glsl/builtins: Simplify degenerate scalar float cases.

The code being generated was just stupid, considering that:
- normalize(x) = 1.0
- length(x) = x
- distance(x, y) = x - y

14 years agoglsl2: Make sure _mesa_glsl_parse_state constructor gets a context
Ian Romanick [Wed, 8 Sep 2010 18:33:12 +0000 (11:33 -0700)]
glsl2: Make sure _mesa_glsl_parse_state constructor gets a context

Fix an major regression in dc754586.  Too bad that change was
obviously never tested.

14 years agoglx: Drop broken drawable garbage collection
Kristian Høgsberg [Fri, 27 Aug 2010 16:40:11 +0000 (12:40 -0400)]
glx: Drop broken drawable garbage collection

Doesn't work for pixmaps, was looking up the GLX XID and was never thread
safe.  Instead, just destroy the client side structures when the
drawable is no long current for a context.

14 years agodri: Unset current context and dispatch table when unbinding
Kristian Høgsberg [Wed, 8 Sep 2010 12:52:54 +0000 (08:52 -0400)]
dri: Unset current context and dispatch table when unbinding

Otherwise, when we switch to an indirect glx context and then back, it looks
like we're still current.

https://bugs.freedesktop.org/show_bug.cgi?id=29977#c7
Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
14 years agoglsl: Support GLSL ES in the standalone compile.
Chia-I Wu [Wed, 8 Sep 2010 10:52:27 +0000 (18:52 +0800)]
glsl: Support GLSL ES in the standalone compile.

GLSL ES mode is enabled when --glsl-es is passed to glsl_compiler.

14 years agoglsl: Require a context in _mesa_glsl_parse_state.
Chia-I Wu [Wed, 8 Sep 2010 10:48:12 +0000 (18:48 +0800)]
glsl: Require a context in _mesa_glsl_parse_state.

Create a dummy context in the standalone compiler and pass it to
_mesa_glsl_parse_state.

14 years agost/dri: Call dri_init_extensions only for API_OPENGL.
Chia-I Wu [Wed, 8 Sep 2010 10:20:37 +0000 (18:20 +0800)]
st/dri: Call dri_init_extensions only for API_OPENGL.

libmesagallium.a that this state tracker will be linked to expects
OpenGL's _glapi_table.  That is, it expects libGL.so instead of
libGLESv1_CM.so or libGLESv2.so.  As there is no clean way to know the
shared library the app links to, use the api as a simple check.  It
might be as well to simply remove this function call though.

14 years agost/dri: Use enum st_api_type internally.
Chia-I Wu [Wed, 8 Sep 2010 09:41:43 +0000 (17:41 +0800)]
st/dri: Use enum st_api_type internally.

14 years agost/dri: Add multi-api support
nobled [Mon, 30 Aug 2010 20:23:54 +0000 (20:23 +0000)]
st/dri: Add multi-api support

Make st/dri screens capable of creating OpenGL ES and
OpenGL ES2 contexts.

TODO: Figure out the "get_current" problem with multiple
st_api's for real.

(s/API_OPENGLES1/API_OPENGLES/ by Chia-I Wu)

14 years agost/dri: Make clear which API's are supported
nobled [Tue, 7 Sep 2010 16:10:45 +0000 (12:10 -0400)]
st/dri: Make clear which API's are supported

If the caller requests a GLES context, don't silently create
a desktop GL context in its place.

14 years agor600g: add initial bank swizzle support.
Dave Airlie [Wed, 8 Sep 2010 04:09:40 +0000 (14:09 +1000)]
r600g: add initial bank swizzle support.

this is ported from r600c mostly, bank swizzling is real messy and I don't think
I got enough sleep last night to fully understand it.

14 years agoglcpp: Fix build on non-GCC compilers.
Kenneth Graunke [Wed, 8 Sep 2010 01:01:33 +0000 (18:01 -0700)]
glcpp: Fix build on non-GCC compilers.

14 years agoast_to_hir: Mark arrays as lvalues in GLSL ES, but prohibit assignment.
Kenneth Graunke [Tue, 7 Sep 2010 09:59:38 +0000 (02:59 -0700)]
ast_to_hir: Mark arrays as lvalues in GLSL ES, but prohibit assignment.

This allows them to be passed as out/inout parameters, but still
prevents them from being used as the target of an assignment.  This is
per section 5.8 of the GLSL ES 1.00 specification.

14 years agoglsl: Allow overloading of built-ins without hiding in GLSL ES.
Kenneth Graunke [Sun, 5 Sep 2010 08:51:28 +0000 (01:51 -0700)]
glsl: Allow overloading of built-ins without hiding in GLSL ES.

The rules are explicitly different from desktop GLSL.

14 years agoglsl: Move is_builtin flag back to ir_function_signature.
Kenneth Graunke [Sun, 5 Sep 2010 08:48:11 +0000 (01:48 -0700)]
glsl: Move is_builtin flag back to ir_function_signature.

This effectively reverts b6f15869b324ae64a00d0fe46fa3c8c62c1edb6c.

In desktop GLSL, defining a function with the same name as a built-in
hides that built-in function completely, so there would never be
built-in and user function signatures in the same ir_function.

However, in GLSL ES, overloading built-ins is allowed, and does not
hide the built-in signatures - so we're back to needing this.

14 years agoast_to_hir: Reject embedded structure definitions in GLSL ES 1.00.
Kenneth Graunke [Mon, 16 Aug 2010 21:02:25 +0000 (14:02 -0700)]
ast_to_hir: Reject embedded structure definitions in GLSL ES 1.00.

14 years agoast_to_hir: Reject unsized array declarations in GLSL ES 1.00.
Kenneth Graunke [Sat, 7 Aug 2010 09:56:01 +0000 (02:56 -0700)]
ast_to_hir: Reject unsized array declarations in GLSL ES 1.00.

14 years agoast_to_hir: Allow matrix-from-matrix constructors in GLSL ES.
Kenneth Graunke [Wed, 1 Sep 2010 20:12:10 +0000 (13:12 -0700)]
ast_to_hir: Allow matrix-from-matrix constructors in GLSL ES.

Everything but 1.10 supports this, so just change the check to ==.

14 years agoi965: Enable EXT_framebuffer_blit internally.
Kenneth Graunke [Mon, 30 Aug 2010 19:05:05 +0000 (12:05 -0700)]
i965: Enable EXT_framebuffer_blit internally.

Otherwise, ES2's BindFramebuffer entrypoint hits this assertion:
main/fbobject.c:1323: _mesa_BindFramebufferEXT: Assertion
`ctx->Extensions.EXT_framebuffer_blit' failed.

14 years agomesa: Enable GL_MAX_VERTEX_ATTRIBS in ES2.
Kenneth Graunke [Mon, 30 Aug 2010 19:27:07 +0000 (12:27 -0700)]
mesa: Enable GL_MAX_VERTEX_ATTRIBS in ES2.

Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
14 years agolinker: Fix assertion and cross-version checks for version 100.
Kenneth Graunke [Tue, 31 Aug 2010 16:33:58 +0000 (09:33 -0700)]
linker: Fix assertion and cross-version checks for version 100.

Fixes an assert (min_version >= 110) which was no longer correct, and
also prohibits linking ES2 shaders with non-ES2 shaders.  I'm not
positive this is correct, but the specification doesn't seem to say.

14 years agoglsl: Add built-in function profiles for GLSL ES 1.00.
Kenneth Graunke [Mon, 16 Aug 2010 20:04:09 +0000 (13:04 -0700)]
glsl: Add built-in function profiles for GLSL ES 1.00.

14 years agoglsl: Add built-in variables for GLSL ES 1.00.
Kenneth Graunke [Sat, 7 Aug 2010 09:45:33 +0000 (02:45 -0700)]
glsl: Add built-in variables for GLSL ES 1.00.

14 years agoglsl: Split out types that are in 1.10 but not GLSL ES 1.00.
Kenneth Graunke [Sat, 7 Aug 2010 09:03:00 +0000 (02:03 -0700)]
glsl: Split out types that are in 1.10 but not GLSL ES 1.00.

14 years agoglsl: Recognize GLSL ES 1.00 keywords.
Kenneth Graunke [Sun, 5 Sep 2010 08:32:32 +0000 (01:32 -0700)]
glsl: Recognize GLSL ES 1.00 keywords.

14 years agoglsl: Define GL_ES preprocessor macro if API is OpenGL ES 2.0.
Kenneth Graunke [Sun, 5 Sep 2010 08:27:02 +0000 (01:27 -0700)]
glsl: Define GL_ES preprocessor macro if API is OpenGL ES 2.0.

Also define it if #version 100 is encountered.

14 years agoglsl: Accept language version 100 and make it the default on ES2.
Kenneth Graunke [Mon, 16 Aug 2010 19:34:53 +0000 (12:34 -0700)]
glsl: Accept language version 100 and make it the default on ES2.

14 years agoglsl: Set default language version in mesa_glsl_parse_state constructor.
Kenneth Graunke [Sun, 5 Sep 2010 07:31:28 +0000 (00:31 -0700)]
glsl: Set default language version in mesa_glsl_parse_state constructor.

This should make it easier to change the default version based on the
API (say, version 1.00 for OpenGL ES).

Also, synchronize the symbol table's version with the parse state's
version just before doing AST-to-HIR.  This way, it will be set when
it matters, but the main initialization code doesn't have to care about
the symbol table.

14 years agoir_to_mesa: Add support for gl_NormalScale.
Eric Anholt [Tue, 7 Sep 2010 23:25:22 +0000 (16:25 -0700)]
ir_to_mesa: Add support for gl_NormalScale.

Bug #30040.

14 years agoglsl: Make sure shader source isn't NULL.
Kenneth Graunke [Tue, 7 Sep 2010 23:25:53 +0000 (16:25 -0700)]
glsl: Make sure shader source isn't NULL.

This should only occur if glCompileShader is called without a prior call
to glShaderSource.  An empty source program should be the empty string.

14 years agor600g: Added missing r600_bc_add_literal() calls to XPD implementation.
Tilman Sauerbeck [Tue, 7 Sep 2010 09:38:18 +0000 (11:38 +0200)]
r600g: Added missing r600_bc_add_literal() calls to XPD implementation.

Signed-off-by: Dave Airlie <airlied@redhat.com>