OSDN Git Service
Kenneth Graunke [Thu, 4 Jun 2015 08:24:07 +0000 (01:24 -0700)]
prog_to_nir: Make RSQ properly take the absolute value of its argument.
I just botched this when writing the original code.
From the ARB_vertex_program specification:
"The RSQ instruction approximates the reciprocal of the square root of
the absolute value of the scalar operand and replicates it to all four
components of the result vector."
Fixes a Glean vertProg1 subtest:
RSQ test 2 (reciprocal square root of negative value)
Cc: mesa-stable@lists.freedesktop.org
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90547
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Martin Peres [Thu, 4 Jun 2015 11:09:31 +0000 (14:09 +0300)]
main: fix a regression in uniform handling introduced by
87a4bc5
The comment was accurate but the condition was reversed...
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Signed-off-by: Martin Peres <martin.peres@linux.intel.com>
Martin Peres [Thu, 21 May 2015 12:51:09 +0000 (15:51 +0300)]
mesa: reference built-in uniforms into gl_uniform_storage
This change introduces a new field in gl_uniform_storage to
explicitely say that a uniform is built-in. In the case where it is,
no storage is defined to make it clear that it is read-only from the
mesa side. I fixed all the places in the code that made use of the
structure that I changed. Any place making a wrong assumption and using
the storage straight away will just crash.
This patch seems to implement the path of least resistance towards
listing built-in uniforms in GL_ACTIVE_UNIFORM (and other APIs).
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Signed-off-by: Martin Peres <martin.peres@linux.intel.com>
Roland Scheidegger [Tue, 2 Jun 2015 23:34:06 +0000 (01:34 +0200)]
llvmpipe: Implement stencil export
Pretty trivial, fixes the issue that we're expected to be able to blit
stencil surfaces (as the blit just relies on util blitter code which needs
stencil export to do it).
2 piglits skip->pass, 11 fail->pass
v2: prettify, keep different stencil ref value handling out of depth/stencil
test itself.
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Matt Turner [Wed, 3 Jun 2015 00:46:38 +0000 (17:46 -0700)]
i965: Use UW-typed immediate in multiply inst.
Some hardware reads only the low 16-bits even if the type is UD, but
other hardware like Cherryview can't handle this.
Fixes spec@arb_gpu_shader5@execution@sampler_array_indexing@fs-simple on
Cherryview.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90830
Reviewed-by: Neil Roberts <neil@linux.intel.com>
Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
Matt Turner [Mon, 1 Jun 2015 23:46:29 +0000 (16:46 -0700)]
program: Replace gl_inst_opcode with enum prog_opcode.
Both were introduced at the same time. I'm not sure why we needed two.
Reviewed-by: Brian Paul <brianp@vmware.com>
Matt Turner [Mon, 1 Jun 2015 23:27:46 +0000 (16:27 -0700)]
program: Remove dead Aux field from prog_instruction.
Appears to have been last used by the i965 driver (removed by commit
098acf6c).
Reviewed-by: Brian Paul <brianp@vmware.com>
Matt Turner [Mon, 1 Jun 2015 23:22:55 +0000 (16:22 -0700)]
program: Shrink and rename SaturateMode field to Saturate.
It was 2 bits to accommodate SATURATE_PLUS_MINUS_ONE (removed by commit
09b566e1). A similar change was made to TGSI recently in commit
e1c4e8aa.
Reducing the size from 2 bits to 1 reduces the size of the bit fields
from 17 bits to 16, which is a much nicer number.
Reviewed-by: Brian Paul <brianp@vmware.com>
Brian Paul [Fri, 15 May 2015 18:12:04 +0000 (12:12 -0600)]
mesa: move no-change glDepthFunc check earlier
If the incoming func matches the current state it must be a legal
value so we can do this before the switch statement.
Signed-off-by: Brian Paul <brianp@vmware.com>
Brian Paul [Fri, 15 May 2015 18:09:54 +0000 (12:09 -0600)]
mesa: restore GL_EXT_depth_bounds_test state in glPopAttrib()
Spotted by inspection. Untested (no piglit test).
Signed-off-by: Brian Paul <brianp@vmware.com>
Brian Paul [Fri, 15 May 2015 17:22:25 +0000 (11:22 -0600)]
mesa: fix glPushAttrib(0) / glPopAttrib() error
If the glPushAttrib() mask value was zero we didn't actually push
anything onto the attribute stack. A subsequent glPopAttrib() call
would generate a GL_STACK_UNDERFLOW error. Now push a dummy attribute
in that case to prevent the error.
Mesa now matches nvidia's behavior.
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Timothy Arceri [Tue, 2 Jun 2015 09:26:42 +0000 (19:26 +1000)]
nir: use src for ssa helper
Reviewed-by: Thomas Helland <thomashelland90@gmail.com>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Timothy Arceri [Sun, 31 May 2015 22:00:14 +0000 (08:00 +1000)]
nir: remove extra semicolon
Reviewed-by: Thomas Helland <thomashelland90@gmail.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Matt Turner [Mon, 1 Jun 2015 19:22:54 +0000 (12:22 -0700)]
prog_to_nir: Remove OPCODE_MOV special case.
OPCODE_MOV is in the op_trans[] array.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Matt Turner [Mon, 1 Jun 2015 19:19:30 +0000 (12:19 -0700)]
prog_to_nir: Remove from op_trans[] opcodes handled in the switch.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Eduardo Lima Mitev [Tue, 2 Jun 2015 11:42:46 +0000 (13:42 +0200)]
nir: prevent use-after-free condition in should_lower_phi()
lower_phis_to_scalar() pass recurses the instruction dependence graph to
determine if all the sources of a given instruction are scalarizable.
To prevent cycles, it temporary marks the phi instruction before recursing in,
then updates the entry with the resulting value. However, it does not consider
that the entry value may have changed after a recursion pass, hence causing
a use-after-free situation and a crash.
This patch fixes this by reloading the entry corresponding to the 'phi'
after recursing and before updating its value.
The crash can be reproduced ~20% of times with the dEQP test:
dEQP-GLES3.functional.shaders.loops.while_constant_iterations.nested_sequence_fragment
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
Kenneth Graunke [Sat, 30 May 2015 18:19:28 +0000 (11:19 -0700)]
i965: Add Gen8+ VS dispatch_mode assertion.
Suggested by Ben Widawsky.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
Kenneth Graunke [Sat, 30 May 2015 06:02:56 +0000 (23:02 -0700)]
i965: Drop LOAD_PAYLOAD workaround in fs_visitor::emit_urb_writes().
Now that Jason's LOAD_PAYLOAD improvements have landed, we don't need
this. Passing 1 for the number of header registers already takes care
of setting force_writemask_all on the header copy.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Kenneth Graunke [Wed, 13 May 2015 21:45:45 +0000 (14:45 -0700)]
i965: Use proper pitch for scalar GS pull constants and UBOs.
See the corresponding code in brw_vs_surface_state.c.
v2: const more things (requested by Topi Pohjolainen)
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
Kenneth Graunke [Thu, 12 Mar 2015 04:18:42 +0000 (21:18 -0700)]
i965: Create a shader_dispatch_mode enum to replace VS/GS fields.
We used to store the GS dispatch mode in brw_gs_prog_data while
separately storing the VS dispatch mode in brw_vue_prog_data::simd8.
This patch introduces an enum to represent all possible dispatch modes,
and stores it in brw_vue_prog_data::dispatch_mode, unifying the two.
Based on a suggestion by Matt Turner.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
Kenneth Graunke [Mon, 11 May 2015 06:33:30 +0000 (23:33 -0700)]
i965: Drop "Vector Mask Enable" bit from 3DSTATE_GS on Gen8+.
The documentation makes it pretty clear that we shouldn't use this:
"Under normal conditions SW shall specify DMask, as the GS stage
will provide a Dispatch Mask appropriate to SIMD4x2 or SIMD8 thread
execution (as a function of dispatch mode). E.g., for SIMD4x2
execution, the GS stage will generate a Dispatch Mask that is equal
to what the EU would use as the Vector Mask. For SIMD8 execution
there is no known usage model for use of Vector Mask (as there is
for PS shaders)."
I also managed to find descriptions of DMask and VMask, in the "State
Register" (sr0.2/3) field descriptions:
"Dispatch Mask (DMask). This 32-bit field specifies which channels
are active at Dispatch time."
"Vector Mask (VMask). This 32-bit field contains, for each 4-bit
group, the OR of the corresponding 4-bit group in the dispatch
mask."
SIMD4x2 shaders process one or two vec4 values, with each 4-bit group
corresponding to xyzw channel enables (either all on, or all off).
Thus, DMask = VMask in SIMD4x2 mode. But in SIMD8 mode, 4-bit groups
are meaningless, so it just messes up your values.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
Brian Paul [Mon, 1 Jun 2015 13:40:34 +0000 (07:40 -0600)]
docs: update GL_ARB_copy_image, GL_ARB_clear_texture gallium status
VMware is working on these.
Signed-off-by: Brian Paul <brianp@vmware.com>
Brian Paul [Fri, 29 May 2015 22:02:44 +0000 (16:02 -0600)]
gallium/util: silence silence unused var warnings for non-debug build
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Brian Paul [Fri, 29 May 2015 22:01:37 +0000 (16:01 -0600)]
egl/dri2: silence uninitialized variable warnings
And update assertions to be more informative.
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Brian Paul [Fri, 29 May 2015 22:00:52 +0000 (16:00 -0600)]
gallivm: silence unused var warnings for non-debug build
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Brian Paul [Fri, 29 May 2015 22:00:14 +0000 (16:00 -0600)]
pipebuffer: silence unused var warnings for non-debug build
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Brian Paul [Fri, 29 May 2015 21:59:50 +0000 (15:59 -0600)]
st/mesa: silence unused var warnings for non-debug build
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Brian Paul [Fri, 29 May 2015 21:59:27 +0000 (15:59 -0600)]
draw: silence unused var warnings for non-debug build
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Jose Fonseca [Fri, 29 May 2015 13:33:18 +0000 (14:33 +0100)]
gallivm: Remove stub disassemblerSymbolLookupCB.
It's incompletete -- it wasn't filling ReferenceType so it was causing
garbagge on the disassembly. Furthermore it seems impossible to get the
jump information through this interface.
The solution for function size problem is to effectively book-keep the
machine code start and end address while JIT'ing.
Neil Roberts [Fri, 29 May 2015 12:41:48 +0000 (13:41 +0100)]
i965: Don't add base_binding_table_index if it's zero
When calculating the binding table index for non-constant sampler
array indexing it needs to add the base binding table index which is a
constant within the generated code. Often this base is zero so we can
avoid a redundant instruction in that case.
It looks like nothing in shader-db is doing non-constant sampler array
indexing so this patch doesn't make any difference but it might be
worth having anyway.
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
Acked-by: Ben Widawsky <ben@bwidawsk.net>
Neil Roberts [Thu, 28 May 2015 14:27:31 +0000 (15:27 +0100)]
i965: Don't use a temporary when generating an indirect sample
Previously when generating the send instruction for a sample
instruction with an indirect sampler it would use the destination
register as a temporary store. This breaks when used in combination
with the opt_sampler_eot optimisation because that forces the
destination to be null. This patch fixes that by avoiding the temp
register altogether.
The reason the temporary register was needed was because it was trying
to ensure the binding table index doesn't overflow a byte by and'ing
it with 0xff. The result is then or'd with samper_index<<8. This patch
instead just and's the whole thing by 0xfff. This will ensure that a
bogus sampler index won't overflow into the rest of the message
descriptor but unlike the previous code it won't ensure that the
binding table index doesn't overflow into the sampler index. It
doesn't seem like that should matter very much though because if the
shader is generating a bogus sampler index then it's going to just get
garbage out either way.
Instead of doing sampler_index<<8|(sampler_index+base_table_index) the
new code avoids one operation by doing
sampler_index*0x101+base_table_index which should be equivalent.
However if we wanted to avoid the multiply for some reason we could do
this by adding an extra or instruction still without needing the
temporary register.
This fixes a number of Piglit tests on Skylake that were using
indirect samplers such as:
spec@arb_gpu_shader5@execution@sampler_array_indexing@fs-simple
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
Acked-by: Ben Widawsky <ben@bwidawsk.net>
Tested-by: Anuj Phogat <anuj.phogat@gmail.com>
Eric Anholt [Sat, 30 May 2015 04:27:53 +0000 (21:27 -0700)]
vc4: Don't bother with safe list traversal in CSE.
We don't remove or move instructions.
Eric Anholt [Sat, 30 May 2015 01:19:42 +0000 (18:19 -0700)]
vc4: Convert from simple_list.h to list.h
list.h is a nicer and more familiar set of list functions/macros.
Eric Anholt [Sat, 30 May 2015 01:06:32 +0000 (18:06 -0700)]
vc4: Make sure we allocate idle BOs from the cache.
We were returning the most recently freed BO, without checking if it
was idle yet. This meant that we generally stalled immediately on the
previous frame when generating a new one. Instead, allocate new BOs
when the *oldest* BO is still busy, so that the cache scales with how
much is needed to keep some frames outstanding, as originally
intended.
Note that if you don't have some throttling happening, this means that
you can accidentally run the system out of memory. The kernel is now
applying some throttling on all execs, to hopefully avoid this.
Eric Anholt [Sat, 30 May 2015 00:21:15 +0000 (17:21 -0700)]
vc4: Fix return value handling for BO waits.
If the wait ever returned -ETIME, we'd abort because the errno was
stored in errno and not drmIoctl()'s return value.
Timothy Arceri [Fri, 29 May 2015 11:47:53 +0000 (21:47 +1000)]
mesa: remove unused function declaration
Reviewed-by: Matt Turner <mattst88@gmail.com>
Brian Paul [Fri, 29 May 2015 17:28:58 +0000 (11:28 -0600)]
dri_util: make version var unsigned to silence warnings
_mesa_override_gl_version_contextless() takes an unsigned version
parameter.
Reviewed-by: Matt Turner <mattst88@gmail.com>
Ben Widawsky [Thu, 28 May 2015 00:55:02 +0000 (17:55 -0700)]
i965: Disable compaction for EOT send messages
AFAICT, there is no real way to make sure a send message with EOT is properly
ignored from compact, nor can I see a way to actually encode EOT while
compacting. Before the single send optimization we'd always bail because we hit
the is_immediate && !is_compactable_immediate case. However, with single send,
is_immediate is not true, and so we end up trying to compact the un-compactible.
Without this, any compacting single send instruction will hang because the EOT
isn't there. I am not sure how I didn't hit this when I originally enabled the
optimization. I didn't check if some surrounding code changed.
I know Neil and Matt were both looking into this. I did a quick search and
didn't see any patches out there to handle this. Please ignore if this has
already been sent by someone. (Direct me to it and I will review it).
Reported-by: Neil Roberts <neil@linux.intel.com>
Reported-by: Mark Janes <mark.a.janes@intel.com>
Tested-by: Mark Janes <mark.a.janes@intel.com>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Roland Scheidegger [Fri, 29 May 2015 16:17:24 +0000 (18:17 +0200)]
gallivm: make sampling more robust when the sampler setup is bogus
Pure integer formats cannot be sampled with linear tex / mip filters. In GL
such a setup would make the texture incomplete.
We shouldn't rely on the state tracker though to filter that out, just return
all zeros instead of dying in the lerp.
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Jose Fonseca [Fri, 29 May 2015 11:13:36 +0000 (12:13 +0100)]
configure.ac: Link mcdisassembler component.
gallivm now depends on it. And depending on particular LLVM version /
configure options, the build can fail without this change due to
undefined reference to `LLVM*Disasm*' symbols.
Trivial.
Jose Fonseca [Fri, 29 May 2015 10:58:58 +0000 (11:58 +0100)]
configure.ac: Don't bother checking whether LLVM's MCJIT component is available.
Now that we require LLVM 3.3, MCJIT is guaranteed to be available.
Trvial.
Jose Fonseca [Thu, 28 May 2015 15:55:10 +0000 (16:55 +0100)]
gallivm: Use the LLVM's C disassembly interface.
It doesn't do everything we want. In particular it doesn't allow to
detect jumps or return opcodes. Currently we detect the x86's RET
opcode.
Even though it's worse for LLVM 3.3, it's an improvement for LLVM 3.7,
which was totally busted.
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Jose Fonseca [Thu, 28 May 2015 14:35:14 +0000 (15:35 +0100)]
gallivm: Disable frame pointer omission on LLVM 3.7.
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Marek Olšák [Tue, 26 May 2015 10:47:03 +0000 (12:47 +0200)]
configure.ac: enable building GLES1 and GLES2 by default
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Marek Olšák [Tue, 26 May 2015 17:32:36 +0000 (19:32 +0200)]
st/dri: fix postprocessing crash when there's no depth buffer
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89131
Cc: 10.6 10.5 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
Marek Olšák [Tue, 26 May 2015 22:15:16 +0000 (00:15 +0200)]
radeon/llvm: reset temps_count on deallocation
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Marek Olšák [Tue, 26 May 2015 13:35:10 +0000 (15:35 +0200)]
radeon/llvm: don't use a static array size for radeon_llvm_context::arrays (v2)
v2: - don't use realloc (tgsi_shader_info provides the size)
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Dave Airlie [Wed, 27 May 2015 01:11:06 +0000 (11:11 +1000)]
softpipe: fix offset wrapping calculations (v2)
Roland pointed out my previous attempt was lacking, so I enhanced the
texwrap piglit test, and tested them. This fixes the offset calculations
in a number of areas by adding the offset first, it also fixes the fastpaths,
which I forgot to address in the previous commit.
v2: try and avoid divides in most paths, the repeat mirror path
really was ugly no matter which way I went, so I left it having
the divide.
Also fix the gather lod calculation bug.
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Jason Ekstrand [Wed, 20 May 2015 19:03:33 +0000 (12:03 -0700)]
i965/vs: Rework the logic for generating NIR from ARB vertex programs
Whether or not to use NIR is now equivalent to brw->scalar_vs. We can
simplify the logic and make it far less confusing.
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Jason Ekstrand [Wed, 20 May 2015 17:35:34 +0000 (10:35 -0700)]
i965/fs: Remove the ir_visitor code
Now that everything is running through NIR, this is all dead.
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Jason Ekstrand [Wed, 20 May 2015 17:39:03 +0000 (10:39 -0700)]
i965: Remove the old fragment program code
Now that everything is running through NIR, this is all dead.
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Jason Ekstrand [Wed, 20 May 2015 17:03:50 +0000 (10:03 -0700)]
i965: Make NIR non-optional for scalar shaders
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Jason Ekstrand [Wed, 20 May 2015 16:45:47 +0000 (09:45 -0700)]
i965: Make fs/vec4_visitor inherit from ir_visitor directly
This is using multiple inheritance in C++. However, ir_visitor is really
just an interface with no data so it shouldn't be so bad.
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Jason Ekstrand [Wed, 20 May 2015 16:44:01 +0000 (09:44 -0700)]
i965: Rename backend_visitor to backend_shader
The backend_shader class really is a representation of a shader. The fact
that it inherits from ir_visitor is somewhat immaterial.
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Ian Romanick [Mon, 18 May 2015 20:56:45 +0000 (13:56 -0700)]
mesa: Enable ARB_direct_state_access by default for core profile
And core profile only.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Fredrik Höglund <fredrik@kde.org>
Cc: "10.6" <mesa-stable@lists.freedesktop.org>
Ian Romanick [Thu, 21 May 2015 03:19:07 +0000 (20:19 -0700)]
dispatch_sanity: Validate the compatibility profile dispatch table too
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Suggested-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: "10.6" <mesa-stable@lists.freedesktop.org>
Ian Romanick [Thu, 21 May 2015 03:17:19 +0000 (20:17 -0700)]
dispatch_sanity: Split list of GL 3.1 functions in to core and common
The next patch will add a test for compatibility profile dispatch, and
it seems to make more sense to share the lists.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Cc: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: "10.6" <mesa-stable@lists.freedesktop.org>
Ian Romanick [Thu, 21 May 2015 03:13:12 +0000 (20:13 -0700)]
mesa: Don't install glVertexAttribL* functions in compatibility profile
GL_ARB_vertex_attrib_64bit is exclusive to core profile, and none of the
other functions added by the extension are advertised in other profiles.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Cc: Dave Airlie <airlied@redhat.com>
Cc: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: "10.6" <mesa-stable@lists.freedesktop.org>
Ian Romanick [Tue, 19 May 2015 18:48:11 +0000 (11:48 -0700)]
glapi: Make GL_ARB_direct_state_access functions exclusive to core profile
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Cc: Dave Airlie <airlied@redhat.com>
Cc: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: Dylan Baker <baker.dylan.c@gmail.com>
Cc: "10.6" <mesa-stable@lists.freedesktop.org>
Ian Romanick [Tue, 19 May 2015 18:24:26 +0000 (11:24 -0700)]
glapi: Store exec table version info outside the XML
Currently on the functions that are exclusive to core-profile are
implemented. The remainder continue to live in the XML. Additional
functions can be moved later.
The functions for GL_ARB_draw_indirect and GL_ARB_multi_draw_indirect
are put in the dispatch table inside the VBO module, so they do not need
to be moved over.
The diff of src/mesa/main/api_exec.c before and after this patch is as
expected. All of the functions listed in apiexec.py moved out of a 'if
(_mesa_is_desktop(ctx))' block into a new 'if (ctx->API ==
API_OPENGL_CORE)' block.
v2: Remove stray shebang line in apiexec.py. Suggested by Ilia.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: Dave Airlie <airlied@redhat.com>
Cc: Dylan Baker <baker.dylan.c@gmail.com>
Cc: "10.6" <mesa-stable@lists.freedesktop.org>
Ian Romanick [Mon, 18 May 2015 20:55:04 +0000 (13:55 -0700)]
Revert "mesa: Add an extension flag for ARB_direct_state_access"
This reverts commit
30dcaaec356cc117d7227c6680620cd50ff534e7.
Acked-by: Fredrik Höglund <fredrik@kde.org>
Cc: "10.6" <mesa-stable@lists.freedesktop.org>
Ian Romanick [Thu, 21 May 2015 00:19:29 +0000 (17:19 -0700)]
mesa: Use the profile instead of an extension bit to validate GL_TEXTURE_CUBE_MAP
The extension on which this depends will always be enabled in core
profile, and the extension bit is about to be removed.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Fredrik Höglund <fredrik@kde.org>
Cc: "10.6" <mesa-stable@lists.freedesktop.org>
Ian Romanick [Mon, 18 May 2015 20:54:55 +0000 (13:54 -0700)]
Revert "mesa: Add ARB_direct_state_access checks in XFB functions"
This reverts commit
7d212765a470972f4712e42caf6406b257220369.
Acked-by: Fredrik Höglund <fredrik@kde.org>
Cc: "10.6" <mesa-stable@lists.freedesktop.org>
Ian Romanick [Mon, 18 May 2015 20:54:39 +0000 (13:54 -0700)]
Revert "mesa: Add ARB_direct_state_access checks in buffer object functions"
This reverts commit
339ed0984d4f54fca91235a1df2ce3a850f6123f.
Acked-by: Fredrik Höglund <fredrik@kde.org>
Cc: "10.6" <mesa-stable@lists.freedesktop.org>
Ian Romanick [Mon, 18 May 2015 20:54:35 +0000 (13:54 -0700)]
Revert "mesa: Add ARB_direct_state_access checks in FBO functions"
This reverts commit
6ad0b7e07a0445e9e0f368e079c4f7b8a6757bb3.
Acked-by: Fredrik Höglund <fredrik@kde.org>
Cc: "10.6" <mesa-stable@lists.freedesktop.org>
Ian Romanick [Mon, 18 May 2015 20:54:29 +0000 (13:54 -0700)]
Revert "mesa: Add ARB_direct_state_access checks in renderbuffer functions"
This reverts commit
cb49940766b581c6656473d89c221653c69fa0f9.
Acked-by: Fredrik Höglund <fredrik@kde.org>
Cc: "10.6" <mesa-stable@lists.freedesktop.org>
Ian Romanick [Mon, 18 May 2015 20:54:25 +0000 (13:54 -0700)]
Revert "mesa: Add ARB_direct_state_access checks in texture functions"
This reverts commit
8940957238e8584ce27295791cee4cc3d6f7cf1e.
Acked-by: Fredrik Höglund <fredrik@kde.org>
Cc: "10.6" <mesa-stable@lists.freedesktop.org>
Ian Romanick [Mon, 18 May 2015 20:54:21 +0000 (13:54 -0700)]
Revert "mesa: Add ARB_direct_state_access checks in VAO functions"
This reverts commit
36b05793372b86b914d9b95d0188f5f387e01d68.
Acked-by: Fredrik Höglund <fredrik@kde.org>
Cc: "10.6" <mesa-stable@lists.freedesktop.org>
Ian Romanick [Mon, 18 May 2015 20:54:18 +0000 (13:54 -0700)]
Revert "mesa: Add ARB_direct_state_access checks in sampler object functions"
This reverts commit
9e7149c8986348bf9567f049444783ef52775f4e.
Acked-by: Fredrik Höglund <fredrik@kde.org>
Cc: "10.6" <mesa-stable@lists.freedesktop.org>
Ian Romanick [Mon, 18 May 2015 20:54:15 +0000 (13:54 -0700)]
Revert "mesa: Add ARB_direct_state_access checks in program pipeline functions"
This reverts commit
bebf3c6ab314bde05ac5a3b4d3e63fd36243c58e.
Acked-by: Fredrik Höglund <fredrik@kde.org>
Cc: "10.6" <mesa-stable@lists.freedesktop.org>
Ian Romanick [Mon, 18 May 2015 20:54:11 +0000 (13:54 -0700)]
Revert "mesa: Add ARB_direct_state_access checks in query object functions"
This reverts commit
d3368e0c9e27ced6059eb2ecdf2aa999a00e90b0.
Acked-by: Fredrik Höglund <fredrik@kde.org>
Cc: "10.6" <mesa-stable@lists.freedesktop.org>
Ian Romanick [Mon, 18 May 2015 20:54:08 +0000 (13:54 -0700)]
Revert "i915: Enable ARB_direct_state_access"
This reverts commit
121030eed8fc41789d2f4f7517bbc0dd6199667b.
Acked-by: Fredrik Höglund <fredrik@kde.org>
Cc: "10.6" <mesa-stable@lists.freedesktop.org>
Ian Romanick [Mon, 18 May 2015 20:53:58 +0000 (13:53 -0700)]
Revert "i965: Enable ARB_direct_state_access"
This reverts commit
a57feba0a35de35728269aeb26b039e4f2393d69.
Acked-by: Fredrik Höglund <fredrik@kde.org>
Cc: "10.6" <mesa-stable@lists.freedesktop.org>
Ian Romanick [Mon, 18 May 2015 20:53:49 +0000 (13:53 -0700)]
Revert "st/mesa: Enable ARB_direct_state_access"
This reverts commit
357bf80caade9e0be20dcc88ec38884e34abc986.
Acked-by: Fredrik Höglund <fredrik@kde.org>
Cc: "10.6" <mesa-stable@lists.freedesktop.org>
Ian Romanick [Wed, 29 Apr 2015 23:12:40 +0000 (16:12 -0700)]
mesa: Allow overriding the version of ES2+ contexts
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Ian Romanick [Tue, 26 May 2015 19:07:13 +0000 (12:07 -0700)]
mesa: Add support for a new override string MESA_GLES_VERSION_OVERRIDE
The string is only applied when the context is API_OPENGLES2.
The bulk of the change is to prevent overriding the context to
API_OPENGL_CORE based on the requested version. If the context is
API_OPENGL_ES2, don't change it.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Ian Romanick [Tue, 26 May 2015 19:14:39 +0000 (12:14 -0700)]
dri_util: Use _mesa_override_gl_version_contextless
Remove _mesa_get_gl_version_override. We don't need two functions that
do basically the same thing. This change seemed easier (esp. with the
next patch) than going the other way.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Ian Romanick [Tue, 28 Apr 2015 20:13:47 +0000 (13:13 -0700)]
mesa/es3.1: Enable ES 3.1 API and shading language version
This is a bit of a hack for now. Several of the extensions required for
OpenGL ES 3.1 have no support, at all, in Mesa. However, with this
patch and a patch to allow MESA_GL_VERSION_OVERRIDE to work with ES
contexts, people can begin testing the ES "version" of the functionality
that is supported.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Ian Romanick [Wed, 29 Apr 2015 01:00:43 +0000 (18:00 -0700)]
gles/es3.1: Enable dispatch of almost all new GLES 3.1 functions
A couple functions are missing because there are no implementations of
them yet. These are:
glFramebufferParameteri (from GL_ARB_framebuffer_no_attachments)
glGetFramebufferParameteriv (from GL_ARB_framebuffer_no_attachments)
glMemoryBarrierByRegion
v2: Rebase on updated dispatch_sanity.cpp test.
v3: Add support for glDraw{Arrays,Elements}Indirect in vbo_exec_array.c.
The updated dispatch_sanity.cpp test discovered this omission.
v4: Rebase on glapi changes.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Jason Ekstrand [Mon, 25 May 2015 16:31:55 +0000 (09:31 -0700)]
i965/fs: Properly handle explicit depth in SIMD16 with dual-source blend
Cc: "10.6" <mesa-stable@lists.freedesktop.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90629
Tested-by: Markus Wick <markus@selfnet.de>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Matt Turner [Wed, 27 May 2015 19:19:07 +0000 (12:19 -0700)]
i965: Silence warning in 3-src type-setting.
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Matt Turner [Wed, 27 May 2015 17:44:45 +0000 (10:44 -0700)]
i965/fs: Fix lowering of integer multiplication with cmod.
If the multiplication's result is unused, except by a conditional_mod,
the destination will be null. Since the final instruction in the lowered
sequence is a partial-write, we can't put the conditional mod on it and
we have to store the full result to a register and do a MOV with a
conditional mod.
Cc: "10.6" <mesa-stable@lists.freedesktop.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90580
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Iago Toral Quiroga [Thu, 28 May 2015 07:06:33 +0000 (09:06 +0200)]
nir: Fix output swizzle in get_mul_for_src
When we compute the output swizzle we want to consider the number of
components in the add operation. So far we were using the writemask
of the multiplication for this instead, which is not correct.
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
Jose Fonseca [Thu, 28 May 2015 09:11:36 +0000 (10:11 +0100)]
gallivm: Workaround LLVM PR23628.
Temporarily undefine DEBUG macro while including LLVM C++ headers,
leveraging the push/pop_macro pragmas, which are supported both by GCC
and MSVC.
https://bugs.freedesktop.org/show_bug.cgi?id=90621
Trivial.
Eric Anholt [Wed, 15 Apr 2015 05:42:02 +0000 (22:42 -0700)]
vc4: Just stream out fallback IB contents.
The idea I had when I wrote the original shadow code was that you'd see a
set_index_buffer to the IB, then a bunch of draws out of it. What's
actually happening in openarena is that set_index_buffer occurs at every
draw, so we end up making a new shadow BO every time, and converting more
of the BO than is actually used in the draw.
While I could maybe come up with a better caching scheme, for now just
do the simple thing that doesn't result in a new shadow IB allocation
per draw.
Improves performance of isosurf in drawelements mode by 58.7967% +/-
3.86152% (n=8).
Eric Anholt [Wed, 27 May 2015 23:20:28 +0000 (16:20 -0700)]
vc4: Don't try to put our dmabuf-exported BOs into the BO cache.
We'd sometimes try to reallocate something that X was using as a new
pipe_resource, and potentially conflict in our rendering. But even
worse, if we reallocated the BO as a shader, the kernel would reject
rendering using the shader.
Eric Anholt [Wed, 27 May 2015 23:01:00 +0000 (16:01 -0700)]
vc4: Don't forget to make our raster shadow textures non-raster.
Not sure what happened in my testing that made the previous shadow
code fix glxgears swapbuffering, but this also fixes lots of CopyArea
in X (like dragging xlogo around in metacity).
Samuel Pitoiset [Fri, 22 May 2015 10:45:43 +0000 (12:45 +0200)]
vc4: make vc4_begin_query() return a boolean
I forgot to make the change in
96f164f6f047833091eb98a73aa80c31dc94f962.
This fixes a warning with GCC and probably an error with Clang.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Ben Widawsky [Thu, 21 May 2015 02:20:14 +0000 (19:20 -0700)]
i965: Emit 3DSTATE_MULTISAMPLE before WM_HZ_OP (gen8+)
Starting with GEN8, there is documentation that the multisample state command
must be emitted before the 3DSTATE_WM_HZ_OP command any time the multisample
count changes. The 3DSTATE_WM_HZ_OP packet gets emitted as a result of a
intel_hix_exec(), which is called upon a fast clear and/or a resolve. This can
happen before the state atoms are checked, and so the multisample state must be
put directly in the function.
v1:
- In v0, I was always emitting the command, but Ken came up with the condition to
determine whether or not the sample count actually changed.
- Ken's recommendation was to set brw->num_multisamples after emitting
3DSTATE_MULTISAMPLE. This doesn't work. I put my best guess as to why in the XXX
(it was causing 7 regressions on BDW).
v2:
Flag NEW_MULTISAMPLE state. As Ken found, in state upload we check for the
multisample change to determine whether or not to emit certain packets. Since
the hiz code doesn't actually care about the number of multisamples, set the
flag and let the later code take care of it.
Jenkins results:
http://otc-mesa-ci.jf.intel.com/view/dev/job/bwidawsk/136/
Fixes around 200 piglit tests on SKL. I'm somewhat surprised that it seems to
have no impact on BDW as the restriction is needed there as well.
Cc: "10.5 10.6" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Reviewed-by: Neil Roberts <neil@linux.intel.com> (v0)
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> (v2)
Vinson Lee [Wed, 27 May 2015 05:18:28 +0000 (22:18 -0700)]
gallivm: Do not use NoFramePointerElim with LLVM 3.7.
TargetOptions::NoFramePointerElim was removed in llvm-3.7.0svn r238244
"Remove NoFramePointerElim and NoFramePointerElimOverride from
TargetOptions and remove ExecutionEngine's dependence on CodeGen. NFC."
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Kenneth Graunke [Thu, 21 May 2015 14:53:09 +0000 (07:53 -0700)]
i965: Remove _NEW_MULTISAMPLE dirty bit from 3DSTATE_PS_EXTRA.
BRW_NEW_NUM_SAMPLES is sufficient.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
Kenneth Graunke [Sat, 23 May 2015 21:27:40 +0000 (14:27 -0700)]
i965: Delete GS scratch space workaround warning.
This workaround is documented in the 3DSTATE_GS documentation. It
appears to only apply to early steppings of Broadwell and Skylake.
I don't think it ever affected production hardware, so at this point it
probably makes sense to delete it.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
EdB [Mon, 11 May 2015 15:45:08 +0000 (17:45 +0200)]
clover: Log build options when dumping clc source.
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Ian Romanick [Tue, 26 May 2015 18:41:44 +0000 (11:41 -0700)]
glapi: Encapsulate nop table knowledge in new _mesa_new_nop_table function
Encapsulate the knowledge about how to build the nop table in a new
_mesa_new_nop_table function. This makes it easier for dispatch_sanity
to keep working now and in the future.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Tested-by: Mark Janes <mark.a.janes@intel.com>
Cc: 10.6 <mesa-stable@lists.freedesktop.org>
Thomas Helland [Tue, 26 May 2015 18:14:00 +0000 (12:14 -0600)]
docs: Fix some typos in the developer notes
Found when double-checking my review on Brian's series.
Signed-off-by: Thomas Helland <thomashelland90@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Brian Paul [Fri, 15 May 2015 15:08:14 +0000 (09:08 -0600)]
mesa: do not use _glapi_new_nop_table() for DRI builds
Commit
4bdbb588a9d38 introduced new _glapi_new_nop_table() and
_glapi_set_nop_handler() functions in the glapi dispatcher (which
live in libGL.so). The calls to those functions from context.c
would be undefined (i.e. an ABI break) if the libGL used at runtime
was older.
For the time being, use the old single generic_nop() function for
non-Windows builds to avoid this problem. At some point in the future
it should be safe to remove this work-around. See comments for more
details.
v2: Incorporate feedback from Emil. Use _WIN32 instead of
GLX_DIRECT_RENDERING to control behavior, move comments.
Cc: 10.6 <mesa-stable@lists.freedesktop.org>
Reviewed-and-tested-by: Ian Romanick <ian.d.romanick@intel.com>
Brian Paul [Tue, 26 May 2015 17:30:22 +0000 (11:30 -0600)]
docs: add information about reviewing patches
Reviewed-by: Matt Turner <mattst88@gmail.com>
Brian Paul [Mon, 25 May 2015 16:18:35 +0000 (10:18 -0600)]
docs: update the coding style information
This hasn't been updated in a long time and from recent discussion on
the mailing list, it's not always clear what's expected. Hopefully,
this will help a bit.
v2: document function brace placement, per Thomas Helland.
Reviewed-by: Thomas Helland <thomashelland90@gmail.com>
Brian Paul [Mon, 25 May 2015 15:42:04 +0000 (09:42 -0600)]
docs: update documentation about patch formatting, testing, etc
v2: correctly escape < and > chars.
Reviewed-by: Thomas Helland <thomashelland90@gmail.com>
Brian Paul [Mon, 25 May 2015 15:13:09 +0000 (09:13 -0600)]
docs: reorganize devnotes.html file
Move "Adding Extensions" to the end. Add a simple table of contents
at the top.
Reviewed-by: Thomas Helland <thomashelland90@gmail.com>