Commit Graph

69706 Commits

Author SHA1 Message Date
Jason Ekstrand 02f03fc0f1 nir/tex: Use the correct return size for query_levels and lod
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
2015-04-22 18:10:40 -07:00
Jason Ekstrand 94669cb534 nir: Refactor tex_instr_dest_size to use a switch statement
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
2015-04-22 18:10:40 -07:00
Jason Ekstrand 73cc76362d nir/lower_vars_to_ssa: Actually look for indirects when determining aliasing
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
2015-04-22 18:10:39 -07:00
Dave Airlie 734bceed86 docs: mark off texture_stencil8 (v2.1)
copy drivers from the stencil_texturing list,
softpipe is definitely broken for stencil texturing
since it uses float, but I'll look at that later.

v2.1: update relnotes

Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2015-04-23 10:11:27 +10:00
Dave Airlie 6cc49c4ce1 st/mesa: add ARB_texture_stencil8 support (v4)
if we support stencil texturing, enable texture_stencil8
there is no requirement to support native S8 for this,
the texture can be converted to x24s8 fine.

v2: fold fixes from Marek in:
   a) put S8 last in the list
   b) fix renderable to always test for d/s renderable
    fixup the texture case to use a stencil only format
    for picking the format for the texture view.
v3: hit fallback for getteximage
v4: put s8 back in front, it shouldn't get picked now (Ilia)

Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2015-04-23 10:11:27 +10:00
Dave Airlie 782e71cc07 mesa: finish implementing ARB_texture_stencil8 (v5)
Parts of this were implemented previously, so finish it off.

v2: fix getteximage falling into the integer check
    add fixes for the FBO paths, (fbo-stencil8 test).

v3: fix getteximage path harder.
v4: remove swapbytes from getteximage path (Ilia)
v5: brown paper bag the swapbytes removal. (Ilia)

Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2015-04-23 10:11:26 +10:00
Jason Ekstrand 1948880720 mesa: remove the gl_sl_pragmas structure
This code was added by Brian Paul in 2009 but, as far as Matt and I can
tell, it's been dead ever since the new GLSL compiler was added.

Reviewed-by: Brian Paul <brianp@vmware.com>
2015-04-22 16:00:35 -07:00
Jason Ekstrand ae3870df70 i965: Add a brw_compiler structure and store the register sets in it
Reviewed-by: Matt Turner <mattst88@gmail.com>
2015-04-22 16:00:34 -07:00
Jason Ekstrand a85c4c9b3f i965: Rename brw_compile to brw_codegen
This name better matches what it's actually used for.  The patch was
generated with the following command:

for file in *; do
sed -i -e s/brw_compile/brw_codegen/g $file
done

Signed-off-by: Jason Ekstrand <jason.ekstrand@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
2015-04-22 16:00:34 -07:00
Jason Ekstrand cfc56fcee3 i965: Use device_info instead of the context for computing vue maps
Reviewed-by: Matt Turner <mattst88@gmail.com>
2015-04-22 16:00:34 -07:00
Jason Ekstrand 02ccb19495 i965: Use device_info instead of the context in instruction scheduling
Reviewed-by: Matt Turner <mattst88@gmail.com>
2015-04-22 16:00:34 -07:00
Jason Ekstrand 28e9601d0e i965: Add a devinfo field to backend_visitor and use it for gen checks
Reviewed-by: Matt Turner <mattst88@gmail.com>
2015-04-22 16:00:34 -07:00
Jason Ekstrand 73bf8f3d6b i965: Remove remaining uses of ctx->Const.UniformBooleanTrue in visitors
Since commit 2881b123, we have used 0/~0 for representing booleans on all
gens.  However, we still had a bunch of places in the visitor code where we
were still referring to ctx->Const.UniformBooleanTrue.  Since this is
always ~0, we can just remove them.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
2015-04-22 16:00:33 -07:00
Jason Ekstrand 2bf207b473 i965/vec4: Add a devinfo field to the generator and use it for gen checks
Reviewed-by: Matt Turner <mattst88@gmail.com>
2015-04-22 16:00:33 -07:00
Jason Ekstrand 5bda1ff1be i965/fs: Add a devinfo field to the generator and use it for gen checks
Reviewed-by: Matt Turner <mattst88@gmail.com>
2015-04-22 16:00:33 -07:00
Jason Ekstrand 38dc2ddab4 i965/device_info: Add a supports_simd16_3src flag
This also involves moving revision checking to screen creation time and
passing that into brw_get_device_info so that we can get the right
device_info for early versions of SKL.  Since the only place we used
revision was to check for SIMD16 3-src instruction support, it's safe to
remove the revision field from brw_context.

Reviewed-by: Matt Turner <mattst88@gmail.com>
2015-04-22 16:00:33 -07:00
Jason Ekstrand 85db2aca52 i965/device_info: Add a HSW_FEATURES macro
It's basically just a copy of GEN7_FEATURES only with is_haswell set

Reviewed-by: Matt Turner <mattst88@gmail.com>
2015-04-22 16:00:33 -07:00
Jason Ekstrand 9c89e47806 i965: Make the annotation code take a device_info instead of a context
Reviewed-by: Matt Turner <mattst88@gmail.com>
2015-04-22 16:00:33 -07:00
Jason Ekstrand 5cb91db619 i965/fs: Remove the GL context from the generator
Reviewed-by: Matt Turner <mattst88@gmail.com>
2015-04-22 16:00:33 -07:00
Jason Ekstrand 61c4702489 i965: Remove the context field from brw_compiler
Reviewed-by: Matt Turner <mattst88@gmail.com>
2015-04-22 16:00:32 -07:00
Jason Ekstrand 639314d40e i965: Make the disassembler take a device_info instead of a context
Reviewed-by: Matt Turner <mattst88@gmail.com>
2015-04-22 16:00:32 -07:00
Jason Ekstrand c3e5f32840 i965: Make instruction compaction take a device_info instead of a context
Reviewed-by: Matt Turner <mattst88@gmail.com>
2015-04-22 16:00:32 -07:00
Jason Ekstrand 4e9c79c847 i965: Make the brw_inst helpers take a device_info instead of a context
Reviewed-by: Matt Turner <mattst88@gmail.com>
2015-04-22 16:00:32 -07:00
Jason Ekstrand 6219a8f098 i965/eu: Add a devinfo parameter to brw_compile
Reviewed-by: Matt Turner <mattst88@gmail.com>
2015-04-22 16:00:32 -07:00
Jason Ekstrand a921475c22 i965: Do better fake context setup in unit tests
In future tests, we will start relying on devinfo and not just brw in the
compiler.  Changing this now keeps these tests from failing in the future.

Reviewed-by: Matt Turner <mattst88@gmail.com>
2015-04-22 16:00:32 -07:00
Jason Ekstrand ceb6e5eebe i965: Remove the context parameter from brw_texture_offset
It wasn't really being used anyway.  We used it to assert that gpu_shader5
is supported in the back-end but that should be caught by the front-end.

Signed-off-by: Jason Ekstrand <jason.ekstrand@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
2015-04-22 16:00:31 -07:00
Dave Airlie 8a41cd2407 softpipe: fix stencil write to use an integer value
This fixes a number of regressions since
61393bdcdc
u_tile: fix stencil texturing tests under softpipe

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89960
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2015-04-23 08:32:30 +10:00
Anuj Phogat 2c08e3b8ea mesa: Fix typo in a comment
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2015-04-22 15:24:43 -07:00
Rob Clark cb24d3b7ad freedreno: misc minor cleanups
Signed-off-by: Rob Clark <robclark@freedesktop.org>
2015-04-22 13:20:28 -04:00
Rob Clark 1b58d8c2bf freedreno/a4xx: (partial) gl_FragCoord.zw
The bit to enable .z is still commented out, as it is triggering gpu
hangs in 0ad.  But at least gl_FragCoord.w works now, and we know what
bits we are *supposed* to set for .z (with that uncommented all piglit
fragcoord tests are passing).

Signed-off-by: Rob Clark <robclark@freedesktop.org>
2015-04-22 13:20:28 -04:00
Rob Clark a869183123 freedreno/a4xx: primitive-restart
This was the missing bit to get dolphin-emu working on a4xx.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
2015-04-22 13:20:28 -04:00
Rob Clark 632ea2a113 freedreno/nir: sysval fixes
Signed-off-by: Rob Clark <robclark@freedesktop.org>
2015-04-22 13:20:28 -04:00
Rob Clark 13527df143 freedreno/a4xx: wire up integer texture sampling
Similar to a3xx, the compiler needs to know the return type of the sam,
etc, instructions.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
2015-04-22 13:20:28 -04:00
Rob Clark 48a651e98c freedreno/a4xx: formats updates/fixes
Update formats table with new formats that Ilia has figured out, and fix
sampling from srgb texture and integer vbo's.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
2015-04-22 13:20:28 -04:00
Rob Clark 21ceedfd8b freedreno: update generated headers
Signed-off-by: Rob Clark <robclark@freedesktop.org>
2015-04-22 13:20:27 -04:00
Emil Velikov 9450bd56be gallium/targets/d3dadapter9: drop the libdrm prefix for drm.h
The path is provided by libdrm.pc and already used appropriately by
the build system.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-04-22 16:03:01 +01:00
Brian Paul 02e93be55e cso: minor comment fix 2015-04-22 08:58:05 -06:00
Brian Paul 31667e6237 glsl: rewrite glsl_type::record_key_hash() to avoid buffer overflow
This should be more efficient than the previous snprintf() solution.
But more importantly, it avoids a buffer overflow bug that could result
in crashes or unpredictable results when processing very large interface
blocks.

For the app in question, key->length = 103 for some interfaces.  The check
if size >= sizeof(hash_key) was insufficient to prevent overflows of the
hash_key[128] array because it didn't account for the terminating zero.
In this case, this caused the call to hash_table_string_hash() to return
different results for identical inputs, and then shader linking failed.

This new solution also takes all structure fields into account instead
of just the first 15 when sizeof(pointer)==8.

Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2015-04-22 08:58:05 -06:00
Brian Paul bd4dbdfa51 mesa: add check for NV_texture_barrier in _mesa_TextureBarrierNV()
If an app called glTextureBarrierNV() without checking if the
extension was available, we'd crash with some gallium drivers
in st_TextureBarrier() because the pipe_context::texture_barrier()
pointer was NULL.

Generate GL_INVALID_OPERATION instead.

Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
2015-04-22 08:58:05 -06:00
Brian Paul b260d9d91f main: silence missing return value warning in array_index_of_resource()
v2: return -1 instead of 0, per Emil Velikov.

Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
2015-04-22 08:58:05 -06:00
Chih-Wei Huang 0b1823f5be android: re-build all mesa binaries properly
The clean steps ensure both 32-bit and 64-bit objects are cleaned.

Signed-off-by: Chih-Wei Huang <cwhuang@linux.org.tw>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-04-22 15:57:00 +01:00
Emil Velikov 36e59215ba android: xmlpool: cleanup the generation rules
- Do not attempt to create the save folder twice - both dir $@ and
PRIVATE_LOCALEDIR point to the same place.
 - Use @ and $(hide), for mkdir and python, to avoid spamming the
output.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-04-22 15:56:32 +01:00
Chih-Wei Huang 98c8997fe5 android: xmlpool: Get rid of the last use of intermediates-dir-for
v2 [Emil Velikov]
 - Keep the PRIVATE_LOCALEDIR variable.
 - Do not use $(@D) but the more widespead $(dir $@)

Signed-off-by: Chih-Wei Huang <cwhuang@linux.org.tw>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-04-22 15:54:51 +01:00
Chih-Wei Huang 5b8d61b0cc android: export the path of the generated headers
The modules need the headers can get the path automatically.

Signed-off-by: Chih-Wei Huang <cwhuang@linux.org.tw>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-04-22 15:53:36 +01:00
Chih-Wei Huang b0e33c2256 android: fix the building rules for Android 5.0
Android 5.0 allows modules to generate source into $OUT/gen, which will
then be copied into $OUT/obj and $OUT/obj_$(TARGET_2ND_ARCH) as necessary.
Modules will need to change calls to local-intermediates-dir into
local-generated-sources-dir.

The patch changes local-intermediates-dir into local-generated-sources-dir.
If the Android version is less than 5.0, fallback to local-intermediates-dir.

The patch also fixes the 64-bit building issue of Android 5.0.

v2 [Emil Velikov]
 - Keep the LOCAL_UNSTRIPPED_PATH variable.

Signed-off-by: Chih-Wei Huang <cwhuang@linux.org.tw>
2015-04-22 15:53:35 +01:00
Chih-Wei Huang 671a550846 android: fix building issues of host binaries
Define _GNU_SOURCE to enable features (__USE_XOPEN2K and __USE_UNIX98)
required to build the host binaries.

Signed-off-by: Chih-Wei Huang <cwhuang@linux.org.tw>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-04-22 15:53:35 +01:00
Chih-Wei Huang 076edc6a03 android: fix a building error of libmesa_program
Add libmesa_glsl to LOCAL_STATIC_LIBRARIES to get
its exported include path (for nir_opcodes.h).

Signed-off-by: Chih-Wei Huang <cwhuang@linux.org.tw>
2015-04-22 15:53:35 +01:00
Emil Velikov 8098bf8e7a android: mesa: fold the ARCH_X86_HAVE_SSE4_1 conditionals
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-04-22 15:53:11 +01:00
Emil Velikov 669cfc267a android: mesa: fix the path of the SSE4_1 optimisations
Commit dd6f641303c(mesa: Build with subdir-objects.) removed the SRCDIR
variable, but forgot to update all references of it.

v2: Fix path - must be relative to LOCAL_PATH. (Chih-Wei)

Cc: "10.5" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Chih-Wei Huang <cwhuang@linux.org.tw>
2015-04-22 15:52:02 +01:00
Emil Velikov 64171c2d24 android: build the Mesa IR -> NIR translator
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-04-22 14:53:22 +01:00