OSDN Git Service
Abdiel Janulgue [Wed, 28 Nov 2012 13:10:33 +0000 (15:10 +0200)]
intel: Create a miptree using offsets in intel_set_texture_image_region
When binding a region to a texture image, re-create the miptree base-level
considering the offset and dimension information exported by DRIImage.
v8: - Move the alignment surface address checks from the image-from-texture
code to the texture-from-image side. This allows the error reporting to conform to
OES_EGL_Image and to prevent mixing up EGL and GL errors. Reported by Chad Versace.
- Addressed an existing issue in renderbuffer case where there is a
a possibility of creating EGL images out of depthstencil textures which isn't
really possible. This was spotted by Eric earlier.
Reviewed-by: Eric Anholt <eric@anholt.net> (v6)
Reviewed-by: Chad Versace <chad.versace@linux.intel.com> (v8)
Signed-off-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
Abdiel Janulgue [Wed, 28 Nov 2012 10:34:21 +0000 (12:34 +0200)]
i965: Account for offsets when updating SURFACE_STATE.
If the offsets are present, this lets us specify a particular level and slice
in a shared region using the base level of an exported mip-map tree.
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Signed-off-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
Abdiel Janulgue [Fri, 7 Dec 2012 11:40:35 +0000 (13:40 +0200)]
intel: add pixel offset calculator for miptree levels
Add helper to calculate fine-grained x and y adjustment pixels
to an image within a miptree level for tiled regions.
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Signed-off-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
Abdiel Janulgue [Thu, 17 Jan 2013 15:04:01 +0000 (17:04 +0200)]
intel: Expose intel_miptree_create_internal as intel_miptree_create_layout.
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Signed-off-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
Abdiel Janulgue [Thu, 17 Jan 2013 15:04:27 +0000 (17:04 +0200)]
intel: expose dimensions and offsets of a miptree level in DRIImage
v8: - Append has_depthstencil field in DRIImage structure.
Reviewed-by: Eric Anholt <eric@anholt.net> (v6)
Reviewed-by: Chad Versace <chad.versace@linux.intel.com> (v8)
Signed-off-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
Abdiel Janulgue [Tue, 27 Nov 2012 13:19:54 +0000 (15:19 +0200)]
dri2: Create image from texture
Add create image from texture extension and bump version.
v8: - Add appropriate image errors codes in DRI interface so we don't
have to use internal EGL functions in driver. Suggested by Chad Versace.
Reviewed-by: Eric Anholt <eric@anholt.net> (v6)
Reviewed-by: Chad Versace <chad.versace@linux.intel.com> (v8)
Signed-off-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
Michel Dänzer [Fri, 1 Feb 2013 17:49:07 +0000 (18:49 +0100)]
radeonsi: Fix draws using user index buffer.
Was broken since commit
bf469f4edc60bd1c5fd770cb231b8d5ab801427f
('gallium: add void *user_buffer in pipe_index_buffer').
Fixes 11 piglit tests and lots of missing geometry e.g. in TORCS.
NOTE: This is a candidate for the 9.1 branch.
Brian Paul [Fri, 1 Feb 2013 00:57:24 +0000 (17:57 -0700)]
st/mesa: whitespace/indentation fix
Brian Paul [Thu, 31 Jan 2013 00:44:25 +0000 (17:44 -0700)]
svga: check for NaN shader immediates
The svga device doesn't handle them. Replace with zeros.
Fixes several piglit tests, such as "glsl-const-builtin-inversesqrt".
Reviewed-by: Reviewed-by: José Fonseca <jfonseca@vmware.com>
Brian Paul [Thu, 31 Jan 2013 00:43:57 +0000 (17:43 -0700)]
svga: add, use SVGA3D_SURFACE_HINT_VOLUME flag
Reviewed-by: Reviewed-by: José Fonseca <jfonseca@vmware.com>
Brian Paul [Wed, 30 Jan 2013 22:45:08 +0000 (15:45 -0700)]
trace: measure time for each gallium call
To get a rough idea of how much time is spent in each gallium driver
function. The time is measured in microseconds.
Brian Paul [Tue, 29 Jan 2013 23:49:58 +0000 (16:49 -0700)]
trace: add void to function definition
Brian Paul [Tue, 29 Jan 2013 23:48:25 +0000 (16:48 -0700)]
trace: allow GALLIUM_TRACE=stdout/stderr
Marek Olšák [Thu, 31 Jan 2013 18:40:24 +0000 (19:40 +0100)]
radeonsi: port some of get_shader_param changes from r600g
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Marek Olšák [Tue, 29 Jan 2013 14:55:10 +0000 (15:55 +0100)]
mesa: don't expose IBM_rasterpos_clip in a core context
glRasterPos doesn't exist in the core profile.
NOTE: This is a candidate for the stable branches (9.0 and 9.1).
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Marek Olšák [Thu, 31 Jan 2013 23:32:55 +0000 (00:32 +0100)]
r300g: always put MSAA resources in VRAM
This along with the latest drm-fixes branch should help with bad performance
of MSAA. Remember: Nx MSAA can't be more than N times slower (where N=2,4,6).
Anyway, I recommend at least 512 MB of VRAM for Full HD 6x MSAA.
NOTE: This is a candidate for the 9.1 branch.
Michel Dänzer [Thu, 31 Jan 2013 10:47:55 +0000 (11:47 +0100)]
configure.ac: GLX cannot work without OpenGL
GLX uses mapi/glapi/libglapi.la, which is only built for OpenGL.
If the user specified --enable-xlib-glx --disable-opengl, error out, as these
cannot be both observed at the same time. If the user just specified
--disable-opengl but not --disable-glx, print a warning and disable GLX as
well.
NOTE: This is a candidate for the stable branches.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=59364
Tested-by: Tom Stellard <thomas.stellard@amd.com>
Vadim Girlin [Fri, 1 Feb 2013 09:19:35 +0000 (13:19 +0400)]
r600g: remove broken assert from r600_isa.c
Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Vadim Girlin [Fri, 1 Feb 2013 07:46:29 +0000 (11:46 +0400)]
r600g: implement shader disassembler v3
R600_DUMP_SHADERS environment var now allows to choose dump method:
0 (default) - no dump
1 - full dump (old dump)
2 - disassemble
3 - both
v2: fix output for burst_count > 1
v3: use more human-readable output for kcache data in CF_ALU_xxx clauses,
improve output for ALU_EXTENDED, other minor fixes
Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Vadim Girlin [Fri, 1 Feb 2013 07:45:35 +0000 (11:45 +0400)]
r600g: use tables with ISA info v3
v3: added some flags including condition codes for ALU,
fixed issue with CF reverse lookup (overlapping ranges of CF_ALU_xxx
and other CF instructions)
rebased on current master
Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Vinson Lee [Thu, 31 Jan 2013 07:23:54 +0000 (23:23 -0800)]
glapi: Do not use backtrace on MinGW.
execinfo.h is not available on MinGW.
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Jerome Glisse [Tue, 29 Jan 2013 17:52:17 +0000 (12:52 -0500)]
r600g: add cs memory usage accounting and limit it v3
We are now seing cs that can go over the vram+gtt size to avoid
failing flush early cs that goes over 70% (gtt+vram) usage. 70%
is use to allow some fragmentation.
The idea is to compute a gross estimate of memory requirement of
each draw call. After each draw call, memory will be precisely
accounted. So the uncertainty is only on the current draw call.
In practice this gave very good estimate (+/- 10% of the target
memory limit).
v2: Remove left over from testing version, remove useless NULL
checking. Improve commit message.
v3: Add comment to code on memory accounting precision
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Reviewed-by: Marek Olšák <maraeo@gmail.com>
Marek Olšák [Thu, 31 Jan 2013 14:29:16 +0000 (15:29 +0100)]
r600g: fix htile buffer leak
NOTE: This is a candidate for the 9.1 branch.
Andreas Boll [Wed, 30 Jan 2013 20:07:54 +0000 (21:07 +0100)]
mesa: bump version to 9.2 (devel)
Now that branch 9.1 is created, bump the minor version in
master.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Matt Turner [Wed, 30 Jan 2013 00:35:30 +0000 (16:35 -0800)]
Revert "mesa: Return INVALID_OPERATION when type is known but not allowed"
This reverts commit
2906e2034c9d674601960a5b586b6e986e6ef04f.
Fixes a regression in the glean depthStencil test.
Reverting this does not affect any tests in es3conform, so a more recent
patch must have also fixed the failure this one was intended to fix.
Reported-by: lu hua <huax.lu@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=59494
Kenneth Graunke [Wed, 30 Jan 2013 18:48:05 +0000 (10:48 -0800)]
mesa: Add TexBufferRange to dispatch_sanity.
Christoph implemented this, so we should expect it to be present now.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=60082
Christoph Bumiller [Sat, 12 Jan 2013 13:59:43 +0000 (14:59 +0100)]
nv50,nvc0: fix/enable texture buffer objects
Christoph Bumiller [Sat, 22 Dec 2012 12:46:27 +0000 (13:46 +0100)]
st/mesa: add support for GL_ARB_texture_buffer_range
v2: Update to handle BufferSize being -1 and return a NULL sampler
view if the specified range would cause out of bounds access.
Reviewed-by: Brian Paul <brianp@vmware.com>
Acked-by: Ian Romanick <ian.d.romanick@intel.com>
Christoph Bumiller [Sun, 16 Dec 2012 16:23:15 +0000 (17:23 +0100)]
gallium: add PIPE_CAP_TEXTURE_BUFFER_OFFSET_ALIGNMENT
Reviewed-by: Brian Paul <brianp@vmware.com>
Christoph Bumiller [Fri, 25 Jan 2013 13:54:05 +0000 (14:54 +0100)]
mesa: implement GL_ARB_texture_buffer_range
v2: Record texObj.BufferSize as -1 in TexBuffer(non-Range) instead
of the buffer's current size so we know we always have to use the
full size of the buffer object (i.e. even if it changes without the
user calling TexBuffer again) for the texture.
Clarify invalid offset alignment error message.
v3: Use extra GL_CORE-only section in get_hash_params.py for
TEXTURE_BUFFER_OFFSET_ALIGNMENT.
v4: Remove unnecessary check for profile in _mesa_TexBufferRange.
Add check for extension enable in get_tex_level_parameter_buffer.
v5: Fix position in gl_API.xml.
Add comment about meaning of BufferSize == -1.
v6: Add back checks for core profile and add a note about it.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Matt Turner [Tue, 29 Jan 2013 19:22:06 +0000 (11:22 -0800)]
build: Add missing comma in AS_IF
Reported-by: Lauri Kasanen<curaga@operamail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=47248#c15
Brian Paul [Tue, 29 Jan 2013 19:09:56 +0000 (12:09 -0700)]
mesa: remove ctx->Driver.Error() hook
Not used by any driver anymore.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Stéphane Marchesin [Mon, 28 Jan 2013 23:04:00 +0000 (15:04 -0800)]
glx: Check that swap_buffers_reply is non-NULL before using it
Check that the return value from xcb_dri2_swap_buffers_reply is
non-NULL before accessing the struct members.
Note: This is a candidate for the 9.0 branch.
Reviewed-by: Brian Paul <brianp@vmware.com>
Brian Paul [Tue, 29 Jan 2013 18:52:39 +0000 (11:52 -0700)]
mesa: fix comment typo: s/formaat/format/
José Fonseca [Tue, 29 Jan 2013 13:27:44 +0000 (13:27 +0000)]
llvmpipe: Don't advertise S8_UNORM (with feeble attempt at supporting it).
S8_UNORM was inadvertedly supported together with Z16_UNORM.
I tried to update the code to accomodate stencil-only -- it seemed a simple
thing to do -- but "fbo-stencil clear GL_STENCIL_INDEX8" still fails,
and it's not worth debugging.
Therefore although this change tries to update for S8_UNORM, it also
disables it completely.
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
José Fonseca [Tue, 29 Jan 2013 10:45:01 +0000 (10:45 +0000)]
llvmpipe: Fix deferred depth writes for Z16_UNORM.
This special path hadn't been exercised by my earlier testing, and mask
values weren't being properly truncated to match the values.
This change fixes that.
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Roland Scheidegger [Tue, 29 Jan 2013 16:39:09 +0000 (08:39 -0800)]
draw: fix draw_llvm_variant_key struct padding to avoid recompiles
The struct padding got broken by
c789b981b244333cfc903bcd1e2fefc010500013.
This caused serious performance regression because part of the key was
uninitialized and hence the shader always recompiled (at least on release
builds...).
While here also fix key size calculation when the number of samplers
and the number of sampler views are different.
v2: add comment
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Marek Olšák [Tue, 29 Jan 2013 16:32:14 +0000 (17:32 +0100)]
docs/relnotes-9.1: document new features in radeon drivers
Brian Paul [Tue, 29 Jan 2013 00:44:46 +0000 (17:44 -0700)]
docs: more VMware guest driver info, tips
Brian Paul [Mon, 28 Jan 2013 18:32:13 +0000 (11:32 -0700)]
st/mesa: only enable GL_EXT_framebuffer_multisample if GL_MAX_SAMPLES >= 2
We never really have multisampling with one sample per pixel.
See also http://bugs.freedesktop.org/show_bug.cgi?id=59873
Note: This is a candidate for the 9.0 branch.
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Brian Paul [Mon, 28 Jan 2013 18:31:33 +0000 (11:31 -0700)]
mesa: don't enable GL_EXT_framebuffer_multisample for software drivers
Note: This is a candidate for the 9.0 branch.
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Brian Paul [Sat, 26 Jan 2013 18:07:35 +0000 (11:07 -0700)]
osmesa: use _mesa_generate_mipmap() for mipmap generation, not meta
See previous commit for more info.
Note: This is a candidate for the 9.0 branch.
Reviewed-by: José Fonseca <jfonseca@vmware.com>
Brian Paul [Sat, 26 Jan 2013 17:58:37 +0000 (10:58 -0700)]
xlib: use _mesa_generate_mipmap() for mipmap generation, not meta
The swrast fragment program interpreter has trouble computing the
right texture LOD because it doesn't have easy access to input
derivatives. This causes the GLSL-based meta generate mipmap code
to fetch texels from the wrong mipmap level.
One possible fix would be to set the GL_TEXTURE_MIN/MAX_LOD parameters
to limit sampling from the right level. But let's just use the
_mesa_generate_mipmap() fallback since it's a lot faster than using
the fragment shader interpreter.
Fixes http://bugs.freedesktop.org/show_bug.cgi?id=54240
Note: This is a candidate for the 9.0 branch.
Reviewed-by: José Fonseca <jfonseca@vmware.com>
Brian Paul [Sat, 26 Jan 2013 17:09:37 +0000 (10:09 -0700)]
st/mesa: set ctx->Const.MaxSamples = 0, not 1
The gallium docs for pipe_screen::is_format_supported() says that
samples==0 or samples==1 both mean that multisampling is not supported.
Return GL_MAX_SAMPLES==0 instead of 1 for consistency with other drivers.
Note: This is a candidate for the 9.0 branch.
Reviewed-by: Marek Olšák <maraeo@gmail.com>
Brian Paul [Mon, 28 Jan 2013 19:58:53 +0000 (12:58 -0700)]
xlib: stop use _mesa_enable_extension(), just set the boolean flags
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Brian Paul [Sat, 26 Jan 2013 16:43:07 +0000 (09:43 -0700)]
xlib: fix incorrect GL_ANGLE_texture_compression_dxt enable
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
José Fonseca [Mon, 28 Jan 2013 19:10:22 +0000 (19:10 +0000)]
llvmpipe: Support Z16_UNORM as depth-stencil format.
Simply by adjusting the vector element width after/before
reading/writing the depth-stencil values.
Ran several GL_DEPTH_COMPONENT16 piglit tests without regressions.
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Kenneth Graunke [Sat, 13 Aug 2011 01:27:16 +0000 (18:27 -0700)]
i965: Add chipset limits for Haswell GT1/GT2.
The maximum number of URB entries come from the 3DSTATE_URB_VS and
3DSTATE_URB_GS state packet documentation; the thread count information
comes from the 3DSTATE_VS and 3DSTATE_PS state packet documentation.
NOTE: This is a candidate for the 9.0 branch.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
Kenneth Graunke [Mon, 14 Jan 2013 22:22:38 +0000 (14:22 -0800)]
intel: Un-hardcode lengths from blitter commands.
The packet length may change at some point in the future. Specifying it
explicitly (rather than hardcoding it in the command #define) allows us
to change it much more easily in the future.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Matt Turner [Mon, 21 Jan 2013 18:11:52 +0000 (10:11 -0800)]
Remove APIspec.dtd
Left behind by
a8ab7e33.
Matt Turner [Fri, 25 Jan 2013 23:06:16 +0000 (15:06 -0800)]
docs: List new extensions added in Mesa 9.1
I did not list the *_get_program_binary extensions since they're not
useful to anyone with their current implementation (that supports 0
binary formats).
Eric Anholt [Sat, 19 Jan 2013 02:18:57 +0000 (18:18 -0800)]
intel: Use a CPU map of the batch on LLC-sharing architectures.
Before, we were keeping a CPU-only buffer to accumulate the batchbuffer in,
which was an improvement over mapping the batch through the GTT directly
(since any readback or other failure to stream through write combining
correctly would hurt). However, on LLC-sharing architectures we can do better
by mapping the batch directly, which reduces the cache footprint of the
application since we no longer have this extra copy of a batchbuffer around.
Improves performance of GLBenchmark 2.1 offscreen on IVB by 3.5% +/- 0.4%
(n=21). Improves Lightsmark performance by 1.1 +/- 0.1% (n=76). Improves
cairo-gl performance by 1.9% +/- 1.4% (n=57).
No statistically significant difference in GLB2.1 on SNB (n=37). Improves
cairo-gl performance by 2.1% +/- 0.1% (n=278).
Jerome Glisse [Tue, 29 Jan 2013 00:07:10 +0000 (19:07 -0500)]
r600g: use uint64_t instead of unsigned long for proper 32bits cpu support
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Jerome Glisse [Mon, 28 Jan 2013 22:14:09 +0000 (17:14 -0500)]
r600g: real fix for non 3.8 kernel
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Vinson Lee [Sat, 26 Jan 2013 07:27:50 +0000 (08:27 +0100)]
i965: Fix assignment instead of comparison in asserts.
Fixes side effect in assertion defects reported by Coverity.
Note: This is a candidate for the 9.1 branch.
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Tapani Pälli [Thu, 24 Jan 2013 07:56:47 +0000 (09:56 +0200)]
android: use gralloc_drm_get_gem_handle api
Currently a gralloc internal structure is exposed to Mesa,
Use a query function instead to maintain ABI compatibility.
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Paul Berry [Mon, 28 Jan 2013 20:30:46 +0000 (12:30 -0800)]
intel: Typo fix: "pitsh" -> "pitch"
Comment change only.
Jerome Glisse [Mon, 28 Jan 2013 19:48:46 +0000 (14:48 -0500)]
r600g: fix segfault with old kernel
Old kernel do not have dma support, patch pushed were missing some
of the check needed to not use dma.
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Zack Rusin [Fri, 25 Jan 2013 01:48:12 +0000 (17:48 -0800)]
glx: only advertise GLX_INTEL_swap_event if it's supported
Only drivers supporting DRI2 version >=4 support GLX_INTEL_swap_event.
So lets mark it as such otherwise applications which use this extension
(i.e. everything based on Clutter, e.g. gnome-shell) break horribly on
drivers supporting DRI2 versions only up to 3.
Note: This is a candidate for the 9.0 branch.
Reviewed-by: Brian Paul <brianp@vmware.com>
Vadim Girlin [Wed, 23 Jan 2013 20:30:02 +0000 (21:30 +0100)]
r600g: improve inputs/interpolation handling with llvm backend
Get rid of special handling for reserved regs.
Use one intrinsic for all kinds of interpolation.
v2[Vincent Lejeune]: Rebased against current master
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Tom Stellard [Tue, 22 Jan 2013 20:22:11 +0000 (21:22 +0100)]
r600g: Add ar_chan member to struct r600_bytecode
r600_bytecode::ar_chan stores the register channel for the value that
will be loaded into the AR register.
At the moment, this field is only used by the LLVM backend. The default
backend always sets ar_chan = 0.
Tom Stellard [Tue, 22 Jan 2013 20:22:10 +0000 (21:22 +0100)]
r600g: More robust checks for MOVA_INT instructions
Vincent Lejeune [Fri, 25 Jan 2013 15:27:06 +0000 (16:27 +0100)]
r600g/llvm: Add dummy export for vs output
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=59588
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Tom Stellard [Sat, 26 Jan 2013 01:50:31 +0000 (20:50 -0500)]
r600g: Fix building with --enable-r600-llvm-compiler
https://bugs.freedesktop.org/show_bug.cgi?id=59877
Alex Deucher [Mon, 28 Jan 2013 03:13:52 +0000 (22:13 -0500)]
r600g: don't emit WAIT_UNTIL on cayman/TN (v2)
It shouldn't be needed and older kernels don't support
it.
v2: Replace with PS partial flush as before.
Fixes:
https://bugs.freedesktop.org/show_bug.cgi?id=59945
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Marek Olšák <maraeo@gmail.com>
Jerome Glisse [Mon, 7 Jan 2013 22:45:59 +0000 (17:45 -0500)]
r600g: add async for staging buffer upload v2
v2: Add virtual address to dma src/dst offset for cayman
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Jerome Glisse [Mon, 7 Jan 2013 19:25:11 +0000 (14:25 -0500)]
r600g: add multi ring support with dma as first second ring v4
We keep track of ring emission order in a stack, whenever we need to
flush we empty the stack in a fifo order. There is few helpers function
for bo mapping and other ring activities that will make sure that
the ring stack is properly flush and submitted.
v2: fix st flush path, and other flush path to properly flush all
rings if necessary
v3: - improve name of ring helpers
- make sure that each time a cs is gona be written it endup at
top of the stack to avoid any issue such as :
STACK[0] = dma (withbo A,B)
STACK[1] = gfx (withbo C,D)
Now if code try to emit a dma command relative to bo C or D
it will start writting cmd stream into the cs and once it
reach the point where it adds relocation it will flush.
At that point the cs will have cmd that don't have proper
relocation into the relocation buffer and kernel will just
refuse to run.
v4: - Drop the stack idea as it turn out there is no way to use it
or benefit from it. Any time the driver start command on other
ring, it always need to flush the previous ring. So make code
simpler by not using a stack.
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Jerome Glisse [Mon, 7 Jan 2013 16:49:23 +0000 (11:49 -0500)]
radeon/winsys: add dma ring support to winsys v3
Add ring support, you can create a cs for each ring. DMA ring is
bit special regarding relocation as you must emit as much relocation
as there is use of the buffer.
v2: - Improved comment on relocation changes
- Use a single thread to queue cs submittion this simplify driver
code while not impacting performances. Rational for this is that
you have to wait for all previous submission to have completed
so there was never a case while we could have 2 different thread
submitting a command stream at the same time. This code just
consolidate submission into one single thread per winsys.
v3: - Do not use semaphore for empty queue signaling, instead use
cond var. This is because it's tricky to maintain an even number
of call to semaphore wait and semaphore signal (the number of
cs in the stack would for instance make that number vary).
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Roland Scheidegger [Sat, 26 Jan 2013 00:33:43 +0000 (16:33 -0800)]
gallivm,draw,llvmpipe: mass rename of unit->texture_unit/sampler_unit
Make it obvious what "unit" this is (no change in functionality).
draw still uses "unit" in places where it changes the shader by adding
texture sampling itself - it seems like this can't work with shaders
using dx10-style sample opcodes (can't mix gl-style and dx10-style
sample instructions in a shader).
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Roland Scheidegger [Mon, 28 Jan 2013 14:50:36 +0000 (06:50 -0800)]
gallivm: split sampler and texture state
Split the sampler interface to use separate sampler and texture (sampler_view)
state. This is needed to support dx10-style sampling instructions.
This is not quite complete since both draw/llvmpipe don't really track
textures/samplers independently yet, as well as the gallivm code not quite
using the right sampler or texture index respectively (but it should work
for the sampling codes used by opengl).
We are however losing some optimizations in the process, apply_max_lod will
no longer work, and we potentially could end up with more (unnecessary)
recompiles (if switching textures with/without mipmaps only so it shouldn't
be too bad).
v2: don't use different callback structs for sampler/sampler view functions
(which just complicates things), fix up sampling code to actually use the
right texture or sampler index, and similar for llvmpipe/draw actually
distinguish between samplers and sampler views.
v3: fix more of PIPE_MAX_SAMPLER / PIPE_MAX_SHADER_SAMPLER_VIEWS mismatches
(both in draw and llvmpipe), based on feedback from José get rid of unneeded
static sampler derived state.(which also fixes the only 2 piglit regressions
due to a forgotten assignment), fix comments based on Brian's feedback.
v4: remove some accidental unrelated whitespace changes
Reviewed-by: José Fonseca <jfonseca@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Marek Olšák [Mon, 28 Jan 2013 01:47:24 +0000 (02:47 +0100)]
gallium/u_upload_mgr: fix a serious memory leak
It can eat all memory and crash in a matter of minutes with r600g.
Christoph Bumiller [Fri, 25 Jan 2013 18:37:40 +0000 (19:37 +0100)]
nouveau: don't try to use push_data if it's not implemented
Matt Turner [Sat, 26 Jan 2013 00:07:49 +0000 (16:07 -0800)]
gles3: Update gl3.h
Contains a fix for Khronos bug 9557.
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Marek Olšák [Fri, 25 Jan 2013 17:36:19 +0000 (18:36 +0100)]
r600g: add more cases for copying unsupported formats to resource_copy_region
just in case a new format is added to gallium
Marek Olšák [Fri, 25 Jan 2013 17:27:05 +0000 (18:27 +0100)]
r600g: don't use radeon_surface_level::npix_x/y/z
npix_x/y/z is wrong with NPOT textures, since it's always aligned to POT
if the level is non-zero, so we can't use that.
This fixes piglit/spec/EXT_texture_shared_exponent/fbo-generatemipmap-formats.
Marek Olšák [Sat, 26 Jan 2013 13:50:36 +0000 (14:50 +0100)]
r600g: fix compile warnings in r600_cp_dma_copy_buffer on 32-bit gcc
Alex Deucher [Fri, 25 Jan 2013 23:42:27 +0000 (18:42 -0500)]
r600g: fix up CP DMA for VM on cayman and TN
Need to add the virtual address.
Reviewed-by: Marek Olšák <maraeo@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Brian Paul [Tue, 27 Nov 2012 22:17:27 +0000 (15:17 -0700)]
svga: use pipe_sampler_view_release() in svga_cleanup_tss_binding()
Fixes a crash when the Redway3D Turbine demo exits. We've made this
change in other places in the past. The root issue is texture objects
are being shared by multiple contexts and sampler views get shared too.
Sampler views have a context pointer and if that context gets deleted
we may try to reference that context when finally deleting the sampler
view.
pipe_sampler_view_release() avoids this problem because it takes
an explicit context.
Reviewed-by: Zack Rusin <zackr@vmware.com>
Brian Paul [Fri, 25 Jan 2013 17:30:31 +0000 (10:30 -0700)]
st/mesa: handle new GLSL IR enumerants in switch statements
To silence warnings about unhandled cases.
Brian Paul [Thu, 24 Jan 2013 23:53:33 +0000 (16:53 -0700)]
svga: add NULL pointer check in svga_create_sampler_state()
Note: This is a candidate for the 9.0 branch.
Brian Paul [Thu, 24 Jan 2013 23:32:42 +0000 (16:32 -0700)]
vbo: add a null pointer check to handle OOM instead of crashing
Note: This is a candidate for the 9.0 branch.
Brian Paul [Thu, 24 Jan 2013 23:06:20 +0000 (16:06 -0700)]
util: add new error checking code in vbuf helper
Check the return value of calls to u_upload_alloc() and
u_upload_data() and return early if needed.
Since we don't have a way to propagate errors all the way up to
Mesa through pipe_context::draw_vbo(), call debug_warn_once() so
the user might have some clue about OOM errors.
Note: This is a candidate for the 9.0 branch.
Brian Paul [Thu, 24 Jan 2013 21:51:05 +0000 (14:51 -0700)]
st/mesa: do proper error checking for u_upload_alloc() calls
We weren't properly checking the return value of these calls (and
calls to u_upload_data()) to detect OOM errors.
Note: This is a candidate for the 9.0 branch.
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Brian Paul [Thu, 24 Jan 2013 21:44:09 +0000 (14:44 -0700)]
util: add some defensive coding in u_upload_alloc()
Some callers of this function were checking the 'ptr' result to see if
the function failed. But the correct way is to check the regular
return value for PIPE_ERROR_x. Now we initialize all the returned
values at the top of the function in case we do hit an error (like OOM).
Callers are more likely to detect OOM conditions now. But there
are some callers which don't do any error checking...
Note: This is a candidate for the 9.0 branch.
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Brian Paul [Wed, 23 Jan 2013 00:50:53 +0000 (17:50 -0700)]
glsl: use glsl_strtof() instead of glsl_strtod()
Since the result of those calls is always assigned to a float.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Brian Paul [Wed, 23 Jan 2013 16:05:30 +0000 (09:05 -0700)]
glsl: add new glsl_strtof() function
Note, we could alternately implement this in terms of glsl_strtod()
with a (float) cast.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Brian Paul [Wed, 23 Jan 2013 00:46:40 +0000 (17:46 -0700)]
softpipe: add casts to silence MSVC warnings
Reviewed-by: José Fonseca <jfonseca@vmware.com>
Brian Paul [Wed, 23 Jan 2013 00:46:13 +0000 (17:46 -0700)]
util: silence MSVC signed/unsigned comparison warnings
Reviewed-by: José Fonseca <jfonseca@vmware.com>
Brian Paul [Wed, 23 Jan 2013 00:45:57 +0000 (17:45 -0700)]
util: silence MSVC double->float conversion warnings
Reviewed-by: José Fonseca <jfonseca@vmware.com>
Brian Paul [Wed, 23 Jan 2013 00:45:25 +0000 (17:45 -0700)]
util: silence MSVC signed/unsigned warnings in debug_get_flags_option()
Reviewed-by: José Fonseca <jfonseca@vmware.com>
Brian Paul [Wed, 23 Jan 2013 00:44:59 +0000 (17:44 -0700)]
st/mesa: silence assorted MSVC warnings in DrawPixels code
Reviewed-by: José Fonseca <jfonseca@vmware.com>
Brian Paul [Wed, 23 Jan 2013 00:44:41 +0000 (17:44 -0700)]
swrast: silence a bunch of MSVC warnings
Reviewed-by: José Fonseca <jfonseca@vmware.com>
Brian Paul [Wed, 23 Jan 2013 00:44:02 +0000 (17:44 -0700)]
mesa: use GLbitfield64 when copying program inputs
Note: This is a candidate for the 9.0 branch.
Reviewed-by: José Fonseca <jfonseca@vmware.com>
Brian Paul [Wed, 23 Jan 2013 00:19:30 +0000 (17:19 -0700)]
mesa: add some casts to silence MSVC warnings
Reviewed-by: José Fonseca <jfonseca@vmware.com>
Brian Paul [Wed, 23 Jan 2013 00:17:24 +0000 (17:17 -0700)]
mesa: add casts in _mesa_GetTexParameterfv() to silence warnings
There are other similar int->float casts elsewhere in the function.
Reviewed-by: José Fonseca <jfonseca@vmware.com>
Matt Turner [Wed, 23 Jan 2013 05:06:12 +0000 (21:06 -0800)]
i965: Enable ARB_shading_language_packing
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
Matt Turner [Tue, 22 Jan 2013 01:50:41 +0000 (17:50 -0800)]
i965: Assert that the 4x8 pack/unpack operations have been lowered
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
Matt Turner [Tue, 22 Jan 2013 01:46:01 +0000 (17:46 -0800)]
i965: Lower the 4x8 pack/unpack operations
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
Matt Turner [Mon, 21 Jan 2013 23:31:00 +0000 (15:31 -0800)]
glsl: Add support for lowering 4x8 pack/unpack operations
Lower them to arithmetic and bit manipulation expressions.
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
Matt Turner [Mon, 21 Jan 2013 22:53:26 +0000 (14:53 -0800)]
glsl: Evaluate constant pack/unpack 4x8 expressions
That is, evaluate constant expressions for the following functions:
packSnorm4x8, unpackSnorm4x8
packUnorm4x8, unpackUnorm4x8
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Reviewed-by: Paul Berry <stereotype441@gmail.com>