summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* nir/lower_io: Lower INSTNACE_INDEXJason Ekstrand2016-01-261-0/+6
|
* glsl/enums: Add an enum for Vulkan instance indexJason Ekstrand2016-01-262-0/+8
|
* genX/pipeline: Break emit_vertex_input out into common codeJason Ekstrand2016-01-263-156/+107
| | | | | | It's mostly the same and contains some non-trivial logic, so it really should be shared. Also, we're about to make some modifications here that we would really like to share.
* anv: Remove long unused anv_aub.hKristian Høgsberg Kristensen2016-01-261-153/+0
|
* anv: Dirty fragment shader descriptors in meta restoreKristian Høgsberg Kristensen2016-01-261-1/+1
| | | | | We need to reemit render targets, so dirtying VK_SHADER_STAGE_VERTEX_BIT doesn't help us much.
* anv: Reemit STATE_BASE_ADDRESS after second level cmd buffersKristian Høgsberg Kristensen2016-01-261-0/+2
| | | | | Otherwise the primary batch will continue using the state base addresses set by the secondary. Fixes remaining renderpass tests.
* anv/meta: Fix sample mask in clear pipelinesChad Versace2016-01-261-1/+1
| | | | | | Once we begin emitting the correct sample mask, genX_3DSTATE_SAMPLE_MASK_pack will hit an assertion if the mask contains too many bits.
* i965/compiler: Set nir_options.vertex_id_zero_basedJason Ekstrand2016-01-251-1/+2
|
* HACK/i965: Default to scalar GS on BDW+Jason Ekstrand2016-01-252-5/+1
|
* Merge remote-tracking branch 'mattst88/nir-lower-pack-unpack' into vulkanJason Ekstrand2016-01-25145-1268/+2303
|\
| * i965/gen7+: Use NIR for lowering of pack/unpack opcodes.Matt Turner2016-01-253-19/+29
| |
| * i965/vec4: Implement nir_op_pack_uvec2_to_uint.Matt Turner2016-01-251-0/+18
| | | | | | | | | | And mark nir_op_pack_uvec4_to_uint unreachable, since it's only produced by lowering pack[SU]norm4x8 which the vec4 backend does not need.
| * nir: Add lowering support for unpacking opcodes.Matt Turner2016-01-252-0/+32
| |
| * nir: Add lowering support for packing opcodes.Matt Turner2016-01-254-0/+66
| |
| * i965/fs: Implement support for extract_word.Matt Turner2016-01-255-0/+56
| | | | | | | | The vec4 backend will lower it.
| * nir: Add opcodes to extract bytes or words.Matt Turner2016-01-253-0/+28
| | | | | | | | The uint versions zero extend while the int versions sign extend.
| * glsl: Remove 2x16 half-precision pack/unpack opcodes.Matt Turner2016-01-259-170/+8
| | | | | | | | i965/fs was the only consumer, and we're now doing the lowering in NIR.
| * i965/fs: Switch from GLSL IR to NIR for un/packHalf2x16 lowering.Matt Turner2016-01-253-11/+7
| |
| * nir: Add lowering of nir_op_unpack_half_2x16.Matt Turner2016-01-252-4/+29
| |
| * i965: Make separate nir_options for scalar/vector stages.Matt Turner2016-01-251-28/+33
| | | | | | | | | | We'll want to have different lowering options set for scalar/vector stages.
| * i965: Move brw_compiler_create() to new brw_compiler.c.Matt Turner2016-01-255-133/+161
| | | | | | | | | | A future patch will want to use designated initalizers, which aren't available in C++, but this is C.
| * nir: Make argument order of unop_convert match binop_convert.Matt Turner2016-01-251-10/+10
| | | | | | | | Strangely the return and parameter types were reversed.
| * freedreno/a4xx: Add support for adreno 430cstout2016-01-211-0/+1
| | | | | | | | Signed-off-by: Rob Clark <[email protected]>
| * freedreno: make opc array static constChristian Gmeiner2016-01-211-1/+1
| | | | | | | | | | Signed-off-by: Christian Gmeiner <[email protected]> Signed-off-by: Rob Clark <[email protected]>
| * freedreno: implement emit_string_markerRob Clark2016-01-212-1/+28
| | | | | | | | | | | | Writes string to cmdstream in payload of a no-op packet. Signed-off-by: Rob Clark <[email protected]>
| * gallium: add GREMEDY_string_markerRob Clark2016-01-2120-0/+38
| | | | | | | | | | | | | | | | | | | | Since the GREMEDY extensions are normally only exposed by the gremedy debugger (and could possibly trigger debug paths in the app), we don't expose the extension by default, but instead only with ST_DEBUG=gremedy. Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
| * mesa: wire up EmitStringMarker for KHR_debugRob Clark2016-01-211-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | The extension spec[1] describes DEBUG_TYPE_MARKER as "Annotation of the command stream". So for DEBUG_TYPE_MARKER, also pass the buf to the driver's EmitStringMarker() to be inserted in the command stream. [1] https://www.opengl.org/registry/specs/KHR/debug.txt Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
| * mesa: add GREMEDY_string_markerRob Clark2016-01-219-0/+49
| | | | | | | | | | Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
| * texobj: Remove redundant checks that the texture cube faces match sizeNeil Roberts2016-01-211-10/+0
| | | | | | | | | | | | | | | | | | | | The texture mipmap completeness checking code was checking whether all of the faces have the same size. However this is pointless because the code just above it checks whether the face has the expected size calculated for the mipmap level anyway so the error condition could never be reached. This patch just removes it. Reviewed-by: Ian Romanick <[email protected]>
| * texobj: Fix the completeness checks for cube texturesNeil Roberts2016-01-211-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to the GL 1.4 spec section 3.8.10, a cubemap texture is only complete if: • The level base arrays of each of the six texture images making up the cube map have identical, positive, and square dimensions. • The level base arrays were each specified with the same internal format. • The level base arrays each have the same border width. Previously the texture completeness code was only checking the first point. This patch makes it additionally check the other two. This fixes the following two dEQP tests: deqp-gles2.functional.texture.completeness.cube.format_mismatch_rgba_rgb_level_0_neg_z deqp-gles2.functional.texture.completeness.cube.format_mismatch_rgb_rgba_level_0_pos_z And also this Piglit test: spec/!opengl 2.0/incomplete-cubemap-format Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93792 Cc: Ilia Mirkin <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
| * r600g: don't leak driver const buffersGrazvydas Ignotas2016-01-211-0/+6
| | | | | | | | | | | | | | | | | | | | | | The buffers are referenced from r600_update_driver_const_buffers() -> r600_set_constant_buffer() -> u_upload_data(), but nothing ever releases the reference. Similar case with driver_consts. Found using valgrind. Signed-off-by: Grazvydas Ignotas <[email protected]> Cc: <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
| * mesa: Deal with size differences between GLuint and GLhandleARB in ↵Jeremy Huddleston Sequoia2016-01-211-1/+17
| | | | | | | | | | | | | | GetAttachedObjectsARB Signed-off-by: Jeremy Huddleston Sequoia <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
| * mesa: Fix format warningsJeremy Huddleston Sequoia2016-01-211-1/+1
| | | | | | | | | | | | | | | | | | | | main/shaderapi.c:1318:51: warning: format specifies type 'unsigned int' but the argument has type 'GLhandleARB' (aka 'unsigned long') [-Wformat] _mesa_debug(ctx, "glDeleteObjectARB(%u)\n", obj); ~~ ^~~ %lu Signed-off-by: Jeremy Huddleston Sequoia <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
| * mesa: Fix some function prototype mismatchingJeremy Huddleston Sequoia2016-01-214-27/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | main/api_exec.c:543:36: warning: incompatible pointer types passing 'void (GLhandleARB, GLuint, const GLcharARB *)' (aka 'void (unsigned long, unsigned int, const char *)') to parameter of type 'void (*)(GLuint, GLuint, const GLchar *)' (aka 'void (*)(unsigned int, unsigned int, const char *)') [-Wincompatible-pointer-types] SET_BindAttribLocation(exec, _mesa_BindAttribLocation); ^~~~~~~~~~~~~~~~~~~~~~~~ ./main/dispatch.h:7590:88: note: passing argument to parameter 'fn' here static inline void SET_BindAttribLocation(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLuint, const GLchar *)) { ^ main/api_exec.c:547:31: warning: incompatible pointer types passing 'void (GLhandleARB)' (aka 'void (unsigned long)') to parameter of type 'void (*)(GLuint)' (aka 'void (*)(unsigned int)') [-Wincompatible-pointer-types] SET_CompileShader(exec, _mesa_CompileShader); ^~~~~~~~~~~~~~~~~~~ ./main/dispatch.h:7612:83: note: passing argument to parameter 'fn' here static inline void SET_CompileShader(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint)) { ^ main/api_exec.c:568:33: warning: incompatible pointer types passing 'void (GLhandleARB, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLcharARB *)' (aka 'void (unsigned long, unsigned int, int, int *, int *, unsigned int *, char *)') to parameter of type 'void (*)(GLuint, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLchar *)' (aka 'void (*)(unsigned int, unsigned int, int, int *, int *, unsigned int *, char *)') [-Wincompatible-pointer-types] SET_GetActiveAttrib(exec, _mesa_GetActiveAttrib); ^~~~~~~~~~~~~~~~~~~~~ ./main/dispatch.h:7711:85: note: passing argument to parameter 'fn' here static inline void SET_GetActiveAttrib(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLuint, GLsizei , GLsizei *, GLint *, GLenum *, GLchar *)) { ^ main/api_exec.c:571:35: warning: incompatible pointer types passing 'GLint (GLhandleARB, const GLcharARB *)' (aka 'int (unsigned long, const char *)') to parameter of type 'GLint (*)(GLuint, const GLchar *)' (aka 'int (*)(unsigned int, const char *)') [-Wincompatible-pointer-types] SET_GetAttribLocation(exec, _mesa_GetAttribLocation); ^~~~~~~~~~~~~~~~~~~~~~~ ./main/dispatch.h:7744:88: note: passing argument to parameter 'fn' here static inline void SET_GetAttribLocation(struct _glapi_table *disp, GLint (GLAPIENTRYP fn)(GLuint, const GLchar *)) { ^ main/api_exec.c:585:33: warning: incompatible pointer types passing 'void (GLhandleARB, GLsizei, GLsizei *, GLcharARB *)' (aka 'void (unsigned long, int, int *, char *)') to parameter of type 'void (*)(GLuint, GLsizei, GLsizei *, GLchar *)' (aka 'void (*)(unsigned int, int, int *, char *)') [-Wincompatible-pointer-types] SET_GetShaderSource(exec, _mesa_GetShaderSource); ^~~~~~~~~~~~~~~~~~~~~ ./main/dispatch.h:7788:85: note: passing argument to parameter 'fn' here static inline void SET_GetShaderSource(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLsizei, GLsizei *, GLchar *)) { ^ main/api_exec.c:597:29: warning: incompatible pointer types passing 'void (GLhandleARB)' (aka 'void (unsigned long)') to parameter of type 'void (*)(GLuint)' (aka 'void (*)(unsigned int)') [-Wincompatible-pointer-types] SET_LinkProgram(exec, _mesa_LinkProgram); ^~~~~~~~~~~~~~~~~ ./main/dispatch.h:7909:81: note: passing argument to parameter 'fn' here static inline void SET_LinkProgram(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint)) { ^ main/api_exec.c:628:30: warning: incompatible pointer types passing 'void (GLhandleARB, GLsizei, const GLcharARB *const *, const GLint *)' (aka 'void (unsigned long, int, const char *const *, const int *)') to parameter of type 'void (*)(GLuint, GLsizei, const GLchar *const *, const GLint *)' (aka 'void (*)(unsigned int, int, const char *const *, const int *)') [-Wincompatible-pointer-types] SET_ShaderSource(exec, _mesa_ShaderSource); ^~~~~~~~~~~~~~~~~~ ./main/dispatch.h:7920:82: note: passing argument to parameter 'fn' here static inline void SET_ShaderSource(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLsizei, const GLchar * const *, const GLint *)) { ^ main/api_exec.c:653:28: warning: incompatible pointer types passing 'void (GLhandleARB)' (aka 'void (unsigned long)') to parameter of type 'void (*)(GLuint)' (aka 'void (*)(unsigned int)') [-Wincompatible-pointer-types] SET_UseProgram(exec, _mesa_UseProgram); ^~~~~~~~~~~~~~~~ ./main/dispatch.h:8173:80: note: passing argument to parameter 'fn' here static inline void SET_UseProgram(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint)) { ^ main/api_exec.c:655:33: warning: incompatible pointer types passing 'void (GLhandleARB)' (aka 'void (unsigned long)') to parameter of type 'void (*)(GLuint)' (aka 'void (*)(unsigned int)') [-Wincompatible-pointer-types] SET_ValidateProgram(exec, _mesa_ValidateProgram); ^~~~~~~~~~~~~~~~~~~~~ ./main/dispatch.h:8184:85: note: passing argument to parameter 'fn' here static inline void SET_ValidateProgram(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint)) { main/dlist.c:9457:26: warning: incompatible pointer types passing 'void (GLhandleARB)' (aka 'void (unsigned long)') to parameter of type 'void (*)(GLuint)' (aka 'void (*)(unsigned int)') [-Wincompatible-pointer-types] SET_UseProgram(table, save_UseProgramObjectARB); ^~~~~~~~~~~~~~~~~~~~~~~~ ./main/dispatch.h:8173:80: note: passing argument to parameter 'fn' here static inline void SET_UseProgram(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint)) { ^ 1 warning generated. Signed-off-by: Jeremy Huddleston Sequoia <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
| * glapi: Build glapi_gentable.c only on DarwinAndreas Boll2016-01-213-4/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Removes the public symbol _glapi_create_table_from_handle from libGL.so.1.2.0 on all platforms except Darwin. Since the symbol is not used on other platforms it makes sense to build glapi_gentable.c only on Darwin. As a side effect it accelerates the build a bit and reduces the size of libGL.so.1.2.0 as follows: size lib/libGL.so.1.2.0 on my system shows text data bss dec hex filename 469211 21848 2720 493779 788d3 lib/libGL.so.1.2.0 before 420988 11240 2720 434948 6a304 lib/libGL.so.1.2.0 after A little bit of history: _glapi_create_table_from_handle was introduced in commit 85937f4c0d4a78d3a11e3c1fa6148640f2a9ad7b Author: Jeremy Huddleston <[email protected]> Date: Thu Jun 9 16:59:49 2011 -0700 glapi: Add API that can create a _glapi_table from a dlfcn handle Example usage: void *handle = dlopen(opengl_library_path, RTLD_LOCAL); struct _glapi_table *disp = _glapi_create_table_from_handle(handle, "gl"); Signed-off-by: Jeremy Huddleston <[email protected]> and the only user in mesa was added in commit f35913b96e743c5014e99220b1a1c5532a894d69 Author: Jeremy Huddleston <[email protected]> Date: Thu Jun 9 17:29:51 2011 -0700 apple: Use _glapi_create_table_from_handle to initialize our dispatch table Signed-off-by: Jeremy Huddleston <[email protected]> gl_gentable.py was also used for XQuartz in xserver 1.11 - 1.14. v2: Fix typos in commit message Add missing XORG_GLAPI_OUTPUTS += \ into src/mapi/glapi/gen/Makefile.am Add glapi_gentable.c to EXTRA_DIST for inclusion in the release tarball v3: Fix commit message: s/gl_gentable.c/glapi_gentable.c/ Reported-by: Arlie Davis <[email protected]> Cc: Jeremy Huddleston <[email protected]> Signed-off-by: Andreas Boll <[email protected]> Reviewed-by: Matt Turner <[email protected]>
| * mesa: Reduce libGL.so binary size by about 15%Arlie Davis2016-01-211-16/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch significantly reduces the size of the libGL.so binary. It does not change the (externally visible) behavior of libGL.so at all. gl_gentable.py generates a function, _glapi_create_table_from_handle. This function allocates a large dispatch table, consisting of 1300 or so function pointers, and fills this dispatch table by doing symbol lookups on a given shared library. Previously, gl_gentable.py would generate a single, very large _glapi_create_table_from_handle function, with a short cluster of lines for each entry point (function). The idiom it generates was a NULL check, a call to snprintf, a call to dlsym / GetProcAddress, and then a store into the dispatch table. Since this function processes a large number of entry points, this code is duplicated many times over. We can encode the same information much more compactly, by using a lookup table. The previous total size of _glapi_create_table_from_handle on x64 was 125848 bytes. By using a lookup table, the size of _glapi_create_table_from_handle (and the related lookup tables) is reduced to 10840 bytes. In other words, this enormous function is reduced by 91%. The size of the entire libGL.so binary (measured when stripped) itself drops by 15%. So the purpose of this change is to reduce the binary size, which frees up disk space, memory, etc. size lib/libGL.so.1.2.0 on my system shows (Andreas) text data bss dec hex filename 565947 11256 2720 579923 8d953 lib/libGL.so.1.2.0 before 469211 21848 2720 493779 788d3 lib/libGL.so.1.2.0 after v2: Incorporate Matt's feedback. Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Jeremy Huddleston Sequoia <[email protected]> Tested-by: Jeremy Huddleston Sequoia <[email protected]> Signed-off-by: Andreas Boll <[email protected]>
| * nv50/ir: 64-bit splitting fixesIlia Mirkin2016-01-201-1/+2
| | | | | | | | | | | | | | Take reading shader outputs into account, and use setFlagsDef for the carry since we rely on having i->flagsDef being set. Signed-off-by: Ilia Mirkin <[email protected]>
| * gk110/ir: allow carry to be set/read by imadIlia Mirkin2016-01-201-0/+4
| | | | | | | | Signed-off-by: Ilia Mirkin <[email protected]>
| * gm107/ir: add carry emission to LOP and IADDIlia Mirkin2016-01-201-0/+4
| | | | | | | | Signed-off-by: Ilia Mirkin <[email protected]>
| * gm107/ir: add ATOM and CCTL supportIlia Mirkin2016-01-201-0/+52
| | | | | | | | Signed-off-by: Ilia Mirkin <[email protected]>
| * gm107/ir: set LD/ST address width bitIlia Mirkin2016-01-201-0/+2
| | | | | | | | Signed-off-by: Ilia Mirkin <[email protected]>
| * gk110/ir: fix double-wide vm addressIlia Mirkin2016-01-201-0/+4
| |
| * gk110/ir: add OP_CCTL handlingIlia Mirkin2016-01-201-0/+35
| |
| * gk110/ir: add atomic op emission, fix gmem loadsIlia Mirkin2016-01-201-5/+65
| | | | | | | | Signed-off-by: Ilia Mirkin <[email protected]>
| * llvmpipe: warn about illegal use of objects in different contextsRoland Scheidegger2016-01-213-1/+32
| | | | | | | | | | | | | | | | | | | | | | Doing that is clearly a bug. We can't quite assert as st/mesa may hit this, but increase at least visibility of it a bit. (For the non-refcounted objects it would be illegal too, but we can't detect that unless we'd store the context ourselves. Plus, those don't tend to cause random crashes at context or object destruction time... So just sampler views, surfaces and so targets for now.) Reviewed-by: Jose Fonseca <[email protected]>
| * llvmpipe,i915: add back NEW_RASTERIZER dependency when computing vertex infoRoland Scheidegger2016-01-213-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I removed this mistakenly in 2dbc20e45689e09766552517a74e2270e49817b5. I actually thought it should not be necessary and a piglit run didn't show any differences, but this shouldn't have been in there. draw_prepare_shader_outputs() is in fact dependent on NEW_RASTERIZER. The new polygon-mode-facing test indeed shows why this is necessary, there's lots of invalid reads and writes with valgrind (also crashes without valgrind), because the pre-pipeline vertex size doesn't match the post-pipeline vertex size (note this won't help much with stages which don't have the prepare hook which can grow the vertex size, in particular the wide point stage, but this isn't used by llvmpipe). The test still won't pass, of course, but it is only usage of uninitialized values now, which is much less dangerous... (Albeit I'm pretty sure for i915 it really is not needed anymore as it doesn't care about the extra outputs and doesn't call draw_prepare_shader_outputs().) Reviewed-by: Jose Fonseca <[email protected]>
| * nv50/ir: don't flip SHL(ADD) into ADD(SHL) if ADD sources have modifiersIlia Mirkin2016-01-201-0/+2
| | | | | | | | | | Fixes: 31fde8fa (nv50/ir: flip shl(add, imm) into add(shl, imm)) Signed-off-by: Ilia Mirkin <[email protected]>
| * gk110/ir: fix load from shared memoryIlia Mirkin2016-01-201-1/+1
| | | | | | | | | | | | It was accidentally using the store opcode. Signed-off-by: Ilia Mirkin <[email protected]>
| * gk110/ir: add partial BAR supportIlia Mirkin2016-01-201-2/+18
| | | | | | | | | | | | This is enough for the plain TGSI BARRIER implementation. Signed-off-by: Ilia Mirkin <[email protected]>
| * Revert "glsl: move uniform calculation to link_uniforms"Tapani Pälli2016-01-203-85/+24
| | | | | | | | This reverts commit 4475d8f9169195baefa893b9b147fe20414cda7c.