Commit Graph

76701 Commits

Author SHA1 Message Date
Tim Rowley
7bb193d28c mesa/build: add OpenSWR to build
Tested on Linux (centos, ubuntu, and suse variants)

Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Acked-by: Jose Fonseca <jfonseca@vmware.com>
2016-03-02 18:38:42 -06:00
Tim Rowley
d003be2a30 gallium/docs - add OpenSWR documentation
Acked-by: Jose Fonseca <jfonseca@vmware.com>
2016-03-02 18:38:41 -06:00
Tim Rowley
da4f95d168 gallium/target-helpers: add OpenSWR driver
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Acked-by: Jose Fonseca <jfonseca@vmware.com>
2016-03-02 18:38:41 -06:00
Tim Rowley
ea37602273 gallium/auxilary: more __cplusplus exports
swr driver which is written in C++ needs access to some more
gallium utility functions than are currently exposed.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Acked-by: Jose Fonseca <jfonseca@vmware.com>
2016-03-02 18:38:41 -06:00
Tim Rowley
c6e67f5a93 gallium/swr: add OpenSWR rasterizer
Acked-by: Roland Scheidegger <sroland@vmware.com>
Acked-by: Jose Fonseca <jfonseca@vmware.com>
2016-03-02 18:38:41 -06:00
Tim Rowley
2b2d3680bf gallium/swr: add OpenSWR driver
OpenSWR is a new software rasterizer for x86 processors designed
for high performance and high scalablility on visualization workloads.

Acked-by: Roland Scheidegger <sroland@vmware.com>
Acked-by: Jose Fonseca <jfonseca@vmware.com>
2016-03-02 18:38:41 -06:00
Timothy Arceri
2eec41f6f1 glsl: replace remaining tabs in ir_builder.cpp
Reviewed-by: Thomas Helland <thomashelland90@gmail.com>
2016-03-03 11:25:57 +11:00
Anuj Phogat
7026f27e33 mesa: Update comment
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
2016-03-02 15:06:46 -08:00
Anuj Phogat
6ccead5b48 mesa: Fix function description
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
2016-03-02 15:06:46 -08:00
Anuj Phogat
de61849994 meta: Remove the 'allocate_storage' parameter in _mesa_meta_pbo_GetTexSubImage()
Texture is already allocated before calling this meta function. So,
the value of 'allocate_storage' passed to the function is always false.

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
2016-03-02 15:06:46 -08:00
Anuj Phogat
6d4ebbe9e5 meta: Fix the pbo usage in meta for GLES{1,2} contexts
OpenGL ES 1.0 doesn't support using GL_STREAM_DRAW and both
ES 1.0 and 2.0 don't support GL_STREAM_READ in glBufferData().
So, handle it correctly by calling the _mesa_meta_begin()
before create_texture_for_pbo().

V2: Remove the changes related to allocate_storage. (Ian)

Cc: <mesa-stable@lists.freedesktop.org>
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2016-03-02 15:06:45 -08:00
Matt Turner
0d047d10f1 program: Clean up after condition code removal. 2016-03-02 12:15:58 -08:00
Matt Turner
961ead6746 program: Remove variable used only in assert(). 2016-03-02 12:15:58 -08:00
Matt Turner
de2ef0401b program: Drop GL_FRAGMENT_PROGRAM_NV from switch statement. 2016-03-02 12:15:58 -08:00
Samuel Pitoiset
b94a46aa8e gk110/ir: fix wrong emission of NOT modifier for VOTE
Spotted by Coverity.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reported-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
2016-03-02 20:36:18 +01:00
Thomas Hindoe Paaboel Andersen
535002f4da gallium/cso: fix indentation
Only one of these were recently introduced. However, since
we keep copy/pasting the same wrong indentation we should
probably just fix it.

Reviewed-by: Brian Paul <brianp@vmware.com>
2016-03-02 08:55:20 -07:00
Thomas Hindoe Paaboel Andersen
37cfc51b13 st/mesa: move dereference after null check
We should not dereference shader before we have done the
null check.

Reviewed-by: Erik Faye-Lund <kusmabite@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2016-03-02 08:55:20 -07:00
Matt Turner
ad17511302 i965/gen6/gs: Replace V-immediate with VF-immediate.
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
2016-03-02 07:28:52 -08:00
Marek Olšák
43f74ac67c gallium: fix PIPE_BIND_QUERY_BUFFER - PIPE_BIND_SCANOUT overlap
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2016-03-02 15:32:52 +01:00
Samuel Iglesias Gonsálvez
e8fd60e789 i965: set ctx->Const.MaxViewport{Width,Height} to 32k
From ARB_viewport_array spec:

" * On GL3-capable hardware the VIEWPORT_BOUNDS_RANGE should be at least
    [-16384, 16383].
  * On GL4-capable hardware the VIEWPORT_BOUNDS_RANGE should be at least
    [-32768, 32767]."

This range is set using ctx->Const.MaxViewportWidth value, so just bump
those constants to 32k for gen7+ which can support OpenGL 4.0.

Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-03-02 07:19:01 +01:00
Samuel Iglesias Gonsálvez
add57b3fa8 main: remove MAX_VIEWPORT_WIDTH and MAX_VIEWPORT_HEIGHT constants
Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-03-02 07:19:01 +01:00
Samuel Iglesias Gonsálvez
aa849d97a0 main: call invalidate_framebuffer_storage() with driver's viewport limits
Don't use hardcoded ones because the driver can set different ones.

Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-03-02 07:19:01 +01:00
Rob Clark
c4ae047cab freedreno/ir3: enable shareable shaders
Now that we are no longer using the pctx reference in the shader, drop
it and turn on shareable shaders.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
2016-03-01 19:21:45 -05:00
Rob Clark
c3f2f8cbe4 freedreno/ir3: pass ctx to constant-emit code
Rather than fishing it out of the shader.  This removes the other big
user of shader->pctx.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
2016-03-01 19:20:44 -05:00
Rob Clark
5fd152bae8 freedreno/ir3: add dev ptr to ir3_compiler
And use this for allocating bo's to hold the shader binary, rather than
accessing the dev via ctx ptr.  One step towards making shaders sharable
across contexts.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
2016-03-01 19:20:33 -05:00
Matt Turner
1be953797e mesa: Remove NV_fragment_program remnants from dlist.c.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Acked-by: Brian Paul <brianp@vmware.com>
2016-03-01 11:41:30 -08:00
Matt Turner
89abb22a85 mesa: Remove NV_fragment_program_option enable bit.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Acked-by: Brian Paul <brianp@vmware.com>
2016-03-01 11:41:30 -08:00
Matt Turner
ed72a1c118 program: Remove NV_fragment_program opcode parsing.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Acked-by: Brian Paul <brianp@vmware.com>
2016-03-01 11:41:29 -08:00
Matt Turner
5429554f09 program: Remove NV_fragment_program scalar suffix parsing.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Acked-by: Brian Paul <brianp@vmware.com>
2016-03-01 11:41:29 -08:00
Matt Turner
409c24f9cc program: Remove NV_fragment_program_option parsing support.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Acked-by: Brian Paul <brianp@vmware.com>
2016-03-01 11:41:29 -08:00
Matt Turner
fe2d2c7ad8 program: Remove NV_fragment_program Abs support.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Acked-by: Brian Paul <brianp@vmware.com>
2016-03-01 11:41:29 -08:00
Matt Turner
0d1f6c752f program: Remove incorrect comment about OPCODE_TXD.
The table in prog_instruction.h is correct.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Acked-by: Brian Paul <brianp@vmware.com>
2016-03-01 11:41:29 -08:00
Matt Turner
624d06708d program: Remove OPCODE_TXP_NV.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Acked-by: Brian Paul <brianp@vmware.com>
2016-03-01 11:41:29 -08:00
Matt Turner
aaef6cf4e3 program: Clean up after previous commit.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Acked-by: Brian Paul <brianp@vmware.com>
2016-03-01 11:41:29 -08:00
Matt Turner
7b50b0457d program: Remove condition-code and precision support.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Acked-by: Brian Paul <brianp@vmware.com>
2016-03-01 11:41:29 -08:00
Matt Turner
9e11ff7e11 program: Remove OPCODE_KIL_NV.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Acked-by: Brian Paul <brianp@vmware.com>
2016-03-01 11:41:29 -08:00
Matt Turner
a0c3650ad3 program: Remove RelAddr2 support.
Looks like more never-used crap from the first geometry shader attempt.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Acked-by: Brian Paul <brianp@vmware.com>
2016-03-01 11:41:29 -08:00
Matt Turner
6b1fb4862e program: Mark table const.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Acked-by: Brian Paul <brianp@vmware.com>
2016-03-01 11:41:29 -08:00
Matt Turner
fc61b41a95 mesa: Remove EmitCondCodes.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Acked-by: Brian Paul <brianp@vmware.com>
2016-03-01 11:41:29 -08:00
Matt Turner
7fe206da28 docs: Remove descriptions of long dead Emit* fields.
Dead since commit d8a366200 in 2010.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Acked-by: Brian Paul <brianp@vmware.com>
2016-03-01 11:41:29 -08:00
Matt Turner
f3b68fc5fc glsl: Initialize gl_shader_program::EmptyUniformLocations.
Commit 65dfb30 added exec_list EmptyUniformLocations, but only
initialized the list if ARB_explicit_uniform_location was enabled,
leading to crashes if the extension was not available.

Cc: "11.2" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
2016-03-01 11:41:29 -08:00
Ian Romanick
1a80ca22fe i965/meta: Don't pollute the framebuffer namespace
tl;dr: For many types of GL object, we can *NEVER* use the Gen function.

In OpenGL ES (all versions!) and OpenGL compatibility profile,
applications don't have to call Gen functions.  The GL spec is very
clear about how you can mix-and-match generated names and non-generated
names: you can use any name you want for a particular object type until
you call the Gen function for that object type.

Here's the problem scenario:

 - Application calls a meta function that generates a name.  The first
   Gen will probably return 1.

 - Application decides to use the same name for an object of the same
   type without calling Gen.  Many demo programs use names 1, 2, 3,
   etc. without calling Gen.

 - Application calls the meta function again, and the meta function
   replaces the data.  The application's data is lost, and the app
   fails.  Have fun debugging that.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92363
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
2016-03-01 11:07:20 -08:00
Ian Romanick
8f1b1878a0 i965/meta: Use _mesa_bind_framebuffers instead of _mesa_BindFramebuffer
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
2016-03-01 11:07:20 -08:00
Ian Romanick
3071da3032 meta: Don't pollute the framebuffer namespace
tl;dr: For many types of GL object, we can *NEVER* use the Gen function.

In OpenGL ES (all versions!) and OpenGL compatibility profile,
applications don't have to call Gen functions.  The GL spec is very
clear about how you can mix-and-match generated names and non-generated
names: you can use any name you want for a particular object type until
you call the Gen function for that object type.

Here's the problem scenario:

 - Application calls a meta function that generates a name.  The first
   Gen will probably return 1.

 - Application decides to use the same name for an object of the same
   type without calling Gen.  Many demo programs use names 1, 2, 3,
   etc. without calling Gen.

 - Application calls the meta function again, and the meta function
   replaces the data.  The application's data is lost, and the app
   fails.  Have fun debugging that.

Fixes piglit tests:
    - object-namespace-pollution glGetTexImage-compressed framebuffer
    - object-namespace-pollution glGenerateMipmap framebuffer

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92363
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
2016-03-01 11:07:20 -08:00
Ian Romanick
91e5825b8a meta/decompress: Track framebuffer using gl_framebuffer instead of GL API object handle
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
2016-03-01 11:07:20 -08:00
Ian Romanick
3ed44fab18 meta/generate_mipmap: Track framebuffer using gl_framebuffer instead of GL API object handle
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
2016-03-01 11:07:20 -08:00
Ian Romanick
ec5757f9c9 meta: Use _mesa_bind_framebuffers instead of _mesa_BindFramebuffer
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
2016-03-01 11:07:20 -08:00
Ian Romanick
7c254f0200 meta: Use _mesa_CreateFramebuffers instead of _mesa_GenFramebuffers
This enables later patches that will stop calling _mesa_GenFramebuffers
or _mesa_CreateFramebuffers which pollute the framebuffer namespace.

For framebuffers, the Bind call is still necessary.

sed -i -e 's/_mesa_GenFramebuffers/_mesa_CreateFramebuffers/' \
    src/mesa/drivers/common/*.c

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
2016-03-01 11:07:20 -08:00
Ian Romanick
6b70c9ea98 i965/meta: Use _mesa_CreateFramebuffers instead of _mesa_GenFramebuffers
This enables later patches that will stop calling _mesa_GenFramebuffers
or _mesa_CreateFramebuffers which pollute the framebuffer namespace.

For framebuffers, the Bind call is still necessary.

sed -i -e 's/_mesa_GenFramebuffers/_mesa_CreateFramebuffers/' \
    src/mesa/drivers/dri/i965/*.c

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
2016-03-01 11:07:19 -08:00
Ian Romanick
f76462cb6f meta: Save and restore the framebuffer using gl_framebuffer instead of GL API object handle
Some meta operations can be called recursively.  Future changes (the
"Don't pollute the ... namespace" changes) will cause objects with
invalid names to be used.  If a nested meta operation tries to restore
an object named 0xDEADBEEF, it will fail.

This also fixes another latent bug in meta.  In a multithreaded,
multicontext application, one thread can delete an object that is bound
in another thread.  That object continues to exist until it is unbound
(i.e., its refcount drops to zero).  Meta unbinds objects all over the
place.  As a result, the rebind in _mesa_meta_end could fail because the
object vanished!

See https://bugs.freedesktop.org/show_bug.cgi?id=92363#c8.

Using _mesa_reference_<object type> to save and restore the objects
prevents the refcount from going to zero.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92363
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
2016-03-01 11:07:19 -08:00