Commit Graph

48156 Commits

Author SHA1 Message Date
Marek Olšák df54b53b7d r300g: improve function radeon_bo_is_referenced_by_cs
This should prevent calling into radeon_get_reloc when there's
only one context.
2011-02-12 03:08:39 +01:00
Marek Olšák 20a78b68a3 u_vbuf_mgr: fix segfault
max_index could have been less than min_index, which later caused integer
underflow followed by a segfault in memcpy.
2011-02-12 03:08:39 +01:00
Ian Romanick 3803295fc2 ir_to_mesa: Don't dereference a NULL pointer during copy propagation
The ACP may already be NULL, so don't try to make it NULL again.

This should fix bugzilla #34119.
2011-02-11 15:44:19 -08:00
Ian Romanick a0120e6e0f glcpp: regerated files
These should have been committed right after fd1252ab, but they were
missed.  Soon, we'll never have to do this again...
2011-02-11 15:44:19 -08:00
Ian Romanick afdceede55 glsl: Regenerate files modified by previous commits 2011-02-11 14:12:44 -08:00
Ian Romanick 8842158944 glsl: Finish out the reduce/reduce error fixes
Track variables, functions, and types during parsing.  Use this
information in the lexer to return the currect "type" for identifiers.

Change the handling of structure constructors.  They will now show up
in the AST as constructors (instead of plain function calls).

Fixes piglit tests constructor-18.vert, constructor-19.vert, and
constructor-20.vert.  Also fixes bugzilla #29926.

NOTE: This is a candidate for the 7.9 and 7.10 branches.
2011-02-11 14:12:43 -08:00
Keith Packard f4b812e1a6 glsl: Eliminate reduce/reduce conflicts in glsl grammar
This requires lexical disambiguation between variable and type
identifiers (as most C compilers do).

Signed-off-by: Keith Packard <keithp@keithp.com>

NOTE: This is a candidate for the 7.9 and 7.10 branches.
2011-02-11 14:12:43 -08:00
Benjamin Franzke 81affb8f4c st/mesa: Fix surfaceless opengl with non-dummy contexts
main/context.c:check_complatible() detecs an incomplete
framebuffer using its pointer, so do not copy it.

This should fix https://bugs.freedesktop.org/show_bug.cgi?id=34042
2011-02-11 16:54:04 -05:00
Brian Paul 6c3a82a1a3 svga: disable a debug_printf() call 2011-02-11 14:07:43 -07:00
Brian Paul 396da5df0e svga: comments and debug code 2011-02-11 14:02:30 -07:00
Brian Paul f7d84c177f svga: more comments for need_pipeline field 2011-02-11 14:02:30 -07:00
José Fonseca 6826d58bbf scons: Need c99 also when cross compiling. 2011-02-11 20:09:26 +00:00
José Fonseca 982609f4cf scons: builtin_glsl_function on windows needs bundled getopt. 2011-02-11 20:09:26 +00:00
José Fonseca ae760279f1 scons: Try to support building 64bit binaries on 32bit windows. 2011-02-11 20:09:26 +00:00
José Fonseca 051f8bbfee scons: Fix MSVC 64bit build. 2011-02-11 20:09:26 +00:00
Brian Paul 3ee97ead0b mesa: remove some unused gl_shader fields 2011-02-11 12:00:51 -07:00
Brian Paul 413511f796 draw: tweak AA line texture minimum alpha
AA lines drawn as textured quads look a little better with this change.
Conformance/piglit tests still pass.
2011-02-11 12:00:51 -07:00
Brian Paul da2e541218 svga: add max DMA size check in svga_winsys_buffer_create()
This fixes a problem when trying to use large (2K x 2K) texture
images.  We'll DMA the image in chunks.

Patch written by Jose.
2011-02-11 11:56:45 -07:00
Brian Paul 8c61799051 svga: remove old comment, remove extra whitespace 2011-02-11 11:54:55 -07:00
Tobias Jakobi 11f35aa418 glsl: Fix parallel build.
Broken since e0c1fc3283.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
2011-02-11 10:36:14 -08:00
José Fonseca 6ed0f2ac11 svga: Enable the draw pipeline for smooth lines.
Spotted by Brian Paul.
2011-02-11 11:24:55 +00:00
José Fonseca 57a3d36a68 svga: Don't use the draw pipeline for non-AA lines with a fractional width.
Spotted by Jakob Bornecrantz.
2011-02-11 11:24:55 +00:00
José Fonseca 4586e6c8cb draw: Don't use the pipeline when drawing lines with fractional widths.
Spotted by Jakob Bornecrantz.
2011-02-11 11:24:55 +00:00
José Fonseca 7ac2db893a llvmpipe: Use u_math's round. 2011-02-11 11:24:54 +00:00
José Fonseca 151faa2258 util: Define round and roundf on MSVC. 2011-02-11 11:11:33 +00:00
José Fonseca f0ca9f7134 svga: Stippled lines can also be drawn with triangles. 2011-02-11 07:48:05 +00:00
Marek Olšák de22d8f1ee r300g: remove unused function prototypes, update copyright 2011-02-11 06:07:23 +01:00
Haitao Feng 3104e5cb4f egl_dri2: rename loader_extension to dri2_loader_extension
Signed-off-by: Haitao Feng <haitao.feng@intel.com>
2011-02-10 23:41:21 -05:00
Benjamin Franzke 9f213f6a4a st/egl wayland: Sync front buffer release 2011-02-10 23:07:01 -05:00
Benjamin Franzke 51f2820922 egl_dri2 wayland: Sync front buffer release 2011-02-10 23:07:01 -05:00
Benjamin Franzke 4e8f95f64d egl_dri2: Always unbind old contexts
This fixes __DRIdrawable refcounting.
Binding a context increases their refcount,
so we need to decrease it.
2011-02-10 23:07:01 -05:00
Benjamin Franzke 87dde5b1cd egl_dri2: Use double buffering for window surfaces 2011-02-10 23:07:01 -05:00
Benjamin Franzke 71fa227029 st/dri: Set render_buffer in dri_fill_st_visual
st/mesa/st_managaer.c needs render_buffer in order
to determinde which buffer should be rendered to.
2011-02-10 23:07:01 -05:00
Benjamin Franzke fa3283cca8 st/dri: img_from_renderbuf: Fix incorrect usage of dri_context() 2011-02-10 23:07:01 -05:00
Benjamin Franzke 0acb31be17 st/dri: Fix surfaceless gl using contexts with previous bound surfaces
ctx->dPriv might be != NULL then draw which is NULL is accessed:

struct dri_drawable *draw = dri_drawable(driDrawPriv);
[..]
if (ctx->dPriv != driDrawPriv) {
      ctx->dPriv = driDrawPriv;
      draw->texture_stamp = driDrawPriv->lastStamp - 1;
}
2011-02-10 23:07:01 -05:00
Benjamin Franzke c79a5a7067 st/egl wayland: Set color_format according to wl_visual 2011-02-10 23:07:01 -05:00
Dave Airlie 596684eb93 r600g: get correct height alignment
useful for s3tc
2011-02-11 13:47:35 +10:00
Dave Airlie 9d85aba0e3 r600g: drop two unused | 0 that are actually in word4 anyways.
these were NOPs anyways.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-02-11 13:47:35 +10:00
Dave Airlie 0d851f6e9c r600g: handle 16/32 u/s norm formats properly
add support for the 32-bit types, also fixup the
export setting to handle types with channels > 11 bits properly

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-02-11 13:47:34 +10:00
Marek Olšák 9a1fe76a20 r300g: prevent NULL pointer dereference in r300_buffer_create
Should fix:
https://bugs.freedesktop.org/show_bug.cgi?id=33185
2011-02-11 03:18:05 +01:00
Kenneth Graunke 2e8726f5b1 mesa: Remove empty header file s_trispan.h. 2011-02-10 17:37:01 -08:00
Kenneth Graunke e0c1fc3283 glsl/Makefile: glcpp doesn't need libglsl.a.
Also, add a 'glcpp' target so you can type 'make glcpp' instead of
'make glcpp/glcpp'.
2011-02-10 17:37:01 -08:00
Marek Olšák 032b162ce8 r300g: plug a memory leak in winsys 2011-02-11 02:34:15 +01:00
Marek Olšák 862ebb411b r300g: remove unneeded code in winsys
We don't need the read/write flags.
2011-02-11 01:32:44 +01:00
Marek Olšák 98f344c504 r300g: fix warning 2011-02-11 01:18:53 +01:00
Marek Olšák 7da5105fb3 configure.ac: remove libdrm_radeon dependency for r300g and r600g 2011-02-11 01:16:06 +01:00
Marek Olšák 6ccab620a0 r300g: import the last bits of libdrm and cleanup the whole thing
Based on Dave's branch.

The majority of this commit is a cleanup, mainly renaming things.
There wasn't much code to import, just ioctl calls.

Also done:
- implemented unsynchronized bo_map (important optimization!)
- radeon_bo_is_referenced_by_cs is no longer a refcount hack
- dropped the libdrm_radeon dependency

I'm surprised that this has resulted in less code in the end.
2011-02-11 01:07:25 +01:00
Marek Olšák c0beaf6e6d st/mesa: allow rendering to sRGB textures if EXT_fb_srgb is unsupported
In this case, we always use the corresponding linear format in create_surface,
therefore we should check for linear format support as well.
2011-02-11 01:07:21 +01:00
Ian Romanick 4c1dc1c4d7 i915: Force lowering of all types of indirect array accesses in the FS
NOTE: This is a candidate for the 7.9 and 7.10 branches.
2011-02-10 13:26:49 -08:00
Ian Romanick 53b8b68843 i915: Calculate partial result to temp register first
Previously the SNE and SEQ instructions would calculate the partial
result to the destination register.  This would cause problems if the
destination register was also one of the source registers.

Fixes piglit tests glsl-fs-any, glsl-fs-struct-equal,
glsl-fs-struct-notequal, glsl-fs-vec4-operator-equal,
glsl-fs-vec4-operator-notequal.

NOTE: This is a candidate for the 7.9 and 7.10 branches.
2011-02-10 13:26:49 -08:00