Commit graph

42227 commits

Author SHA1 Message Date
Vadim Girlin
dcdc062dda r600g: fix op3 & write in merge_inst_groups 2011-11-14 11:11:31 -05:00
Alex Deucher
ebecbbc2e6 r600g: set max max tex/vtx instructions count to 16 for cayman
Cayman is 16 as well.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2011-11-14 11:01:00 -05:00
Vadim Girlin
c32ca6d9c1 r600g: set max tex/vtx instructions count to 16 for evergreen
According to evergreen-isa doc 16 is max value for evergreen.
More than 16 doesn't work for me.

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
2011-11-14 10:59:53 -05:00
Fabio Pedretti
8f55f5b77b radeon: further cleanup of shared code
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2011-11-14 10:54:19 -05:00
Alex Deucher
494d005390 radeon: add some missing FireMV pci ids
Note: this is a candidate for the stable branches.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2011-11-14 09:57:05 -05:00
José Fonseca
8f9fc8b9d2 mesa/st: Flush stdout after pritingin the GLSL.
Otherwise it gets all garbled with stderr.
2011-11-14 14:43:25 +00:00
José Fonseca
b0cdeda4f2 glsl: Add missing ';' in action statement.
Addresses the warnings:

  warning: a `;' might be needed at the end of action code
  warning: future versions of Bison will not add the `;'
2011-11-14 14:14:45 +00:00
José Fonseca
ab3ace56c4 llvmpipe: Silent warnings about undeclared llvmpipe_check_render_cond. 2011-11-14 13:50:33 +00:00
José Fonseca
6246c217ec util: Avoid signed/unsigned comparison in u_trim_pipe_prim(). 2011-11-14 10:06:01 +00:00
José Fonseca
d7edd5db31 llvmpipe: Remove unused variables.
Reviewed-by: Brian Paul <brianp@vmware.com>
2011-11-14 10:06:01 +00:00
José Fonseca
c88f3e0374 llvmpipe: Make more resilient to out-of-memory situations.
Most of the code was alright, but we were missing a few paths.

Reviewed-by: Brian Paul <brianp@vmware.com>
2011-11-14 10:06:01 +00:00
José Fonseca
9e29cdbe95 draw: Handle failure to allocate aligned_constant_storage.
Also, actually update const_storage_size, therefore avoiding to
unnecessarily reallocate aligned_constant_storage every single time
draw_vs_set_constants() is called.

Reviewed-by: Brian Paul <brianp@vmware.com>
2011-11-14 10:06:00 +00:00
José Fonseca
e21c5157b6 gallivm: Remove duplicate statement.
ary_ge_arx_arz is already set earlier.

Reviewed-by: Brian Paul <brianp@vmware.com>
2011-11-14 10:06:00 +00:00
José Fonseca
34930facfe gallivm: Include stddef.h before the LLVM C++ headers.
Necessary with build against LLVM 2.6, with recent gcc, as LLVM headers
depend on ptrdiff_t but don't properly include stddef.h
2011-11-14 10:06:00 +00:00
Dave Airlie
b04d19da10 llvmpipe: fix unswizzle of packed float types.
I messed up adding the ubyte->float conversion.

This fixes getteximage-formats

https://bugs.freedesktop.org/show_bug.cgi?id=42837

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-11-14 09:35:17 +00:00
Alex Deucher
579c04e42e r600g: properly handle cayman in is_alu_vec_unit_inst()
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2011-11-13 17:46:01 -05:00
Vadim Girlin
3d441153a1 r600g: fix cb offset for flushed_depth_texture
Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
2011-11-13 17:27:16 -05:00
Vadim Girlin
d5e91a2364 r600g: fix stencil buffer ref counting on evergreen
Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
2011-11-13 17:25:16 -05:00
Vadim Girlin
8e366dc365 r600g: lazy load for AR register
Emit MOVA* instruction only when AR is used.

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
2011-11-13 17:10:02 -05:00
Vadim Girlin
88a140cd19 r600g: include INTERP_[XY|ZW] in is_alu_vec_unit_inst
This will disallow moving them to the trans slot in merge_inst_groups

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
2011-11-13 17:09:59 -05:00
Morgan Armand
54346d1f9b glcpp: Add GL_ARB_draw_instanced #define. 2011-11-12 12:39:51 -08:00
Kenneth Graunke
b618e78897 i965: Don't try to normalize cubemap coordinates for textureSize.
Although textureSize is represented as an ir_texture with op == ir_txs,
it doesn't have a coordinate, so normalizing it doesn't make sense.

Fixes crashes in oglconform glsl-bif-tex-size basic.samplerCube.* tests.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
2011-11-12 00:56:20 -08:00
Chad Versace
bf8ad170c5 mesa: Fix glFramebufferTexture*() for depth and stencil attachments
This patch solves three bugs.

1. When a texture was attached to the GL_DEPTH_STENCIL_ATTACHMENT point,
Mesa attached the texture only to the depth attachment point
    gl_framebuffer::Attachment[BUFFER_DEPTH]
and failed to attach it to the stencil attachment point
    gl_framebuffer::Attachment[BUFFER_STENCIL]

2. When a texture was attached to the GL_DEPTH_ATTACHMENT point and then
later attached to the GL_STENCIL_ATTACHMENT point, Mesa created two
separate renderbuffer wrappers. This caused a GL error in
glGetFramebufferAttachmentParameteriv().

3. Same as 2, but with depth and stencil juxtaposed.

Fixes Piglit test ARB_framebuffer_object/same-attachment-glFramebufferTexture2D-GL_DEPTH_STENCIL

Note: This is a candidate for the stable branches.
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
2011-11-11 12:28:22 -08:00
Eric Anholt
8727807f7e i965: Expose GLSL 1.30 on gen6+.
With the gl_VertexID support, everything required should now be
supported.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2011-11-11 08:28:12 -08:00
Eric Anholt
1c65abb211 i965: Add support for gl_VertexID and gl_InstanceID.
The compiler setup for these VF-uploaded attributes looks a little
cheesy with mixing system values and real VBO-sourced attributes.  It
would be nice if we could just compute the ATTR[] map to GRF index up
front and use it at visit time instead of using ir->location in the
ATTR file.  However, we don't know the reg_offset at
visit(ir_variable *) time, so we can't do the mapping that early.

Fixes piglit vertexid test.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2011-11-11 08:27:59 -08:00
Eric Anholt
9472f66776 i965: Replace a should-never-happen fallback with asserts where it matters.
We only allow 16 vec4s of attributes in our GLSL/ARB_vp programs, and
1 more element will get used for gl_VertexID/gl_InstanceID.  So it
should never have been possible to hit this fallback, unless there was
another bug.  If you do hit this, you're probably using gl_VertexID
and falling back to swrast won't work for you anyway.

This also updates the limits for gen6+.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2011-11-11 08:27:54 -08:00
Eric Anholt
919c53e87a mesa: Make gl_VertexID be a system value like gl_InstanceID.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2011-11-11 08:27:51 -08:00
Eric Anholt
44fc3c6c1c glsl: Move builtin_variables.h into .cpp.
This used to be script-generated, but now it's just a bunch of static
variables in a .h file for no good reason.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2011-11-11 08:27:49 -08:00
Eric Anholt
ab5c2622b6 glsl: Move ir_variable.cpp to builtin_variables.cpp.
It's only about builtins, not variables in general.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2011-11-11 08:21:34 -08:00
Mathias Fröhlich
8ca76386f5 state_tracker: remove written but never used variable. 2011-11-11 17:00:00 +01:00
Dave Airlie
2f98ac473b radeon: fix build.
I had a later patch remove this code, but cherry-picked across it.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-11-11 15:55:52 +00:00
Dave Airlie
88ec12539a radeon: drop unused constant_cliprect field 2011-11-11 15:04:53 +00:00
Dave Airlie
0dd6bdf632 radeon: disable texobj state for 3d texture
for 3d texture fallback, disable the texobj state.

Signed-off-by : Dave Airlie <airlied@redhat.com>
2011-11-11 15:04:53 +00:00
Dave Airlie
99109e9fe0 radeon: use meta bitmap
Now that the stride bug is fixed, enable Bitmap via meta mode.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-11-11 15:04:52 +00:00
Dave Airlie
beb3e81b86 radeon: fix bug with wrong stride being used for rectangluar textures.
This broke the meta bitmap code when it was enabled.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-11-11 15:04:52 +00:00
Brian Paul
ba3b9fad60 i965: remove #include of api_noop.h 2011-11-11 07:23:45 -07:00
Brian Paul
6e9b1d5d0d xlib: set alpha to 0xff when mapping RGB pixmaps
Fixes a bunch of conform regressions.
2011-11-11 07:13:00 -07:00
Brian Paul
16bff7e2ce swrast: avoid calling _mesa_get_srgb_format_linear() inside a loop 2011-11-11 07:12:59 -07:00
Brian Paul
0f3f6cf02b swrast: remove bogus assertion
It would fail for images that were never allocated (and wouldn't be
used during rendering).
2011-11-11 07:12:55 -07:00
Brian Paul
871dc64869 svga: don't crash/assert if we fail to allocate a vertex buffer
v2: check if pipe_buffer_map() returns NULL, and return NULL from
svga_vbuf_render_map_vertices().  Per Jose's suggestion.

Reviewed-by: José Fonseca <jfonseca@vmware.com>
2011-11-11 07:10:56 -07:00
Brian Paul
aa66130682 draw: handle out of memory conditions
If the vbuf backend fails to allocate a vertex buffer, don't crash
or assert.
2011-11-11 07:10:56 -07:00
Brian Paul
7288bfb2a4 util: check for null vertex buffer object in blit code
Don't crash if we fail to allocate a vertex buffer.
2011-11-11 07:10:56 -07:00
Brian Paul
2551ff5900 st/mesa: fix OOM failure in bitmap code 2011-11-11 07:10:56 -07:00
Brian Paul
97dedfda5f vbo: better handling of VBO allocation failures
Previously, if we failed to allocate a VBO (either for display list
compilation or immediate mode rendering) we'd eventually segfault
when trying to map the non-existant buffer or in a glVertex/Color/etc
call when we hit a null pointer.

Now we don't try to map non-existant buffers and if we do fail to
allocate a VBO we plug in no-op functions for glVertex/Color/etc
so we don't segfault.
2011-11-11 07:10:56 -07:00
Brian Paul
e6c4159372 mesa: replace api_noop.[ch] with vbo_noop.[ch]
None of the code in api_noop.c was used anymore.  The new vbo_noop.c
functions are true no-ops.  They'll be used to no-op glBegin/End functions
when we run out of VBO memory.
2011-11-11 07:10:56 -07:00
Brian Paul
cd30c28e3b vbo: pull some code from api_noop.c into vbo module
Only a handful of functions from api_noop.c are actually used by
the VBO module.  Move them to the VBO module.  With this change,
none of the code in api_noop.c is actually used anymore.
2011-11-11 07:10:56 -07:00
Brian Paul
6ba0ba09b4 mesa: remove ancient, unused gl_free_control_points prototoype 2011-11-11 07:10:55 -07:00
Kenneth Graunke
9ae10e9cbd i965: Make Gen6+ renderbuffer surface updates not depend on NEW_COLOR.
NEW_COLOR is only needed on Gen4-5 as brw_update_renderbuffer_surfaces
only uses ctx->Color when intel->gen < 6.

This should reduce unnecessary state updates.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
2011-11-10 22:51:20 -08:00
Kenneth Graunke
d46dfed958 i965: Reorder state atom lists so all the surface state is together.
Not strictly necessary, but seems like a good idea.

Suggested-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
2011-11-10 22:51:20 -08:00
Kenneth Graunke
a17a78a212 glsl: Handle constant expressions involving ir_binop_equal/nequal.
Constant expressions which called GLSL's equal() and notEqual()
built-ins on bvecs would hit an assertion failure; we simply forgot to
implement them for booleans.

NOTE: This is a candidate for stable release branches.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
2011-11-10 22:51:20 -08:00