Carl Worth [Thu, 13 Dec 2012 19:15:03 +0000 (11:15 -0800)]
meta: Allow meta operations to pause/resume an active occlusion query
This allows for avoiding the occlusion query erroneously accumulating results
during the meta operation. This functionality is made conditional on a new
MESA_META_OCCLUSION_QUERY bit so that meta-operations which should generate
fragments can continue to get the current behavior.
The implementation of glClear is specifically augmented to request the flag
since glClear is specified to not generate fragments.
This fixes the following es3conform tests:
occlusion_query_draw_occluded.test
occlusion_query_clear
occlusion_query_custom_framebuffer
occlusion_query_stencil_test
occlusion_query_discarded_fragments
As well as the following piglit test:
occlusion_query_meta_no_fragments
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Carl Worth [Thu, 13 Dec 2012 20:47:56 +0000 (12:47 -0800)]
queryobj: Add EverBound flag, making ISQuery() return false before BeginQuery()
This flag allows for the specified behavior that GenQueries reserves a name,
but does not associate an object with it until BeginQuery. We allocate the
object immediately with the new EverBound flag set to false, and then set the
flag to true at the time of BeginQuery.
This allows us to implement a conformant IsQuery function by checking the
state of the new EverBound flag.
This fixes the following es3conform tests:
occlusion_query_genqueries
occlusion_query_is_query_nonzero
and the following piglit test:
occlusion_query_lifetime
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Carl Worth [Mon, 17 Dec 2012 21:38:39 +0000 (13:38 -0800)]
Update comment to specify actual text being referenced from the specification.
The reference to "correct, see spec" was a bit too vague to be useful,
(particularly since the language being referenced here changes between OpenGL
3.1 and OpenGL 4.3).
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Brian Paul [Tue, 15 Jan 2013 20:00:09 +0000 (13:00 -0700)]
docs: minor updates to VMware guest driver docs
The DRM's --enable-vmwgfx-experimental-api flag isn't needed anymore.
Marek Olšák [Mon, 14 Jan 2013 00:38:51 +0000 (01:38 +0100)]
r300g: fix and cleanup flushing before clearing CMASK, ZMASK, and HIZ
Marek Olšák [Sat, 12 Jan 2013 02:29:40 +0000 (03:29 +0100)]
r300g: implement MSAA compression and fast MSAA color clear
These are optimizations which make MSAA a lot faster.
The MSAA work is complete with this commit. (except for enablement of AA
optimizations for RGBA16F, for which a patch is ready and waiting until
the kernel CS checker fix lands)
MSAA can't be made any faster as far as hw programming is concerned.
The catch is only one process and one colorbuffer can use the optimizations
at a time. There usually is only one MSAA colorbuffer, so it shouldn't be
an issue.
Also, there is a limit on the size of MSAA colorbuffer resolution in terms
of megapixels. If the limit is surpassed, the AA optimizations are disabled.
The limit is:
- 1 Mpix on low-end and some mid-level chipsets (1024x768 and 1280x720)
- 2 Mpix on some mid-level chipsets (1600x1200 and 1920x1080)
- 3 or 4 Mpix on high-end chipsets (2048x1536 or 2560x1600, respectively)
It corresponds to the number of raster pipes (= GB pipes) available, each pipe
can hold 1 Mpix of AA compression data.
If it's enabled, the driver prints to stdout:
radeon: Acquired access to AA optimizations.
Marek Olšák [Fri, 11 Jan 2013 15:45:54 +0000 (16:45 +0100)]
gallium/util: add a half float array to util_color
For convenient packing into half floats.
Tom Stellard [Mon, 14 Jan 2013 17:20:53 +0000 (17:20 +0000)]
Revert "targets/opencl: Link against libgallium.la instead of libgallium.a"
This reverts commit
4148a29ed83d1d85bff3d4e40e847128011c3f20.
This is a work-around for bug:
https://bugs.freedesktop.org/show_bug.cgi?id=59334
We really should be linking against libgallium.la instead of
libgallium.a, but until we can figure why linking against libgallium.la
causes runtime failures in clover we will continue to link against
libgallium.a
Acked-by: Andreas Boll <andreas.boll.dev@gmail.com>
Tested-by: Aaron Watry <awatry@gmail.com>
Marek Olšák [Mon, 14 Jan 2013 16:17:20 +0000 (17:17 +0100)]
st/mesa: use a generic varying to pass the clear color to the FS
The color varying may have reduced precision or be even clamped.
Reviewed-by: Brian Paul <brianp@vmware.com>
Marek Olšák [Mon, 14 Jan 2013 16:07:58 +0000 (17:07 +0100)]
gallium/util: fix glClear with MRT by making the FS write to all cbufs
Reviewed-by: Brian Paul <brianp@vmware.com>
Marek Olšák [Mon, 14 Jan 2013 07:40:18 +0000 (08:40 +0100)]
st/mesa: fix InternalFormat for Z24X8 window-system buffers
This probably doesn't fix anything, but it's good to be consistent.
Reviewed-by: Brian Paul <brianp@vmware.com>
Marek Olšák [Mon, 14 Jan 2013 07:20:42 +0000 (08:20 +0100)]
st/mesa: remove dead conditional in Clear
I think the conditional always evaluates to false.
If I understand the code in core Mesa correctly, depthBits or stencilBits
is 0 if the depth or stencil renderbuffer is NULL, respectively.
Reviewed-by: Brian Paul <brianp@vmware.com>
Marek Olšák [Mon, 14 Jan 2013 07:16:18 +0000 (08:16 +0100)]
st/mesa: simplify conditionals in Clear
just check depth and stencil separately, the outcome is the same
Reviewed-by: Brian Paul <brianp@vmware.com>
Marek Olšák [Mon, 14 Jan 2013 06:18:00 +0000 (07:18 +0100)]
st/mesa: fix glClear with different colormask for each colorbuffer
Reviewed-by: Brian Paul <brianp@vmware.com>
Marek Olšák [Mon, 14 Jan 2013 05:58:52 +0000 (06:58 +0100)]
gallium: remove PIPE_CAP_DEPTHSTENCIL_CLEAR_SEPARATE
Reviewed-by: Brian Paul <brianp@vmware.com>
Marek Olšák [Mon, 14 Jan 2013 05:57:28 +0000 (06:57 +0100)]
st/mesa: always assume separate depth and stencil clear is supported
All drivers implement it now.
Reviewed-by: Brian Paul <brianp@vmware.com>
Marek Olšák [Mon, 14 Jan 2013 05:45:50 +0000 (06:45 +0100)]
softpipe: implement separate depth-stencil clear
The CAP is going away.
Reviewed-by: Brian Paul <brianp@vmware.com>
Jon TURNEY [Sun, 13 Jan 2013 23:05:17 +0000 (23:05 +0000)]
libgl-xlib: softpipe and llvmpipe aren't mutually exclusive at link time
Since automake changes, softpipe and llvmpipe are mutually exclusive at link
time. This doesn't make much sense to me as we can choose between them at
run-time using GALLIUM_DRIVER.
Creating library file: .libs/libGL.dll.a
.libs/xlib.o: In function `sw_screen_create_named':
/jhbuild/checkout/mesa/mesa/src/gallium/targets/libgl-xlib/../../../../src/gallium/auxiliary/target-helpers/inline_sw_helper.h:35:
undefined reference to `_softpipe_create_screen'
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Brian Paul <brianp@vmware.com>
Jordan Justen [Sun, 30 Dec 2012 08:40:00 +0000 (00:40 -0800)]
pack: handle GL_RGB+GL_UNSIGNED_INT_2_10_10_10_REV case
For floats, if GL_RGB is the source, then alpha should be set to
1.0F.
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Jordan Justen [Fri, 28 Dec 2012 19:37:23 +0000 (11:37 -0800)]
glformats: allow GL_RGB+GL_UNSIGNED_INT_2_10_10_10_REV for GLES2/3
This format is allowed by the GL_EXT_texture_type_2_10_10_10_REV
extension.
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Jordan Justen [Sat, 12 Jan 2013 22:56:49 +0000 (14:56 -0800)]
copyteximage: Use Driver's AllocTextureImageBuffer instead of TexImage
Call Driver.AllocTextureImageBuffer rather than calling
Driver.TexImage with NULL data, format=GL_NONE and type=GL_NONE.
This avoids setting ctx->Unpack, which can lead to incorrectly
trying to upload data.
The GLES3 GTF program's packed_pixels_pbo test was triggering
an error for i965 with the previous code.
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Jordan Justen [Fri, 28 Dec 2012 01:36:10 +0000 (17:36 -0800)]
copyteximage: update signed vs. unsigned format matching
Fixes issues with gles3-gtf
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Jordan Justen [Fri, 28 Dec 2012 18:55:33 +0000 (10:55 -0800)]
framebuffer: add _mesa_get_read_renderbuffer
This returns the current read renderbuffer for the specified
format type.
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Matt Turner [Thu, 6 Dec 2012 22:51:29 +0000 (14:51 -0800)]
teximage: use _mesa_es3_error_check_format_and_type for GLES3
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Matt Turner [Thu, 6 Dec 2012 22:51:29 +0000 (14:51 -0800)]
glformats: add _mesa_es3_error_check_format_and_type
This function checks for ES3 compatible
format/type/internalFormat/dimension combinations.
[jordan.l.justen@intel.com: additional tweaks for gles3-gtf]
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Jordan Justen [Thu, 27 Dec 2012 20:41:10 +0000 (12:41 -0800)]
fbobject: don't allow LUMINANCE/INTENSITY/ALPHA fbo on ES/Core
v2:
* Only allow on GL Legacy contexts
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Jordan Justen [Sat, 12 Jan 2013 22:19:30 +0000 (14:19 -0800)]
fbobject: add VERBOSE=api message for renderbuffer storage
Add API debug trace message for:
* glRenderbufferStorage
* glRenderbufferStorageMultisample
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Jordan Justen [Sun, 13 Jan 2013 03:21:54 +0000 (19:21 -0800)]
fbobject: add VERBOSE=api message for check framebuffer status
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Brian Paul [Tue, 15 Jan 2013 00:33:05 +0000 (17:33 -0700)]
util: add new primitive types to pipe_prim_names[] array
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Brian Paul [Mon, 14 Jan 2013 22:18:13 +0000 (15:18 -0700)]
st/mesa: add some simple buffer/draw debug code
Reviewed-by: José Fonseca <jfonseca@vmware.com>
Brian Paul [Mon, 14 Jan 2013 17:17:48 +0000 (09:17 -0800)]
libgl-xlib: link with -lrt
Fixes a runtime error:
glxgears: symbol lookup error: /home/brian/mesa/lib/gallium/libGL.so.1: undefined symbol: clock_gettime
v2: use $(CLOCK_LIB) and $(PTHREAD_LIBS) per Andreas Boll.
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Andreas Boll <andreas.boll.dev@gmail.com>
Carl Worth [Fri, 11 Jan 2013 15:15:18 +0000 (07:15 -0800)]
i965: Avoid blending with destination alpha when RB format has no alpha bits
The hardware does not support a render target without an alpha channel.
So when the user creates a render buffer with no alpha channel, there actually
is storage available for alpha internally. It requires special care to
avoid these unwanted alpha bits from causing any problems.
Specifically, when blending, and when the blend factors would read the
destination alpha values, this commit coerces the blend factors to instead be
either 0 or 1 as appropriate.
A similar fix was made for pre-gen6 hardware in commit
eadd9b8e and this
commit shares the fixup function written by Ian then.
This commit the following es3conform test:
rgb8_rgba8_rgb
As well as the following piglit (sub) tests:
EXT_framebuffer_object/fbo-blending-formats/3
EXT_framebuffer_object/fbo-blending-formats/GL_RGB
EXT_framebuffer_object/fbo-blending-formats/GL_RGB8
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Kristian Høgsberg [Fri, 14 Dec 2012 04:32:14 +0000 (23:32 -0500)]
egl/wayland: Implement EGL_EXT_buffer_age
Reviewed-by: Ander Conselvan de Oliveira <conselvan2@gmail.com>
Kristian Høgsberg [Fri, 14 Dec 2012 04:30:45 +0000 (23:30 -0500)]
egl/wayland: Pull color buffers from dri2_surf->color_buffers pool
We used to keep the color buffers in the dri_buffers array and
swap __DRI_BUFFER_BACK_LEFT and __DRI_BUFFER_FRONT_LEFT around there
and swap third_buffer in in case we needed to triple buffer. That
gets a little fidgety with all the swaps, so lets use the
color_buffers pool like the gbm platform does. We track the color buffers,
their corresponding wl_buffer and locked status here and just plug
a free one into dri2_surf->buffers when we need to.
This is a nice clean-up in itself, but it also sets us up to track
buffer age in the color_buffers structs.
Reviewed-by: Ander Conselvan de Oliveira <conselvan2@gmail.com>
Johannes Obermayr [Sat, 12 Jan 2013 21:13:47 +0000 (22:13 +0100)]
gallium/svga: Make sure -std=gnu99 is set.
This is a work-around until configure.ac stops touching CFLAGS.
Reviewed-by: Matt Turner <mattst88@gmail.com>
Damien Lespiau [Mon, 14 Jan 2013 13:54:57 +0000 (13:54 +0000)]
build: Fix the documented default value of --with-gallium-drivers
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Marek Olšák [Mon, 14 Jan 2013 04:51:05 +0000 (05:51 +0100)]
r300g: set a dummy vertex buffer in context_create
so that the driver doesn't crash if an app doesn't set any vertex buffers.
Marek Olšák [Sun, 13 Jan 2013 23:27:28 +0000 (00:27 +0100)]
r300g: fix MSAA resolve to an untiled texture
RB3D_DEBUG_CTL doesn't help, so I resolve to a tiled temporary texture and
then blitting it to the destination one, which we also do in other situations.
Marek Olšák [Sat, 12 Jan 2013 03:44:37 +0000 (04:44 +0100)]
r300g: advertise MSAA support for the RGB10_A2 format on r500
It seems to be working just fine.
Marek Olšák [Sat, 12 Jan 2013 12:59:48 +0000 (13:59 +0100)]
r300g: allow separate depth and stencil clear
The handling of the CAP is broken in st/mesa anyway. Let's just kill it.
This commit pretty much enables fast Z clear for FBOs with Z24S8.
The driver falls back to clearing with a quad if the fast clear cannot be
used. It can still do fast color clear, for example.
Marek Olšák [Sat, 12 Jan 2013 02:19:03 +0000 (03:19 +0100)]
r300g: if both Z and stencil are present, they must be fast-cleared together
Marek Olšák [Fri, 13 May 2011 00:26:08 +0000 (02:26 +0200)]
r300g: allow HiZ with a 16-bit zbuffer
Marek Olšák [Fri, 11 Jan 2013 16:10:36 +0000 (17:10 +0100)]
r300g: random hyperz cleanups
Marek Olšák [Sun, 13 Jan 2013 21:58:08 +0000 (22:58 +0100)]
r300g: kill the X.Org state tracker target
This won't ever be made default and we don't need it anyway.
We should also consider doing this for other drivers.
Johannes Obermayr [Sat, 12 Jan 2013 14:34:22 +0000 (15:34 +0100)]
xmlpool: Fix out-of-tree builds.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Johannes Obermayr [Fri, 28 Dec 2012 06:04:26 +0000 (07:04 +0100)]
gtest: Build it only for 'make check'.
Reviewed-by: Andreas Boll <andreas.boll.dev@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Johannes Obermayr [Sat, 29 Dec 2012 00:52:11 +0000 (01:52 +0100)]
tests: AM_CPPFLAGS must include $(top_srcdir) instead of $(top_builddir).
Reviewed-by: Andreas Boll <andreas.boll.dev@gmail.com>
Adam Jackson [Fri, 4 Jan 2013 19:26:20 +0000 (14:26 -0500)]
r200: Fix probable thinko in r200EmitArrays
Effectively this path would always assert. Move the break statement to
the (probable) intended place.
Note: This is a candidate for the stable branches.
Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Nathan Schulte [Sun, 13 Jan 2013 01:42:04 +0000 (19:42 -0600)]
target/dri-swrast: fix for nonstandard LLVM prefix
Include LLVM_LDFLAGS when building with LLVM. Fixes the following build
errors:
CXXLD swrast_dri.la
/usr/bin/ld: cannot find -lLLVMR600CodeGen
/usr/bin/ld: cannot find -lLLVMR600Desc
/usr/bin/ld: cannot find -lLLVMR600Info
/usr/bin/ld: cannot find -lLLVMR600AsmPrinter
Reviewed-by: Andreas Boll <andreas.boll.dev@gmail.com>
Andreas Boll [Sat, 12 Jan 2013 20:13:23 +0000 (21:13 +0100)]
targets/dri-r600: Force c++ linker in all cases
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=59282
Andreas Boll [Tue, 20 Nov 2012 14:45:56 +0000 (15:45 +0100)]
glapi/gen: remove an obsolete comment from Makefile.am
Glapi gets generated at build time.
See commit:
0ce0f7c0c8fa9902678af7f3ecad2541be5808d2
mesa: Remove the generated glapi from source control, and just build it.
Matt Turner [Thu, 6 Sep 2012 04:08:39 +0000 (21:08 -0700)]
Remove hacks for static Makefiles
v2: Andreas Boll <andreas.boll.dev@gmail.com>
- don't remove compatibility with scripts for the old build system
v3: Andreas Boll <andreas.boll.dev@gmail.com>
- remove more obsolete hacks
v4: Andreas Boll <andreas.boll.dev@gmail.com>
- add a previously removed TOP variable to fix vgapi build
Kenneth Graunke [Wed, 9 Jan 2013 01:00:13 +0000 (17:00 -0800)]
i965: Move program_id to intel_screen instead of brw_context.
According to bug #54524, I regressed oglconform's multicontext test
when I reenabled the fragment shader precompile.
However, these test cases only passed by miraculous coincedence. We
assign each fragment program a unique ID (brw_fragment_program::id which
becomes brw_wm_prog_key::program_string_id) which we obtain by storing a
per-context counter.
The test case uses GLX context sharing to access the same fragment
program from two different contexts. This means that we share a program
cache. Before the precompile, if both contexts happened to use the same
shaders in the same order, we'd obtain the same program_string_ids (by
virtue of doing the same computation twice). However, the more likely
scenario is that they completely disagree on program_string_id.
This meant that we'd have two completely different fragment shaders in
the cache with the same ID, tricking us to think they were the same
(aside from NOS), so we'd render using the wrong program.
This patch implements a simple fix suggested by Eric: it moves the
global counter out of brw_context and into intel_screen, which is shared
across all contexts. A mutex protects it from concurrent access.
This is also the first direct usage of pthreads in the i965 driver.
Fixes 10 subcases of oglconform's multicontext test.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=54524
Reviewed-by: Eric Anholt <eric@anholt.net>
Kenneth Graunke [Tue, 8 Jan 2013 20:46:05 +0000 (12:46 -0800)]
i965: Fix build error with clang.
Technically, variable sized arrays are a required feature of C99,
redacted to be optional in C11, and not actually part of C++ whatsoever.
Gcc allows using them in C++ unless you specify -pedantic, and Clang
appears to allow them for simple/POD types.
exec_list is arguably POD, since it doesn't have virtual methods, but I
can see why Clang would be like "meh, it's a C++ struct, say no", seeing as
it's meant to support C99.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=58970
Reviewed-by: Matt Turner <mattst88@gmail.com>
Kenneth Graunke [Fri, 11 Jan 2013 22:19:56 +0000 (14:19 -0800)]
i965/fs: Don't mix integer/float immediates in i2b handling.
The simulator gets very angry about our i2b code:
cmp.ne(16) g3<1>D g2<0,1,0>D 0F
We can't mix integer DWord and float types. The only reason to use 0F
here was to share code with f2b. Split it and use 0D instead.
While we don't believe anything bad will actually happen because of
this, it's nice to fix the warnings and easy enough to do.
Reviewed-by: Paul Berry <stereotype441@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Kenneth Graunke [Fri, 11 Jan 2013 22:08:05 +0000 (14:08 -0800)]
i965: Add an INTEL_DEBUG=no16 option.
Often when debugging, I don't want to see SIMD16 shaders. It makes
INTEL_DEBUG=vs/fs output much easier to read, especially when a program
dumps many shaders. Plus, I also want to verify that SIMD8 works before
even considering SIMD16.
v2: Fix the likeliness check (caught by Chris and Eric).
Reviewed-by: Eric Anholt <eric@anholt.net>
Alexandre Demers [Sat, 12 Jan 2013 06:21:44 +0000 (01:21 -0500)]
configure.ac: Fixing common dri dependency when using dri state tracker
Fixes a regression caused by
b587a7595e7aae0809a8e7392e89c39df0c955b1
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=59261
Reviewed-by: Andreas Boll <andreas.boll.dev@gmail.com>
Fredrik Höglund [Sat, 12 Jan 2013 11:56:31 +0000 (12:56 +0100)]
st/mesa: set ctx->Const.UniformBufferOffsetAlignment
Reviewed-by: Marek Olšák <maraeo@gmail.com>
José Fonseca [Sat, 12 Jan 2013 18:58:31 +0000 (10:58 -0800)]
scons: Update for xmlpool/options.h generation.
Johannes Obermayr [Sat, 12 Jan 2013 11:55:08 +0000 (12:55 +0100)]
nv50/nvc0: Build codegen in nv50.
This is required to make libnv50 independent of libnvc0.
Pekka Vuorela [Sat, 12 Jan 2013 13:46:00 +0000 (15:46 +0200)]
winsys/sw/wayland: Fix build to properly use wayland cflags
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=59281
Reviewed-by: Andreas Boll <andreas.boll.dev@gmail.com>
Jordan Justen [Thu, 27 Dec 2012 20:34:03 +0000 (12:34 -0800)]
texformat: use MESA_FORMAT_ARGB2101010 with GL_UNSIGNED_INT_2_10_10_10_REV
Choose MESA_FORMAT_ARGB2101010 when storing
GL_RGBA + GL_UNSIGNED_INT_2_10_10_10_REV or
GL_RGB + GL_UNSIGNED_INT_2_10_10_10_REV.
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Jordan Justen [Thu, 3 Jan 2013 06:32:47 +0000 (22:32 -0800)]
texstore argb2101010: merge GL_RGBA and GL_RGB cases
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Jordan Justen [Fri, 28 Dec 2012 19:08:20 +0000 (11:08 -0800)]
glformats: support _mesa_bytes_per_pixel for 2101010+GL_RGB
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Jordan Justen [Fri, 28 Dec 2012 00:45:13 +0000 (16:45 -0800)]
glformats: add _mesa_base_format_component_count
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Jordan Justen [Thu, 27 Dec 2012 21:24:57 +0000 (13:24 -0800)]
glformats: add functions to detect signed/unsigned integer types
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Jordan Justen [Thu, 27 Dec 2012 21:21:01 +0000 (13:21 -0800)]
unpack: support unpacking MESA_FORMAT_ARGB2101010
Note: This is a candidate for the stable branches.
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Ian Romanick [Sun, 2 Dec 2012 22:20:04 +0000 (14:20 -0800)]
mesa: Add extension tracking for {ARB,OES}_get_program_binary
The ARB_get_program_binary spec says "OpenGL 3.0 is required." The
nearly identical OES_get_program_binary extension is available for
OpenGL ES 2.0, so I don't see how / why OpenGL 3.0 is a requirement for
the ARB version. Let's just enable whenever GL_ARB_shader_objects is
available.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Ian Romanick [Wed, 5 Dec 2012 02:29:24 +0000 (18:29 -0800)]
mesa: Add GetProgramiv support for GL_PROGRAM_BINARY_LENGTH
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Ian Romanick [Mon, 3 Dec 2012 18:34:19 +0000 (10:34 -0800)]
mesa: Add Get support for PROGRAM_BINARY_FORMATS and NUM_PROGRAM_BINARY_FORMATS
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Ian Romanick [Mon, 3 Dec 2012 15:47:36 +0000 (07:47 -0800)]
mesa: Add tracking for GL_PROGRAM_BINARY_RETRIEVABLE_HINT state
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Ian Romanick [Sun, 2 Dec 2012 22:24:31 +0000 (14:24 -0800)]
mesa: Emit errors for geometry shader enums when ARB_gs4 is not supported
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Ian Romanick [Sun, 2 Dec 2012 22:19:00 +0000 (14:19 -0800)]
glapi: Emit dispatch for {ARB,OES}_get_program_binary
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Ian Romanick [Mon, 3 Dec 2012 18:30:30 +0000 (10:30 -0800)]
glapi: Remove spurious space from end of extension name
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Ian Romanick [Sun, 2 Dec 2012 03:14:21 +0000 (19:14 -0800)]
mesa: Add stub implementations of glGetProgramBinary and glProgramBinary
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Ian Romanick [Sun, 2 Dec 2012 03:11:55 +0000 (19:11 -0800)]
mesa: Fix the naming of _mesa_ProgramParameteriARB
After recent changes in the XML, the dispatch generators will expect
this function to be named _mesa_ProgramParameteri.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Ian Romanick [Mon, 3 Dec 2012 18:32:29 +0000 (10:32 -0800)]
glapi: Reorder and clean up some of the includes and comments
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Ian Romanick [Tue, 4 Dec 2012 23:09:39 +0000 (15:09 -0800)]
mesa: Fix GL_SHADER_BINARY_FORMATS query
There were two bugs here. First, this and several other queries were
not available in a desktop GL context with GL_ARB_ES2_compatibility.
Second, GL_NUM_SHADER_BINARY_FORMATS returns zero, but
GL_SHADER_BINARY_FORMATS writes one element of data to the buffer. If
NUM is zero, no data should be written.
Fixes piglit test 'arb_get_program_binary-overrun shader'.
NOTE: This is a candidate for stable release branches.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Dave Airlie [Sat, 12 Jan 2013 00:19:18 +0000 (00:19 +0000)]
docs/GL3.txt: update GL3 status for r600g.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Dave Airlie [Fri, 11 Jan 2013 23:19:11 +0000 (23:19 +0000)]
r600g: fix warnings for htile va
This fixes a warning about mismatched types.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Dave Airlie [Sun, 16 Dec 2012 10:31:32 +0000 (10:31 +0000)]
r600g: texture buffer object + glsl 1.40 enable support (v2)
This adds TBO support to r600g, and with GLSL 1.40 enabled,
we now get 3.1 core profiles advertised for r600g.
The r600/700 implementation is a bit different from the evergreen one,
as r6/7 hw lacks vertex fetch swizzles. So we implement it by passing 5
constants per sampler to the shader, the shader uses the first 4 as masks
for each component and the 5th as the alpha value to OR in.
Now TXQ is also broken so we have to pass a constant for the buffer size,
on evergreen we just pass this, on r6/7 we pass it as the 6th element
in the const info buffer.
v1.1: drop return as DDX doesn't use a texture type
v2: add r600/700 support.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Dave Airlie [Sun, 16 Dec 2012 10:26:02 +0000 (10:26 +0000)]
r600g: uniform buffer object support
This adds 12 more constant buffers for use as UBOs,
along with adding relative constant fetching for 2D indices.
This with GLSL 1.40 enabled passes all the same tests as softpipe
on my evergreen system.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Dave Airlie [Fri, 11 Jan 2013 03:30:30 +0000 (13:30 +1000)]
r600: always export a position from vertex shader
This fixes piglit glsl-1.40-tf-no-position from gpu hanging on my rv635
at least.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Carl Worth [Wed, 5 Dec 2012 21:36:31 +0000 (13:36 -0800)]
glcpp: Add tests for line continuation
First we test that line continuations are honored within a comment, (as
recently changed in glcpp), then we test that line continuations can be
disabled via an option within the context. This is tested via the new support
for a test-specific command-line option passed to glcpp.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Carl Worth [Thu, 29 Nov 2012 22:49:46 +0000 (14:49 -0800)]
glcpp: Rewrite line-continuation support to act globally.
Previously, we were only supporting line-continuation backslash characters
within lines of pre-processor directives, (as per the specification). With
OpenGL 4.2 and GLES3, line continuations are now supported anywhere within a
shader.
While changing this, also fix a bug where the preprocessor was ignoring
line continuation characters when a line ended in multiple backslash
characters.
The new code is also more efficient than the old. Previously, we would
perform a ralloc copy at each newline. We now perform copies only at each
occurrence of a line-continuation.
This commit fixes the line-continuation.vert test in piglit.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Carl Worth [Wed, 5 Dec 2012 21:15:48 +0000 (13:15 -0800)]
glcpp: Add --disable-line-continuations argument to standalone glcpp
This will allow testing of disabled line-continuation on a case-by-case basis,
(with the option communicated to the preprocessor via the GL context).
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Carl Worth [Wed, 5 Dec 2012 21:32:32 +0000 (13:32 -0800)]
glcpp: Allow test-specific arguments for standalone glcpp tests
This will allow the test exercising disabled line continuations to arrange
for the --disable-line-continuations argument to be passed to the standalone
glcpp.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Carl Worth [Wed, 5 Dec 2012 21:25:48 +0000 (13:25 -0800)]
glcpp: Honor the GL context's DisableGLSLLineContinuations option
And simply don't call into the function that removes line continuations.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Carl Worth [Wed, 5 Dec 2012 20:56:16 +0000 (12:56 -0800)]
glcpp: Accept pointer to GL context rather than just the API version
As the preprocessor becomes more sophisticated and gains more optional
behavior, it's easiest to just pass the GL context pointer to it so that
it can examine any fields there that it needs to (such as API version,
or the state of any driconf options, etc.).
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Carl Worth [Thu, 6 Dec 2012 00:36:06 +0000 (16:36 -0800)]
drirc: Add quirk to disable GLSL line continuations for Savage2
This application is known to contain shaders that:
1. Have a stray backslash as the last line of comment lines
2. Have a declaration immediately following that line
Hence, interpreting that backslash as a line continuation causes the
declaration to be hidden and the shader fails to compile. Fortunately, the
shaders also:
3. Do not have any other intentional line-continuation characters
So disabling line continuations entirely for the application fixes this
problem without causing any other breakage.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Carl Worth [Wed, 5 Dec 2012 00:29:00 +0000 (16:29 -0800)]
driconf: Add a new option: disable_glsl_line_continuations
This is to enable a quirk for Savage2 which includes a shader with a stray '\'
at the end of a comment line. Interpreting that backslash as a line
continuation will break the compilation of the shader, so we need a way to
disable this.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Carl Worth [Sat, 8 Dec 2012 03:18:28 +0000 (19:18 -0800)]
driconf: Add proper dependency for compiling .mo files from .po files.
Previously this was happening unconditionally, leading to some excessive
rebuilding/relinking during builds.
Note that the .po files are not automatically updated due to changes to the
t_options.h file. Instead, translators should continue to use "make po"
manually. This is because after new strings are merged into the existing .po
file, manual work is still required by translators to ensure that the
translations are correct.
Carl Worth [Mon, 3 Dec 2012 23:43:19 +0000 (15:43 -0800)]
driconf: Add translation-generation to build system, don't track generated files
Previously, the xmlpool directory had a lone Makefile to assist poeple in
manually invoking a deep make in order to update the translations in
options.h. We can observe that this wasn't happening in fact, (new
translations had been added to de.po without being generated into options.h,
and new options had been manually added directly to options.h rather than to
t_options.h).
Prevent both of these problems from occurring in the future by automatically
generating options.h as part of the standard build of mesa.
For this, the generated options.h is now removed from version control, (along
with Makefile in favor of Makefile.am).
[chadv: Port the Autotools changes to Android.]
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Carl Worth [Mon, 3 Dec 2012 23:43:20 +0000 (15:43 -0800)]
driconf: Fix German translations by removing a couple of bogus backslashes
As can be seen, many other translation strings already include a single
apostrophe just fine without any escaping. This strangely-escaped apostrophe
was causing a build failure ("invalid escape sequence") resulting in no "de"
translations in the final options.h file.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Chad Versace [Thu, 6 Dec 2012 04:47:52 +0000 (20:47 -0800)]
driconf: Fix gen_xmlpool.py script to allow running from any directory
The gen_xmlpool.py script would work correctly only when executed from the
directory that contained the script. This shortcoming was due to some
hard-coded paths in the script.
In order to easily invoke the script from the Android build system, we
must be able to execute the script from an arbitrary directory. To enable
that, this patch replaces the two hard-coded paths with new command line
arguments.
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
Reviewed-by: Carl Worth <cworth@cworth.org>
Carl Worth [Mon, 3 Dec 2012 23:43:17 +0000 (15:43 -0800)]
driconf: Add some translations which have been available, but were not compiled
These translations have existed in the de.po file, but were not in the
generated options.h file. This was fixed by simply running "make options.h".
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Carl Worth [Mon, 3 Dec 2012 23:43:16 +0000 (15:43 -0800)]
driconf: Add option definitions to source file, not generated target
For the last two most-recently-added driconf options, their definition was
manually added to options.h, a file which is intended to be automatically
generated, (as part of support for translated driconf option
descriptions). This means that these options would be eliminated if the
generation step were performed again.
Fix this by correctly adding the definitions of these options to t_options.h,
(the file used as input to the generator), and not the options.h file, which
is generated.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Tom Stellard [Fri, 11 Jan 2013 17:28:35 +0000 (17:28 +0000)]
targets/opencl: Link against libgallium.la instead of libgallium.a
Tom Stellard [Fri, 11 Jan 2013 17:27:45 +0000 (17:27 +0000)]
drivers/radeon: Don't link against libgallium.la
This fixes several duplicate symbol errors.
libllvmradeon is a simple helper library. If it requires symbols in
other libraries, this should be taken care of by the gallium target that
uses it (e.g. libr600.la)
Matt Turner [Fri, 30 Nov 2012 19:10:20 +0000 (11:10 -0800)]
mesa: Use _mesa_lookup_enum_by_nr in tex*_error_check
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>