Commit graph

47316 commits

Author SHA1 Message Date
Kenneth Graunke
47f1d9deff i965: Remove "single threaded" INTEL_DEBUG mode.
According to the docs for 3DSTATE_PS (Gen7+) and 3DSTATE_WM (Gen6),
there is a platform dependent value for the minimum number of pixel
shader threads.  It may also vary based on whether WIZ Hashing is on.

For example, Ivybridge requires at least 4 threads if WIZ hashing is
disabled, and 8 if it's enabled.  Programming it to use less threads is
illegal.  Sandybridge appears to have similar restrictions.

So on newer platforms, INTEL_DEBUG=sing will probably just hang the GPU.
Rather than try to patch it up for newer platforms and extend it to
support geometry shaders, just remove it as it isn't that useful anyway.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
2011-10-25 17:09:21 -07:00
Kenneth Graunke
7a86bf816c mesa: Remove unnecessary and incorrect TexEnv parameter validation.
For GL_RGB_SCALE and GL_ALPHA_SCALE targets, the API wrapper code
attempts to ensure the parameter is 1.0, 2.0, or 4.0.

This is unnecessary: set_combiner_scale in texenv.c (called by
_mesa_TexEnvfv) already checks this and raises an appropriate error.

It's also incorrect: For glTexEnvx, the API validation code directly
compares the GLfixed input parameter with a floating point constant,
prior to converting fixed-point to floating point.

Fixes an issue in the OpenGL ES 1.1 conformance suite.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2011-10-25 16:25:39 -07:00
Stéphane Marchesin
00ddc7ea47 st/glx: Implement texture_from_pixmap without DRI.
Makes texture_from_pixmap work with non-DRI llvmpipe.
2011-10-25 14:35:46 -07:00
Stéphane Marchesin
b1d93d2aa8 i915g: Cleanup the vertex sampler interface a bit. 2011-10-25 14:30:08 -07:00
Stéphane Marchesin
2b4ab1435f i915g: Flesh out TODO idea. 2011-10-25 14:30:07 -07:00
Chad Versace
882c83377d intel: Kill dead code in intel_miptree_copy_teximage()
Kill the code paths taken when src_mt is null. It is never null, otherwise
there would be a segfault on line 4 of this function:
    GLuint width = src_mt->level[level].width;

(Some interleaved lines in the diff make the real diff non-obvious. All
I did was delete some code and then left-shifted what remained to correct
the indentation.)

Reviewed-by: Eric Anholt <eric@aholt.net>
Signed-off-by: Chad Versace <chad@chad-versace.us>
2011-10-25 11:28:32 -07:00
Vinson Lee
265f55e627 tgsi: Fix memory leak in out-of-memory path.
Fixes Coverity resource leak defect.

Reviewed-by: Brian Paul <brianp@vmware.com>
2011-10-25 11:12:51 -07:00
Vinson Lee
c81b441ba2 swrast: Fix memory leak in out-of-memory path.
Fixes Coverity resource leak defect.

Reviewed-by: Brian Paul <brianp@vmware.com>
2011-10-25 11:09:45 -07:00
Brian Paul
e8d0d7893a swrast: use _mesa_ffs() instead of ffs()
Fixes MSVC build.
2011-10-25 11:26:26 -06:00
Marek Olšák
765503bb5d r600g: move some code out of draw_vbo into new r600_update_derived_state 2011-10-25 19:21:49 +02:00
Marek Olšák
3d79347609 r600g: cleanup some magic numbers 2011-10-25 19:12:33 +02:00
Marek Olšák
dc651aff0c r600g: don't render if pipe_draw_info::count is 0
Also call r600_conv_pipe_prim earlier.
2011-10-25 19:12:33 +02:00
Brian Paul
05720e14ba mesa: fix comment language 2011-10-25 08:45:58 -06:00
Vinson Lee
ca1b60057a pp: Fix memory leak on error path.
Fixes Coverity resource leak defect.

Reviewed-by: José Fonseca <jfonseca@vmware.com>
2011-10-25 07:38:53 -07:00
Marek Olšák
faa16dc456 r600g: set correct tiling flags in depth info
The kernel currently overwrites the flags, but if we stopped doing that,
this would break badly.
2011-10-25 01:47:03 +02:00
Jeremy Huddleston
5c44c1348e apple: Implement applegl_unbind_context
glXMakeCurrent(dpy, None, NULL) would not correctly unbind the context
causing subsequent GLX requests to fail in peculiar ways

http://xquartz.macosforge.org/trac/ticket/514

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-10-24 16:21:28 -07:00
Brian Paul
9dc7df1fea util: handle failed mapping in u_upload_alloc()
Reviewed-by: José Fonseca <jfonseca@vmware.com>
2011-10-24 16:39:58 -06:00
Brian Paul
19961da4cb util: handle failed mapping in u_upload_alloc_buffer()
Reviewed-by: José Fonseca <jfonseca@vmware.com>
2011-10-24 16:39:58 -06:00
Vinson Lee
4e6a0b40c5 mesa: Fix memory leak in out-of-memory path.
Fixes Coverity resource leak defect.

Reviewed-by: Brian Paul <brianp@vmware.com>
2011-10-24 14:13:01 -07:00
Eric Anholt
cc4ddc3a1e glsl: Fix gl_NormalMatrix swizzle setup to match i965's invariants.
A driver trying to set up builtin uniforms is faced with a problem:
How do I walk the ir_variable structure (representing an array of
structs, or array of matrices, or struct, or whatever), and set up
driver structures so that dereference of that uniform gets the
corresponding ParameterValues[] entry.  The rule in general is that
each corresponding vector-sized field of an array of structs is one
builtin uniform state slot.  i965 relied on another invariant: each
state slot has a number of unique channel swizzles corresponding to
the number of elements in the field's vector, to avoid needing to walk
the glsl_type in parallel to get at vector_elements.

All of the builtin uniforms followed this behavior, except for
gl_NormalMatrix.  That's a mat3 (so 3 vec3s), but it was swizzled as 3
vec4s.

Fixes piglit glsl-fs-normalmatrix.
Reviewed-by: Paul Berry <stereotype441@gmail.com>
2011-10-24 13:43:02 -07:00
Eric Anholt
2ecfa88548 glsl: Add gl_MaxVaryingComponents in GLSL 1.30.
This is the new name for gl_MaxVaryingFloats now that non-float
varyings exist.  Fixes piglit
glsl-1.30/execution/maximums/gl_MaxVaryingFloats

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2011-10-24 13:43:02 -07:00
Kenneth Graunke
3cc0a7be23 i965: Apply post-sync non-zero workaround to homebrew workaround.
In commit 3e5d3626, Eric added a homebrew workaround to fix GPU hangs in
the Mesa "engine" demo and oglc's api-texcoord test.

Unfortunately, his PIPE_CONTROL contains a Depth Stall, which
necessitates the post-sync non-zero workaround,

Fixes GPU hangs in Civilization 4, PlaneShift, and 3DMMES.
Hopefully Heroes of Newerth as well, though I haven't tested that.

NOTE: This is candidate for the 7.11 branch.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=40324
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=41096
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-and-tested-by: Eric Anholt <eric@anholt.net>
2011-10-24 13:32:33 -07:00
Marek Olšák
56ac7ccae6 docs: update relnotes-7.12 2011-10-24 21:08:13 +02:00
Marek Olšák
cdaf9b89e4 r300g: expose ARB_ES2_compatibility by claiming FIXED format support 2011-10-24 21:05:38 +02:00
Adel Gadllah
fc8196f7a6 nv50: fix max texture levels
MAX_TEXTURE_2D_LEVELS and MAX_TEXTURE_CUBE_LEVELS are supposed to be
14 not 13, while MAX_TEXTURE_3D_LEVELS should be 12 not 10.
2011-10-24 20:07:22 +02:00
Marek Olšák
ef64da8f01 winsys/radeon: don't use the new GEM_WAIT ioctl for now 2011-10-24 20:01:14 +02:00
Tom Fogal
cbb2b4149b Only use gcc visibility support with gcc4+.
I had a colleague hitting issues compiling with an old gcc3.2
system.  These patches got them through.

NOTE: This is a candidate for the 7.11 branch.

Reviewed-by: Brian Paul <brianp@vmware.com>
2011-10-24 10:22:52 -06:00
Mathias Fröhlich
2717b8f034 winsys/radeon: restore the old r600g winsys memory characteristics.
Use VRAM for static and immutable buffers. This restores the
recently removed r600g winsys behaviour for memory locations.
This also improoves rendering times on the gpu for some
OpenSceneGraph based test cases by about 15%.

Signed-off-by: Marek Olšák <maraeo@gmail.com>
2011-10-24 18:20:07 +02:00
Brian Paul
50b0069fc1 util: remove gotos in u_upload_mgr.c
We can trivially remove the gotos in two places in this code and make
it a bit more readable.

Reviewed-by: José Fonseca <jfonseca@vmware.com>
2011-10-24 09:31:01 -06:00
Mathias Fröhlich
9ed88983b0 mesa: Avoid ABA problem on buffer object bind.
Make sure we do not run into the classic ABA problem on buffer object bind,
reusing this name and may be never rebind since we get an new name
that was just deleted and never rebound in between.
The explicit rebinding to the debault object in the current context
prevents the above in the current context, but another context
sharing the same objects might suffer from this problem.

Minor var renaming and comments edited by Brian.

Signed-off-by: Mathias Fröhlich <Mathias.Froehlich@web.de>
Signed-off-by: Brian Paul <brianp@vmware.com>
2011-10-24 08:37:19 -06:00
Brian Paul
c9bb1bdc48 swrast: fix comment typo (s/texure/texture/) 2011-10-23 20:21:18 -06:00
Brian Paul
b487fc50b0 mesa: remove dead code from teximage.c 2011-10-23 20:17:53 -06:00
Mathias Fröhlich
597df3efda mesa: Fix multithreaded buffer object refcounting.
Buffer objects may be shared across contexts.
Rework the array attrib push/pop implementation
to be thread safe. Make use of more library functions
for this purpose.

Signed-off-by: Mathias Fröhlich <Mathias.Froehlich@web.de>
Reviewed-by: Brian Paul <brianp@vmware.com>
2011-10-23 21:35:05 +02:00
Marek Olšák
21e3c585f7 r300g: don't call u_trim_pipe_prim in r300_swtcl_draw_vbo
This was dead code anyway.
2011-10-23 20:29:06 +02:00
Marek Olšák
89ce12a2d2 u_blitter: accept overriden width0 and height0
We'll use this soon.
2011-10-23 20:27:07 +02:00
Marek Olšák
37b62cc354 u_blitter: add a copy_texture function which uses views and not resources
The views (sampler views and surfaces) are great tools for changing resource
properties without having to change pipe_resource.
2011-10-23 20:27:06 +02:00
Brian Paul
cf81f2349c intel: remove duplicated #include of texstore.h 2011-10-23 11:22:33 -06:00
Brian Paul
37fdfbfb0e radeon: remove unnecessary #includes of texstore.h 2011-10-23 11:22:23 -06:00
Brian Paul
39503c1419 configs: add vmgfx-related dirs to configs/linux-dri 2011-10-23 11:10:06 -06:00
Brian Paul
b7f670655d swrast: update renderbuffer format assertion
Failed when exercising i965 swrast fallback rendering.
2011-10-23 10:44:47 -06:00
Brian Paul
68da4b50e9 mesa: add swrast_texture_image::Buffer
In the past, swrast_texture_image::Data has been overloaded.  It could
either point to malloc'd memory storing texture data, or it could point
to a current mapping of GPU memory.

Now, Buffer always points to malloc'd memory (if we're not using GPU
memory) and Data always points to mapped memory.  The next step would
be to rename Data -> Map.

This change also involves adding swrast functions for mapping textures
and renderbuffers prior to rendering to setup the Data pointer.  Plus,
corresponding functions to unmap texures and renderbuffers.  This is
very much like similar code in the dri drivers.
2011-10-23 10:44:47 -06:00
Brian Paul
66681b4c8c mesa: remove _mesa_alloc_texmemory(), _mesa_free_texmemory()
Core Mesa no longer does any texture memory allocation.
2011-10-23 10:44:47 -06:00
Brian Paul
6e0f9001fe mesa: move gl_texture_image::Data, RowStride, ImageOffsets to swrast
Only swrast and the drivers that fall back to swrast need these fields now.
This removes the last of the fields related to software rendering from
gl_texture_image.
2011-10-23 10:44:47 -06:00
Brian Paul
33abbd4fbd llvmpipe: point out that there's two stencil writemasks
In lp_build_stencil_op() the incoming 'stencil' var is a 2-element array.
There's a front-face writemask and a back-face writemask but we're ignoring
the later.  This patch doesn't fix anything but at least points out the
problem.
2011-10-23 10:09:34 -06:00
Brian Paul
c7aa8da957 llvmpipe: compare front_facing to NULL to improve readability
Compare 'front_facing' to NULL to make it more obvious that front_facing
is a pointer and not a simple boolean value.
2011-10-23 10:09:34 -06:00
Brian Paul
903a14ed91 gallivm: added lp_build_print_ivec4() function 2011-10-23 10:09:33 -06:00
Brian Paul
08b2cc018d mesa: improve the warning message in _mesa_choose_tex_format()
Bug 42128 hits this _mesa_warning() call.
2011-10-23 10:00:04 -06:00
Eric Anholt
dc637b66b2 glsl: Add support for constant expression evaluation on round(), roundEven().
v2: Avoid the C99 rounding functions, because I don't trust
get/setting the C99 rounding mode from inside our library not having
other side effects.  Instead, open-code roundEven() behavior around
Mesa's IROUND, which we're already testing for C99 rounding mode
safety.

Fixes glsl-1.30/compiler/built-in-functions/round*

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-10-23 00:37:14 -07:00
Mathias Fröhlich
b27a67af89 dri-r600: Hook up a drm_descriptor configuration function
Returns a configuration that makes the dri state-tracker-manager
throttle.
2011-10-23 09:08:18 +02:00
Mathias Fröhlich
d5bfcf73fd r600g: make r[67]00 not bail out on PRED_SETNE_INT. 2011-10-23 08:57:43 +02:00