summaryrefslogtreecommitdiffstats
path: root/src/mesa
Commit message (Collapse)AuthorAgeFilesLines
* mesa: Fix generation of git_sha1.h.tmp for gitlinksChad Versace2015-07-101-1/+4
| | | | | | | | | | | | | | Don't assume that $(top_srcdir)/.git is a directory. It may be a gitlink file [1] if $(top_srcdir) is a submodule checkout or a linked worktree [2]. [1] A "gitlink" is a text file that specifies the real location of the gitdir. [2] Linked worktrees are a new feature in Git 2.5. Cc: "10.6, 10.5" <[email protected]> Reviewed-by: Iago Toral Quiroga <[email protected]> (cherry picked from commit 75784243df1f5bb0652fb243b37d69f36d493a86)
* HACK: Get rid of sanity_param_count for FSJason Ekstrand2015-06-251-9/+0
|
* i965: Don't print the GLSL IR if it doesn't existJason Ekstrand2015-06-252-2/+2
|
* glsl: Move vert_attrib varying_slot and frag_result enums to shader_enums.hJason Ekstrand2015-06-251-205/+0
|
* i965/nir: Handle returns as long as they're at the end of a functionJason Ekstrand2015-06-241-0/+6
|
* i965/nir: Split NIR shader handling into two functionsJason Ekstrand2015-06-242-15/+33
| | | | | | The brw_create_nir function takes a GLSL or ARB shader and turns it into a NIR shader. The guts of the optimization and lowering code is now split into a new brw_process_shader function.
* vk: Build xmlconfig stuff into libi965_compilerJason Ekstrand2015-06-241-0/+1
|
* Merge remote-tracking branch 'mesa-public/master' into vulkanJason Ekstrand2015-06-23239-7976/+8516
|\
| * i965/fs: Get rid of an unused variable in emit_barrier()Jason Ekstrand2015-06-231-2/+2
| | | | | | | | Reviewed-by: Jordan Justen <[email protected]>
| * i965: Remove the brw_context from the visitorsJason Ekstrand2015-06-2320-79/+86
| | | | | | | | | | | | | | As of this commit, nothing actually needs the brw_context. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Chris Forbes <[email protected]>
| * i965/vec4_vs: Add an explicit use_legacy_snorm_formula flagJason Ekstrand2015-06-233-6/+12
| | | | | | | | | | | | | | This way we can stop doing is_gles3 checks inside of the compiler. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Chris Forbes <[email protected]>
| * i965/vec4: Turn some _mesa_problem calls into assertsJason Ekstrand2015-06-231-6/+3
| | | | | | | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Chris Forbes <[email protected]>
| * i965/vs: Pass the current set of clip planes through run() and run_vs()Jason Ekstrand2015-06-237-23/+20
| | | | | | | | | | | | | | | | | | Previously, these were pulled out of the GL context conditionally based on whether we were running ff/ARB or a GLSL program. Now, we just pass them in so that the visitor doesn't have to grab them itself. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Chris Forbes <[email protected]>
| * i965/fs: Add a do_rep_send flag to run_fsJason Ekstrand2015-06-232-5/+6
| | | | | | | | | | | | | | Previously, we were pulling it from brw->do_rep_send Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Chris Forbes <[email protected]>
| * i965: Pull calls to get_shader_time_index out of the visitorJason Ekstrand2015-06-2316-76/+79
| | | | | | | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Chris Forbes <[email protected]>
| * i965: Use a single index per shader for shader_time.Jason Ekstrand2015-06-2311-104/+55
| | | | | | | | | | | | | | | | | | | | Previously, each shader took 3 shader time indices which were potentially at arbirary points in the shader time buffer. Now, each shader gets a single index which refers to 3 consecutive locations in the buffer. This simplifies some of the logic at the cost of having a magic 3 a few places. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Chris Forbes <[email protected]>
| * i965: Add compiler options to brw_compilerJason Ekstrand2015-06-236-46/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | This creates the options at screen cration time and then we just copy them into the context at context creation time. We also move is_scalar to the brw_compiler structure. We also end up manually setting some values that the core would have set by default for us. Fortunately, there are only two non-zero shader compiler option defaults that we aren't overriding anyway so this isn't a big deal. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Chris Forbes <[email protected]>
| * i965/fs: Plumb compiler debug logging through brw_compilerJason Ekstrand2015-06-233-4/+36
| | | | | | | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Chris Forbes <[email protected]>
| * i965/fs: Do the no16 perf logging directly in fs_visitor::no16()Jason Ekstrand2015-06-231-11/+2
| | | | | | | | | | | | | | While we're at it, we'll drop the note about 10-20% performance loss. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Chris Forbes <[email protected]>
| * i965/fs: Make no16 non-variadicJason Ekstrand2015-06-232-11/+5
| | | | | | | | | | | | | | We never used the fact that it was variadic anyway. Reviewed-by: Chris Forbes <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
| * i965: Move INTEL_DEBUG variable parsing to screen creation timeJason Ekstrand2015-06-234-10/+11
| | | | | | | | | | | | v2: Do bufmgr set_debug and set_aub_dump at screen time as well. Reviewed-by: Kenneth Graunke <[email protected]>
| * i965: Remove the dependance on brw_context from the generatorsJason Ekstrand2015-06-239-11/+17
| | | | | | | | | | Reviewed-by: Chris Forbes <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
| * i965: Plumb compiler debug logging through a function pointer in brw_compilerJason Ekstrand2015-06-2311-34/+51
| | | | | | | | | | | | | | | | v2 (Ken): Make shader_debug_log a printf-like function. v3 (Jason): Add a void * to pass the brw_context through Reviewed-by: Chris Forbes <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
| * mesa: Add a va_args variant of _mesa_gl_debug().Kenneth Graunke2015-06-232-8/+30
| | | | | | | | | | | | | | | | This will be useful for wrapper functions. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Chris Forbes <[email protected]>
| * i965: Replace some instances of brw->gen with devinfo->genJason Ekstrand2015-06-232-6/+6
| |
| * i965: Initialize backend_shader::mem_ctx in its constructor.Matt Turner2015-06-234-5/+5
| | | | | | | | | | | | | | We were initializing it in each subclasses' constructors for some reason. Reviewed-by: Jordan Justen <[email protected]>
| * i965: Assert that the GL primitive isn't out of range.Matt Turner2015-06-231-1/+3
| | | | | | | | | | | | | | | | Coverity sees the if (mode >= BRW_PRIM_OFFSET (128)) test and assumes that the else-branch might execute for mode to up 127, which out be out of bounds. Reviewed-by: Jordan Justen <[email protected]>
| * i965/cfg: Assert that cur_do/while/if pointers are non-NULL.Matt Turner2015-06-231-0/+2
| | | | | | | | | | | | | | | | Coverity sees that the functions immediately below the new assertions dereference these pointers, but is unaware that an ENDIF always follows an IF, etc. Reviewed-by: Jordan Justen <[email protected]>
| * mesa: Delete unused ICEIL().Matt Turner2015-06-231-32/+0
| | | | | | | | | | | | Can't find any uses of it in git history. Reviewed-by: Jordan Justen <[email protected]>
| * i965/fs: Don't mess up stride for uniform integer multiplication.Matt Turner2015-06-231-4/+16
| | | | | | | | | | | | | | | | | | If the stride is 0, the source is a uniform and we should not modify the stride. Cc: "10.6" <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91047 Reviewed-by: Kenneth Graunke <[email protected]>
| * i965/gen9: Don't use encrypted MOCSBen Widawsky2015-06-231-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On gen9+ MOCS is an index into a table. It is 7 bits, and AFAICT, bit 0 is for doing encrypted reads. I don't recall how I decided to do this for BXT. I don't know this patch was ever needed, since it seems nothing is broken today on SKL. Furthermore, this patch may no longer be needed because of the ongoing changes with MOCS setup. It is what is being used/tested, so it's included in the series. The chosen values are the old values left shifted. That was also an arbitrary choice. v2: Use shift in MOCS to make it clear what we're doing. (Ken) Signed-off-by: Ben Widawsky <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
| * drivers/x11: drop unneeded HAVE_X11_DRIVER checkEmil Velikov2015-06-231-2/+0
| | | | | | | | | | | | | | Already handled in the Makefile which includes the drivers/x11 subdir. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
| * drivers/x11: fix the build against shared_glapiEmil Velikov2015-06-231-0/+7
| | | | | | | | | | | | | | Cc: Brian Paul <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Acked-by: Jose Fonseca <[email protected]>
| * i965: Add and fix comments in brw_vue_map.c.Kenneth Graunke2015-06-221-1/+13
| | | | | | | | | | Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
| * i965: Split VUE map handling out of brw_vs.c into brw_vue_map.c.Kenneth Graunke2015-06-223-102/+137
| | | | | | | | | | | | | | | | | | | | | | This was originally only used by the vertex shader, but it's now used by the geometry shader as well, and will also eventually be used for tessellation control and evaluation shaders. I suspect it will be easier to find in a file named after the concept. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
| * i965/gen9: Implement Push Constant Buffer workaroundBen Widawsky2015-06-221-7/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This implements a workaround (exact excerpt as a comment in the code). The docs specify [clearly, after you struggle for a while] that the offset isn't relative to state base. This actually makes sense. This fixes hangs on SKL. Buffer #0 is meant to be used for normal uniforms. Buffer #1 is typically used for gather constants when using RS. Buffer #1-#3 could be used to push a bunch of UBO data which would just be somewhere in memory, and not relative to the dynamic state. NOTE: I've moved away from the ternary operator for the new gen9 conditions. Admittedly it's probably not great to do this, but I really want to fix this all up in the subsequent patch and doing it here makes that diff a lot nicer. I want to split out the gen8/9 code to make the function a bit more readable, but to keep this easily cherry-pickable I am doing this fix first. If we decide not to merge the cleanup patch then I can revisit this. Cc: "10.5 10.6" <[email protected]> Signed-off-by: Ben Widawsky <[email protected]> Reviewed-by: Anuj Phogat <[email protected]> Tested-by: Valtteri Rantala <[email protected]>
| * mesa: use _mesa_lookup_enum_by_nr() in print_array()Brian Paul2015-06-221-4/+4
| | | | | | | | | | | | Print GL_FLOAT, etc. instead of hex value. Reviewed-by: Ilia Mirkin <[email protected]>
| * glsl_to_tgsi: add SVIEW decl supportRob Clark2015-06-211-1/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Freedreno needs sampler type information to deal with int/uint textures. To accomplish this, start creating sampler-view declarations, as suggested here: http://lists.freedesktop.org/archives/mesa-dev/2014-November/071583.html create a sampler-view with index matching the sampler, to encode the texture type (ie. SINT/UINT/FLOAT). Ie: DCL SVIEW[n], 2D, UINT DCL SAMP[n] TEX OUT[1], IN[1], SAMP[n] For tgsi texture instructions which do not take an explicit SVIEW argument, the SVIEW index is implied by the SAMP index. Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
| * mesa: Back out an accidental change I had in a VC4 commit.Eric Anholt2015-06-201-1/+0
| | | | | | | | | | | | This was a hack as part of debugging some glamor-on-GLES2 behavior that ended up being an xserver bug. I suspect we can just flip this extension on for GLES2, but the spec says it requires 3.1.
| * vc4: Fix write-only texsubimage when we had to align.Eric Anholt2015-06-201-0/+1
| | | | | | | | | | | | | | | | We need to make sure that when we store the aligned box, we've got initialized contents in the border. We could potentially just load the border area, but for now let's get text rendering working in X (and fix the GL_TEXTURE_2D errors in piglit's texsubimage test and gl-2.1-pbo/test_tex_image)
| * i965/gen8: Use HALIGN_16 for single sample mcs buffersBen Widawsky2015-06-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The original code meant to do this, but was only checking num_samples == 1 to figure out if a surface was fast clear capable. However, we can allocate single sample miptrees with num_samples == 0 (when it's an internally created buffer). This fixes a bunch of the piglit tests on gen8. Other gens should have been fine. Here is the order of events that allowed this to slip through: t0: I wrote halign patches and tested them. These alignment assertions are for gen8 fast clear surfaces, basically. t1: I pushed bogus perf patch which made fast clears never happen t2: Reworked halign patches based on Chad's feedback and introduced the bug this patch fixes. t2.5: I tested reworked patches, but assertion wasn't hit because of t1. t3. Matt fixed issue in t1 which made fast clears happen here: commit 22af95af8316f2888a3935cdf774ff0997b3dd42 Author: Matt Turner <[email protected]> Date: Thu Jun 18 16:14:50 2015 -0700 i965: Add missing braces around if-statement. This logic should match that of the v1 of my halign patch series. Cc: Kenneth Graunke <[email protected]> Cc: Matt Turner <[email protected]> Reported-by: Kenneth Graunke <[email protected]> Signed-off-by: Ben Widawsky <[email protected]> Tested-by: Mark Janes <[email protected]>
| * mesa: move ARB_gs5 enums to core, EXT_polygon_offset_clamp to desktopIlia Mirkin2015-06-191-8/+8
| | | | | | | | | | | | | | | | | | | | When adding EXT_polygon_offset_clamp, I first made it core-only, and never moved the enum getter back to the GL/GL_CORE section. Similarly, ARB_gs5 is a core-only extension, so move its getters to the GL_CORE section. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Matt Turner <[email protected]>
| * i965: Add missing braces around if-statement.Matt Turner2015-06-181-1/+2
| | | | | | | | | | | | | | | | | | | | Fixes a performance problem caused by commit b639ed2f. Reviewed-by: Chris Forbes <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Ben Widawsky <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90895
| * i965/compute: Fix undefined code with right_mask for SIMD32Jordan Justen2015-06-181-1/+1
| | | | | | | | | | | | | | | | | | Although we don't support SIMD32, krh pointed out that the left shift by 32 is undefined by C/C++ for 32-bit integers. Suggested-by: Kristian Høgsberg <[email protected]> Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
| * mesa: add GL_PROGRAM_PIPELINE support in KHR_debug callsIlia Mirkin2015-06-184-12/+24
| | | | | | | | | | | | | | | | | | | | This was apparently missed when ARB_sso support was added. Add label support to pipeline objects just like all the other debug-related objects. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Timothy Arceri <[email protected]> Cc: "10.5 10.6" <[email protected]>
| * i965: Fix textureGrad with cube samplersIago Toral Quiroga2015-06-181-8/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We can't use sampler messages with gradient information (like sample_g or sample_d) to deal with this scenario because according to the PRM: "The r coordinate and its gradients are required only for surface types that use the third coordinate. Usage of this message type on cube surfaces assumes that the u, v, and gradients have already been transformed onto the appropriate face, but still in [-1,+1] range. The r coordinate contains the faceid, and the r gradients are ignored by hardware." Instead, we should lower this to compute the LOD manually based on the gradients and use a different sample message that takes the computed LOD instead of the gradients. This is already being done in brw_lower_texture_gradients.cpp, but it is restricted to shadow samplers only, although there is a comment stating that we should probably do this also for samplerCube and samplerCubeArray. Because of this, both dEQP and Piglit test cases for textureGrad with cube maps currently fail. This patch does two things: 1) Activates the texturegrad lowering pass for all cube samplers. 2) Corrects the computation of the LOD value for cube samplers. I had to do 2) because for cube maps the calculations implemented in the lowering pass always compute a value of rho that is twice the value we want (so we get a LOD value one unit larger than we want). This only happens for cube map samplers (all kinds). I am not sure about why we need to do this, but I suspect that it is related to the fact that cube map coordinates, when transported to a specific face in the cube, are in the range [-1, 1] instead of [0, 1] so we probably need to divide the derivatives by 2 when we compute the LOD. Doing that would produce the same result as dividing the final rho computation by 2 (or removing a unit from the computed LOD, which is what we are doing here). Fixes the following piglit tests: bin/tex-miplevel-selection textureGrad Cube -auto -fbo bin/tex-miplevel-selection textureGrad CubeArray -auto -fbo bin/tex-miplevel-selection textureGrad CubeShadow -auto -fbo Fixes 10 dEQP tests in the following category: dEQP-GLES3.functional.shaders.texture_functions.texturegrad.*cube* Reviewed-by: Ben Widawsky <[email protected]>
| * i965: enable ARB_framebuffer_no_attachments for Gen7+Kevin Rogovin2015-06-172-0/+7
| | | | | | | | | | | | | | Enable GL_ARB_framebuffer_no_attachments in i965 for Gen7 and higher. Reviewed-by: Ian Romanick <[email protected]> Signed-off-by: Kevin Rogovin <[email protected]>
| * i965: execution of frag-shader when it has atomic bufferKevin Rogovin2015-06-172-0/+7
| | | | | | | | | | | | | | | | Ensure that the GPU spawns the fragment shader thread for those fragment shaders with atomic buffer access. Reviewed-by: Tapani Pälli <[email protected]> Signed-off-by: Kevin Rogovin <[email protected]>
| * mesa: function for testing if current frag-shader has atomicsKevin Rogovin2015-06-171-1/+6
| | | | | | | | | | | | | | | | Add helper function that checks if current fragment shader active of gl_context has atomic buffer access. Reviewed-by: Ian Romanick <[email protected]> Signed-off-by: Kevin Rogovin <[email protected]>
| * i965: Use _mesa_geometric_ functions appropriatelyKevin Rogovin2015-06-1716-34/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Change references to gl_framebuffer::Width, Height, MaxNumLayers and Visual::samples to use the _mesa_geometry_ convenience functions for those places where the geometry of the gl_framebuffer is needed (in contrast to the geometry of the intersection of the attachments of the gl_framebuffer). This patch is to pave the way to enable GL_ARB_framebuffer_no_attachments on Gen7 and higher in i965. Reviewed-by: Ian Romanick <[email protected]> Signed-off-by: Kevin Rogovin <[email protected]>