Commit Graph

60172 Commits

Author SHA1 Message Date
Roland Scheidegger 27d47bd42f gallivm: fix pointer type for stmxcsr/ldmxcsr
The argument is a i8 pointer not a i32 pointer (even though the value actually
stored/loaded IS i32). Older llvm versions didn't care but 3.2 and newer do
leading to crashes.

Reviewed-by: Zack Rusin <zackr@vmware.com>
2013-12-14 17:11:03 +01:00
Roland Scheidegger 7c027666da llvmpipe: get rid of barycentric calculation of a0
Didn't really work as well as hoped (in particular it was not generally
more accurate), will solve this differently.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2013-12-14 17:11:03 +01:00
Roland Scheidegger bfcf1ba1c4 llvmpipe: (trivial) get rid of triangle subdivision code
This code was always problematic, and with 64bit rasterization we no longer
need it at all.

Reviewed-by: Zack Rusin <zackr@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2013-12-14 17:11:03 +01:00
Kenneth Graunke 35f0aafaa4 i965: Treat Haswell as 75 in the surface format table.
Much like we do for G45.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
2013-12-13 21:14:19 -08:00
Chris Forbes 8bb666cee3 mesa: fix texture view use of _mesa_get_tex_image()
The target parameter to _mesa_get_tex_image() is a target enum, not an index.
When we're setting up faces for a cubemap, it should be
CUBE_MAP_POSITIVE_X .. CUBE_MAP_NEGATIVE_Z; for all other targets it
should be the same as the texobj's target.

Fixes broken cubemaps [had only +X face but claimed to have all] produced by
glTextureView, which then caused various crashes in the driver when we
tried to use them.

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Brian Paul <brianp@vmware.com>
2013-12-14 16:32:41 +13:00
Chris Forbes 544869377d i965/fs: add support for gl_SampleMaskIn[]
v2: - add assert so we don't run into trouble on Gen6.
    - adjust for Tapani's rearrangement of ir_variable

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2013-12-14 16:28:11 +13:00
Chris Forbes 1d71f38924 glsl: add gl_SampleMaskIn[] builtin
Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2013-12-14 16:24:22 +13:00
Chris Forbes c1e1dd2298 mesa: add SYSTEM_VALUE_SAMPLE_MASK_IN
Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2013-12-14 16:24:21 +13:00
Brian Paul 7d91390359 mesa: document _mesa_texstore() return value 2013-12-13 17:02:43 -07:00
Brian Paul 19fa540219 st/mesa: only set up sampler compare mode for depth textures
The GL_ARB_shadow spec says the shadow compare mode should have no
effect when sampling a color texture.  As it was, it was up to
drivers to check for that (softpipe, llvmpipe, svga and probably
the rest don't do that).  Note: it looks like DX10 allows shadow
compare with some non-depth formats, so this case really should be
handled in the state tracker.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2013-12-13 16:06:07 -07:00
Brian Paul 31b0e7d024 st/mesa: add const qualifiers in sampler validation code
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2013-12-13 16:06:06 -07:00
Brian Paul 9f9860b004 st/mesa: add const qualifier to st_translate_color()
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2013-12-13 16:06:06 -07:00
Brian Paul eff11b5a4a st/mesa: simplify integer texture check
Just use the gl_texture_object::_IsInteger field instead of
computing it from scratch.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2013-12-13 16:06:06 -07:00
Brian Paul b5cc710473 mesa: update glext.h to version 20131212
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
2013-12-13 16:04:23 -07:00
Brian Paul d6a8421f3b svga: don't emit extraneous fs shadow code
Depending on the depth texture format, we may or may not have to
emit explicit fs code to do the shadow comparison.  Before, we
were emitting it more often than needed.

v2: check the actual texture format rather than the screen->depth.z16
field.  The screen->depth.z16, x8z24, s8z24 fields may not all be set
to a consistent set of depth formats.

Reviewed-by: José Fonseca <jfonseca@vmware.com>
2013-12-13 12:01:28 -08:00
Brian Paul e735dfd35b mesa: s/uint/GLuint/ to fix MSVC error 2013-12-13 12:51:10 -07:00
Courtney Goeltzenleuchter 375f660e27 mesa: Update TexStorage to support ARB_texture_view
Call TextureView helper function to set TextureView state
appropriately for the TexStorage calls.

Misc updates from review feedback.

Signed-off-by: Courtney Goeltzenleuchter <courtney@LunarG.com>

Reviewed-by: Brian Paul <brianp@vmware.com>
2013-12-13 12:31:54 -07:00
Courtney Goeltzenleuchter 1db4cb841b mesa: add texture_view helper function for TexStorage
Add helper function to set texture_view state from TexStorage calls.
Include review feedback.

Signed-off-by: Courtney Goeltzenleuchter <courtney@LunarG.com>

Reviewed-by: Brian Paul <brianp@vmware.com>
2013-12-13 12:31:54 -07:00
Courtney Goeltzenleuchter f07ca59839 mesa: Fill out ARB_texture_view entry points
Add Mesa TextureView logic.
Incorporate feedback on ARB_texture_view:
- Add S3TC VIEW_CLASSes to compatibility table
- Use existing _mesa_get_tex_image
- Clean up error strings
- Use bool instead of GLboolean for internal functions
- Split compound level & layer test into individual tests
- eliminate helper macro for VIEW_CLASS table
- do not call driver if ptr null.

Signed-off-by: Courtney Goeltzenleuchter <courtney@LunarG.com>

Reviewed-by: Brian Paul <brianp@vmware.com>
2013-12-13 12:31:54 -07:00
Courtney Goeltzenleuchter bb5947de99 mesa: consolidate multiple next_mipmap_level_size
Refactor to make next_mipmap_level_size defined in mipmap.c a
_mesa_ helper function that can then be used by texture_view

Signed-off-by: Courtney Goeltzenleuchter <courtney@LunarG.com>

Reviewed-by: Brian Paul <brianp@vmware.com>
2013-12-13 12:31:54 -07:00
Courtney Goeltzenleuchter 320ec1deac mesa: Add driver entry point for ARB_texture_view
Signed-off-by: Courtney Goeltzenleuchter <courtney@LunarG.com>

Reviewed-by: Brian Paul <brianp@vmware.com>
2013-12-13 12:31:54 -07:00
Courtney Goeltzenleuchter f1563e6392 mesa: ARB_texture_view get parameters
Add support for ARB_texture_view get parameters:
GL_TEXTURE_VIEW_MIN_LEVEL
GL_TEXTURE_VIEW_NUM_LEVELS
GL_TEXTURE_VIEW_MIN_LAYER
GL_TEXTURE_VIEW_NUM_LAYERS

Incorporate feedback regarding when to allow query of
GL_TEXTURE_IMMUTABLE_LEVELS.

Signed-off-by: Courtney Goeltzenleuchter <courtney@LunarG.com>

Reviewed-by: Brian Paul <brianp@vmware.com>
2013-12-13 12:31:54 -07:00
Courtney Goeltzenleuchter 668f3614ca mesa: update texture object for ARB_texture_view
Add state needed by glTextureView to the gl_texture_object.

Signed-off-by: Courtney Goeltzenleuchter <courtney@LunarG.com>

Reviewed-by: Brian Paul <brianp@vmware.com>
2013-12-13 12:31:53 -07:00
Courtney Goeltzenleuchter 2e8493af51 mesa: Tracking for ARB_texture_view extension
Signed-off-by: Courtney Goeltzenleuchter <courtney@LunarG.com>

Reviewed-by: Brian Paul <brianp@vmware.com>
2013-12-13 12:31:53 -07:00
Courtney Goeltzenleuchter d77d2af20a mesa: Add API definitions for ARB_texture_view
Stub in glTextureView API call to go with the
glTextureView API xml definition.
Includes dispatch test for glTextureView

Signed-off-by: Courtney Goeltzenleuchter <courtney@LunarG.com>

Reviewed-by: Brian Paul <brianp@vmware.com>
2013-12-13 12:31:53 -07:00
Anuj Phogat 7a73c6acb0 mesa: Fix error code generation in glBeginConditionalRender()
This patch changes the error condition to satisfy below statement
from OpenGL 4.3 core specification:
"An INVALID_OPERATION error is generated if id is the name of a query
object with a target other SAMPLES_PASSED, ANY_SAMPLES_PASSED, or
ANY_SAMPLES_PASSED_CONSERVATIVE, or if id is the name of a query
currently in progress."

Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2013-12-13 11:13:25 -08:00
Carl Worth 93e399f641 Makefile: Add bin/test-driver to EXTRA_FILES
I'm not sure why this change is necessary. When I've built previous tar files
(such as 9.2.4) with the "make tarballs" target, they include the
bin/test-driver file. But at my first attempt to build the tar files for the
10.0.1 release this file was not being included and the build failed.

(cherry picked from commit d573899b932435b0b37a7a33ebcbdc3c8cedd3e1)

[The cherry pick is because I original applied this on the 10.0 branch while
working on the 10.0.1 release. But if we don't have this on master as well,
this issue will trip us up again the next time we make a new major-release
branch off of master.]
2013-12-13 11:12:23 -08:00
Kristian Høgsberg 38366c0c6e dri_util: Don't assume __DRIcontext->driverPrivate is a gl_context
The driverPrivate pointer is opaque to the driver and we can't assume
it's a struct gl_context in dri_util.c.  Instead provide a helper function
to set the struct gl_context flags from the incoming DRI context flags.

v2 (idr): Modify the other classic drivers to also use
driContextSetFlags.  I ran all the piglit GLX_ARB_create_context tests
with i965 and classic swrast without regressions.

Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> [v1]
Reviewed-by: Eric Anholt <eric@anholt.net>
Tested-by: Ilia Mirkin <imirkin@alum.mit.edu> [v1 on Gallium nouveau]
Cc: "10.0" <mesa-stable@lists.freedesktop.org>
2013-12-13 08:19:50 -08:00
Carl Worth d6c8365795 docs: Update note regarding nominating patches for the stable branch.
This brings the documentation up to date with the current practice of using
the CC syntax for patch nomination.
2013-12-12 23:10:53 -08:00
Carl Worth 16c2919972 docs: Fix typo
Simply replacing Extentions with the correct Extensions.
2013-12-12 23:02:54 -08:00
Carl Worth 66d9cbfe6d docs: Import 9.2.5 release notes, add news item. 2013-12-12 22:58:40 -08:00
Carl Worth 79c60999dc docs: Import 10.0.1 release notes, add news item. 2013-12-12 22:21:08 -08:00
Dave Airlie ba00f2f6f5 swrast* (gallium, classic): add MESA_copy_sub_buffer support (v3)
This patches add MESA_copy_sub_buffer support to the dri sw loader and
then to gallium state tracker, llvmpipe, softpipe and other bits.

It reuses the dri1 driver extension interface, and it updates the swrast
loader interface for a new putimage which can take a stride.

I've tested this with gnome-shell with a cogl hacked to reenable sub copies
for llvmpipe and the one piglit test.

I could probably split this patch up as well.

v2: pass a pipe_box, to reduce the entrypoints, as per Jose's review,
add to p_screen doc comments.

v3: finish off winsys interfaces, add swrast classic support as well.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>

swrast: add support for copy_sub_buffer
2013-12-13 14:37:01 +10:00
Brian Paul 40070e72d4 util: fix compile breakage
D'oh!
2013-12-12 11:11:32 -07:00
Brian Paul ba67d72c64 util: move variable declaration out of for-loop
To fix MSVC build.
2013-12-12 11:09:02 -07:00
Marek Olšák be909274aa gallium/util: implement new color clear API in u_blitter 2013-12-12 18:48:04 +01:00
Marek Olšák f09de87735 st/mesa: set correct PIPE_CLEAR_COLORn flags
This also fixes the clear_with_quad function for glClearBuffer.
2013-12-12 18:48:04 +01:00
Marek Olšák 164dc6216a gallium: allow choosing which colorbuffers to clear
Required for glClearBuffer, which only clears one colorbuffer attachment.

Example:
   If the first colorbuffer is float and the second one is int:
      pipe->clear(pipe, PIPE_CLEAR_COLOR0, float_clear_color, ...);
      pipe->clear(pipe, PIPE_CLEAR_COLOR1, int_clear_color, ...);

This doesn't need any driver changes yet, because all drivers just use:
  if (flags & PIPE_CLEAR_COLOR) ..

The drivers which support GL 3.0 will have to implement it properly though.
2013-12-12 18:48:04 +01:00
Marek Olšák 0612005aa6 st/mesa: fix glClear with multiple colorbuffers and different formats
Cc: 10.0 9.2 9.1 <mesa-stable@lists.freedesktop.org>
2013-12-12 18:48:04 +01:00
Marek Olšák 03d848ea10 mesa: fix interpretation of glClearBuffer(drawbuffer)
This corresponding piglit tests supported this incorrect behavior instead of
pointing at it.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Cc: 10.0 9.2 9.1 <mesa-stable@lists.freedesktop.org>
2013-12-12 18:48:04 +01:00
Marek Olšák 0ad57bef96 docs/GL3: better documentation of GL 3.0 2013-12-12 18:48:04 +01:00
Marek Olšák e4ef639a57 r600g,radeonsi: fix initialized buffer range tracking for DMA, add comments
The DMA functions modify dst_offset and size and util_range_add gets wrong
values.

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2013-12-12 18:48:04 +01:00
Marek Olšák 7fa8fb7382 radeonsi: fix binding the dummy pixel shader
This fixes valgrind errors in glxinfo.

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2013-12-12 18:48:04 +01:00
Marek Olšák 0eb528abf2 radeonsi: fix FS_COLOR0_WRITES_ALL_CBUFS with mixed colorbuffer formats
The 16bpc packing must be done separately for each render target.

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2013-12-12 18:48:04 +01:00
Marek Olšák cd86f773a7 radeonsi: use the colorbuffer count from the shader key
As a result, the initialization of write_all must be done before
the compilation.

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2013-12-12 18:48:04 +01:00
Marek Olšák e9fc552837 radeonsi: remove unused variable in si_pipe_shader_ps
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2013-12-12 18:48:04 +01:00
Andreas Hartmetz 8ee7370c9b radeonsi: Write htile state to hardware. 2013-12-12 18:34:11 +01:00
Andreas Hartmetz a32aa2617d radeon: Allocate htile buffer for SI in r600_texture. 2013-12-12 18:34:11 +01:00
Andreas Hartmetz ca5812b45c radeon: rearrange r600_texture and related code a bit.
This should make the differences and similarities between color and
depth buffer handling more clear.
2013-12-12 18:34:11 +01:00
Marek Olšák 91aca8c662 r600g,radeonsi: consolidate buffer code, add handling of DISCARD_RANGE for SI
This adds 2 optimizations for radeonsi:
- handling of DISCARD_RANGE
- mapping an uninitialized buffer range is automatically UNSYNCHRONIZED

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2013-12-12 18:34:11 +01:00