Commit Graph

61967 Commits

Author SHA1 Message Date
Emil Velikov ce24bcd394 targets/dri: use install-gallium-links.mk
Drop the duplication across all dri targets.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2014-03-11 12:50:42 +00:00
Emil Velikov bbae65e25c automake: introduce install-gallium-links.mk
This helper script will be used to minimise the duplication
during link generation across all gallium targets.

v2:
 - Handle vdpau_LTLIBRARIES. Requested by Christian König.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2014-03-11 12:50:42 +00:00
Emil Velikov 7b4ccad33d automake: use install-lib-links.mk across all classic mesa
Use the handy script and minimise the boilerplate in the makefiles.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2014-03-11 12:50:42 +00:00
Emil Velikov b496ab0567 automake: make install-lib-links less chatty
There is little point in echoing everything that the script does
to stdout. Wrap it in AM_V_GEN so that a reasonable message is
printed as a indication of it's invocation.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2014-03-11 12:50:42 +00:00
Emil Velikov 90a4ffdea5 automake: use only the folder name if it's a subfolder of the present one
v2: Resolve rebase conflicts.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2014-03-11 12:50:41 +00:00
Emil Velikov b15b1fbb51 automake: silence folder creation
There is little gain in printing whenever a folder is created.

v2:
 - Use $(AM_V_at) over @ to have control in verbose builds.
Suggested by Erik Faye-Lund.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2014-03-11 12:50:41 +00:00
Emil Velikov c690f8dd9b automake: use MKDIR_P when possible
Use the automake predefined macro over hardcoding mkdir -p everywhere.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2014-03-11 12:50:41 +00:00
Vinson Lee e6c565fcc5 radeon: Fix build.
Fix build error introduced with commit
dfa25ea5cd.

  CC       r600_streamout.lo
r600_streamout.c:108:6: error: conflicting types for 'r600_set_streamout_targets'
void r600_set_streamout_targets(struct pipe_context *ctx,
     ^
./r600_pipe_common.h:413:6: note: previous declaration is here
void r600_set_streamout_targets(struct pipe_context *ctx,
     ^

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76009
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
2014-03-10 22:54:59 -07:00
Zack Rusin dfa25ea5cd gallium: allow setting of the internal stream output offset
D3D10 allows setting of the internal offset of a buffer, which is
in general only incremented via actual stream output writes. By
allowing setting of the internal offset draw_auto is capable
of rendering from buffers which have not been actually streamed
out to. Our interface didn't allow. This change functionally
shouldn't make any difference to OpenGL where instead of an
append_bitmask you just get a real array where -1 means append
(like in D3D) and 0 means do not append.

Signed-off-by: Zack Rusin <zackr@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2014-03-07 12:49:33 -05:00
Brian Paul 7d5903980e meta: use non-ARB shader/program create/delete functions
The non-ARB versions take GLuint ids, not GLhandleARB.

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2014-03-10 17:07:05 -06:00
Brian Paul d96ed5c088 mesa: s/GLhandleARB/GLuint/ for glGetUniform functions
The GL specs say the parameter is GLuint, not GLhandleARB.

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2014-03-10 17:06:57 -06:00
Brian Paul a19b19fb94 mesa: rename MESA_FORMAT_X8Z24_UNORM -> MESA_FORMAT_X8_UINT_Z24_UNORM
To follow the example of MESA_FORMAT_Z24_UNORM_X8_UINT.

Reviewed-by: Michel Dänzer <michel@daenzer.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
2014-03-10 16:11:54 -06:00
Brian Paul 9b5fff2dd7 mesa: reorder MESA_FORMAT enums
The MESA_FORMAT_x enums in formats.h weren't declared in any sort
of reasonable order.  Now it should be a little more logical.
This also required reordering tables in formats.c and s_texfetch.c

Reviewed-by: Michel Dänzer <michel@daenzer.net>
Acked-by: Eric Anholt <eric@anholt.net>
2014-03-10 16:11:50 -06:00
Brian Paul 10738727ae mesa: trim down format.h comments
There's no real reason to list all the formats in the comments.

Reviewed-by: Michel Dänzer <michel@daenzer.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
2014-03-10 16:11:45 -06:00
Matt Turner 3330dec90c i965/vec4: Don't fix-up scalar uniforms for 3 src instructions.
Removes unnecessary MOV instructions in L4D2, TF2, Dota2, and many other
Steam games.

total instructions in shared programs: 1668126 -> 1657509 (-0.64%)
instructions in affected programs:     242235 -> 231618 (-4.38%)

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2014-03-10 14:13:45 -07:00
Matt Turner b823d5df0f i965: Disassemble 3 src instructions' rep_ctrl field.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2014-03-10 14:13:45 -07:00
Matt Turner dafcc1b7c4 i965: Disassemble 3-src operands widths' correctly.
<4,1,1> isn't a real thing. We meant <4,4,1>, i.e., each component of
the whole register.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2014-03-10 14:13:45 -07:00
Eric Anholt 30259856a8 i965: Move binding table update packets to binding table setup time.
This keeps us from needing to reemit all the other stage state just
because a surface changed.

Improves unoptimized glamor x11perf -f8text by 1.10201% +/- 0.489869%
(n=296). [v1]

v2:
 - Drop binding table packets from Gen8 unit state as well.
 - Pass _3DSTATE_BINDING_TABLE_POINTERS_XS to brw_upload_binding_table,
   cutting even more code.
v3: Don't forget to drop them from 3DSTATE_GS (botched refactor in v2).

Signed-off-by: Eric Anholt <eric@anholt.net> [v1]
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> [v1]
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> [v2, v3]
Reviewed-by: Eric Anholt <eric@anholt.net> [v3]
2014-03-10 13:05:12 -07:00
Kenneth Graunke db26253a48 i965: Reorganize the code in brw_upload_binding_tables.
This makes both the empty and non-empty binding table paths exit through
the bottom of the function, which gives us a place to share code.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
2014-03-10 13:05:12 -07:00
Maarten Lankhorst 8c136b53b7 fix vdpau interop when using -Bsymbolic-functions in ldflags
Explicitly add radeon_drm_winsys_create and nouveau_drm_screen_create to
the dynamic list. This will ensure vdpau interop still works even when
the user links with -Bsymbolic-functions in hardened builds.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Tested-by: Rachel Greenham <rachel@strangenoises.org>
Reported-by: Peter Frühberger <peter.fruehberger@gmail.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
2014-03-10 17:08:19 +01:00
Chia-I Wu 952fda4d3f ilo: do not set I915_EXEC_NO_RELOC
This reverts most of commit d80f0c34b7.  Upon a
closer reading, having the presumed offsets written is not enough to set the
flag.  EXEC_OBJECT_NEEDS_GTT and/or EXEC_OBJECT_WRITE of the reloc entries
must also be set appropriately.
2014-03-10 19:04:43 +08:00
Chia-I Wu 5ecdd7ba22 ilo: add support for PIPE_QUERY_PIPELINE_STATISTICS 2014-03-10 16:43:53 +08:00
Chia-I Wu 8fc2f0c874 ilo: add ILO_3D_PIPELINE_WRITE_STATISTICS
The command writes statistics registers to the specified bo.
2014-03-10 16:43:53 +08:00
Chia-I Wu d8b2e3c25e ilo: add some MI commands to GPE
We will need MI commands that load/store registers.
2014-03-10 16:43:53 +08:00
Chia-I Wu 0f41f9c63d ilo: set PIPE_CONTROL_GLOBAL_GTT_WRITE automatically
Set the flag automatically in gen6_emit_PIPE_CONTROL(), and set it only for
GEN6.
2014-03-10 16:43:53 +08:00
Chia-I Wu 345bf92f13 ilo: print a warning when PPGTT is disabled
Despite what the PRMs say, the driver appears to work fine when PPGTT is
disabled.  But at least print a warning in that case.
2014-03-10 16:42:42 +08:00
Chia-I Wu 747627d045 ilo: require hardware logical context support
The code paths are not tested for a while, and have some known issues.
2014-03-10 16:42:42 +08:00
Chia-I Wu 72956ed374 ilo: protect the decode context with a mutex
The decode context is not thread safe.
2014-03-10 16:42:42 +08:00
Chia-I Wu d80f0c34b7 ilo: set I915_EXEC_NO_RELOC when available
The winsys makes it clear that the pipe drivers should write presumed offsets.
We can always set I915_EXEC_NO_RELOC when the kernel supports it.
2014-03-10 16:42:42 +08:00
Chia-I Wu 0b462d3ab1 ilo: move ring types to winsys
It results in less code despite that i915_drm.h specifies the ring type as
part of the execution flags.
2014-03-10 16:42:42 +08:00
Chia-I Wu 42c1ce4c03 ilo: winsys may limit the batch buffer size
The maximum batch buffer size is determined at the time of
drm_intel_bufmgr_gem_init().  Make sure the pipe driver does not exceed the
limit.
2014-03-10 16:42:42 +08:00
Chia-I Wu a434ac045e ilo: PIPE_CAP_QUERY_TIMESTAMP may not be supported
Reading TIMESTAMP register may fail, depending on both kernel and hardware.
2014-03-10 16:42:42 +08:00
Chia-I Wu 249b1ad984 ilo: rework winsys batch buffer functions
Rename

  intel_winsys_check_aperture_size() to intel_winsys_can_submit_bo(),
  intel_bo_exec() to intel_winsys_submit_bo(), and
  intel_winsys_decode_commands() to intel_winsys_decode_bo().

Make a semantic change to ignore intel_context when the ring is not the render
ring.
2014-03-10 16:42:42 +08:00
Chia-I Wu 3e324f99d3 ilo: replace bo alloc flags by initial domains
The only alloc flag is INTEL_ALLOC_FOR_RENDER, which can as well be expressed
by specifying the initial write domain.  The change makes it obvious that we
failed to set INTEL_ALLOC_FOR_RENDER in several places.
2014-03-10 16:42:42 +08:00
Chia-I Wu 76713ed5d6 ilo: remove intel_bo_get_size()
Commit bfa8d21759 uses it to work around a
hardware limitation.  But there are other ways to do it without the need for
intel_bo_get_size().
2014-03-10 16:42:42 +08:00
Chia-I Wu 790c32ec75 ilo: remove intel_bo_get_virtual()
Make the map functions return the pointer directly.
2014-03-10 16:42:42 +08:00
Chia-I Wu 90786613e9 ilo: rework winsys bo reloc functions
Rename

  intel_bo_emit_reloc() to intel_bo_add_reloc(),
  intel_bo_clear_relocs() to intel_bo_truncate_relocs(), and
  intel_bo_references() to intel_bo_has_reloc().

Besides, we need intel_bo_get_offset() only to get the presumed offset afer
adding a reloc entry.  Remove the function and make intel_bo_add_reloc()
return the presumed offset.  While at it, switch to gem_bo->offset64 from
gem_bo->offset.
2014-03-10 16:42:42 +08:00
Chia-I Wu 76ed4f75dd ilo: add a wrapper to cast struct intel_bo
It is just drm_intel_bo, but having a wrapper makes the code cleaner.
2014-03-10 16:42:42 +08:00
Chia-I Wu 4491f0a971 ilo: fix DRM_API_HANDLE_TYPE_FD export
It can be exported by drm_intel_bo_gem_export_to_prime().  The code is already
in winsys, just not enabled.
2014-03-10 16:42:42 +08:00
Chia-I Wu 276348e85a ilo: improve winsys documentation/comments
Document the interface, and add comments as to why some features are enabled
and why some checks are made.
2014-03-10 16:42:41 +08:00
Chia-I Wu f2aabecbb0 ilo: remove intel_winsys_enable_reuse()
It should be an (winsys) implementation detail.
2014-03-10 16:42:41 +08:00
Tapani Pälli 56b1be4399 mesa/glsl: introduce a remap table for uniform locations
Patch adds a remap table for uniforms that is used to provide a mapping
from application specified uniform location to actual location in the
UniformStorage. Existing UniformLocationBaseScale usage is removed as
table can be used to set sequential values for array uniform elements.

This mapping helps to implement GL_ARB_explicit_uniform_location so that
uniforms locations can be reorganized and handled in a more easy manner.

v2: small fixes + rename parameters for merge and split functions (Ian)
    improve documentation, remove old check for location bounds (Eric)

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2014-03-10 09:46:24 +02:00
Tapani Pälli aa0d95a08d mesa: remove _mesa_symbol_table_iterator structure
Nothing uses this structure, removal fixes Klocwork error about
the possible oom condition in _mesa_symbol_table_iterator_ctor.

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2014-03-10 09:45:41 +02:00
Michel Dänzer 678cf9618f radeonsi: Use proper member name for deleting export shader PM4 state
Fixes double-free with some piglit tests using geometry shaders.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2014-03-10 12:21:50 +09:00
Marek Olšák 9c2a3934c5 r600g: document why texture offset emulation is needed 2014-03-10 00:19:59 +01:00
Ilia Mirkin 897f40f25d Revert nvc0 part of "nv50: adjust blit_3d handling of ms output textures"
The nvc0 bits don't appear to work, and I thought I had removed them
from the commit. Oops.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: "10.0 10.1" <mesa-stable@lists.freedesktop.org>
2014-03-09 01:38:10 -05:00
Ilia Mirkin 253314d487 nv50: adjust blit_3d handling of ms output textures
This fixes some unwanted scaling when the output is multisampled.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Christoph Bumiller <e0425955@student.tuwien.ac.at>
Cc: "10.0 10.1" <mesa-stable@lists.freedesktop.org>
2014-03-09 01:32:06 -05:00
Ilia Mirkin 507f0230d4 nouveau: fix fence waiting logic in screen destroy
nouveau_fence_wait has the expectation that an external entity is
holding onto the fence being waited on, not that it is merely held onto
by the current pointer. Fixes a use-after-free in nouveau_fence_wait
when used on the screen's current fence.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75279
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Christoph Bumiller <e0425955@student.tuwien.ac.at>
Cc: "9.2 10.0 10.1" <mesa-stable@lists.freedesktop.org>
2014-03-09 01:31:59 -05:00
Ilia Mirkin 5bf90cb521 nouveau: add valid range tracking to nouveau_buffer
This logic is borrowed from the radeon code. The transfer logic will
only get called for PIPE_BUFFER resources, so it shouldn't be necessary
to worry about them becoming render targets.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Christoph Bumiller <e0425955@student.tuwien.ac.at>
2014-03-09 01:31:21 -05:00
Julien Cristau cf1c52575d gbm: make 'devices' array static
It's only used in this one file as far as I can tell, and exporting a
symbol named 'devices' from a shared library is a recipe for trouble.

Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2014-03-08 20:43:54 +00:00