aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* radeonsi: split descriptor list dumpingNicolai Hähnle2017-05-101-16/+21
| | | | | | Prepare for dumping CS descriptor list. Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: split shader dumpingNicolai Hähnle2017-05-101-12/+18
| | | | | | Prepare for dumping compute shaders. Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: more const qualifiers in shader dump functionsNicolai Hähnle2017-05-102-12/+12
| | | | Reviewed-by: Marek Olšák <[email protected]>
* ddebug: implement dd_dump_launch_gridNicolai Hähnle2017-05-102-1/+7
| | | | Reviewed-by: Marek Olšák <[email protected]>
* ddebug: extract dd_dump_shaderNicolai Hähnle2017-05-101-74/+82
| | | | | | Will be re-used for compute shaders. Reviewed-by: Marek Olšák <[email protected]>
* gallium/util: dump tokens in util_dump_shader_state only if type is TGSINicolai Hähnle2017-05-101-5/+7
| | | | Reviewed-by: Marek Olšák <[email protected]>
* gallium/util: add util_dump_grid_infoNicolai Hähnle2017-05-102-0/+30
| | | | Reviewed-by: Marek Olšák <[email protected]>
* radv: always free nir shaders from modules on stackGrazvydas Ignotas2017-05-102-8/+4
| | | | | | | | | valgrind reports them as leaked, and I could not find anything making a copy of the nir pointer. Also, radv_device_init_meta_blit_color() is already freeing them unconditionally like this. Signed-off-by: Grazvydas Ignotas <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* anv: don't leak DRM devicesGrazvydas Ignotas2017-05-101-0/+1
| | | | | | | | | After successful drmGetDevices2() call, drmFreeDevices() needs to be called. Fixes: b1fb6e8d "anv: do not open random render node(s)" Signed-off-by: Grazvydas Ignotas <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> # radv version
* anv: fix possible stack corruptionGrazvydas Ignotas2017-05-101-1/+1
| | | | | | | | | | drmGetDevices2 takes count and not size. Probably hasn't caused problems yet in practice and was missed as setups with more than 8 DRM devices are not very common. Fixes: b1fb6e8d "anv: do not open random render node(s)" Signed-off-by: Grazvydas Ignotas <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]>
* i965/vec4: Delete the system value infastructureJason Ekstrand2017-05-0911-137/+5
| | | | | | | | | The only thing still using it is INVOCATION_ID for geometry shaders. That's easily enough inlined into the nir_intrinsic_load_invocation_id handling code. Reviewed-by: Alejandro Piñeiro <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965/vec4: Use NIR to do GS input remappingJason Ekstrand2017-05-099-101/+59
| | | | | | | | We're already doing this in the FS back-end. This just does the same thing in the vec4 back-end. Reviewed-by: Alejandro Piñeiro <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965/fs: Move remapping of gl_PointSize to the NIR levelJason Ekstrand2017-05-092-26/+21
| | | | | Reviewed-by: Alejandro Piñeiro <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965/nir: Inline remap_inputs_with_vue_mapJason Ekstrand2017-05-091-27/+22
| | | | | Reviewed-by: Alejandro Piñeiro <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965/vec4: Use NIR remapping for VS attributesJason Ekstrand2017-05-096-121/+34
| | | | | | | | | | | | | The NIR pass already handles remapping system values to attributes for us so we delete the system value code as part of the conversion. We also change nir_lower_vs_inputs to take an explicit inputs_read bitmask and pass in the inputs_read from prog_data instead from pulling it out of NIR. This is because the version in prog_data may get EDGEFLAG added to it on some old platforms. Reviewed-by: Alejandro Piñeiro <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* intel/compiler/vs: Move inputs_read handling to generic codeJason Ekstrand2017-05-093-5/+3
| | | | | Reviewed-by: Alejandro Piñeiro <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965/vec4: Set VERT_BIT_EDGEFLAG based on the VUE mapJason Ekstrand2017-05-092-4/+11
| | | | | | | We also add a nice little comment to make it more clear exactly what happens with the edge flag copy. Reviewed-by: Kenneth Graunke <[email protected]>
* i965/fs: Lower gl_VertexID and friends to inputs at the NIR levelJason Ekstrand2017-05-094-70/+74
| | | | | | | | | NIR calls these system values but they come in from the VF unit as vertex data. It's terribly convenient to just be able to treat them as such in the back-end. Reviewed-by: Alejandro Piñeiro <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965/vs: Set uses_vertexid and friends from brw_compile_vsJason Ekstrand2017-05-093-11/+17
| | | | | Reviewed-by: Alejandro Piñeiro <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Move multiply by 4 for VS ATTR setup into the scalar backend.Jason Ekstrand2017-05-092-2/+2
| | | | | | | | | | The vec4 backend will want to count in units of vec4s, not scalar components. The simplest solution is to move the multiplication by 4 into the scalar backend. This also improves consistency with how we count varyings. Reviewed-by: Alejandro Piñeiro <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965/nir: Inline remap_vs_attrsJason Ekstrand2017-05-091-30/+26
| | | | | | | | | | Now that we have nice block iterators, there's no good reason for this to be off on it's own. While we're here, we convert to using the NIR const index getters/setters instead of whacking const_index values directly. Reviewed-by: Alejandro Piñeiro <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* nir: Embed the shader_info in the nir_shader againJason Ekstrand2017-05-0956-421/+410
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit e1af20f18a86f52a9640faf2d4ff8a71b0a4fa9b changed the shader_info from being embedded into being just a pointer. The idea was that sharing the shader_info between NIR and GLSL would be easier if it were a pointer pointing to the same shader_info struct. This, however, has caused a few problems: 1) There are many things which generate NIR without GLSL. This means we have to support both NIR shaders which come from GLSL and ones that don't and need to have an info elsewhere. 2) The solution to (1) raises all sorts of ownership issues which have to be resolved with ralloc_parent checks. 3) Ever since 00620782c92100d77c660f9783504c6d80fa1d58, we've been using nir_gather_info to fill out the final shader_info. Thanks to cloning and the above ownership issues, the nir_shader::info may not point back to the gl_shader anymore and so we have to do a copy of the shader_info from NIR back to GLSL anyway. All of these issues go away if we just embed the shader_info in the nir_shader. There's a little downside of having to copy it back after calling nir_gather_info but, as explained above, we have to do that anyway. Acked-by: Timothy Arceri <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Make _mesa_primitive_restart_index a static inline in the header.Kenneth Graunke2017-05-092-20/+15
| | | | | | | | | | It's now basically a single expression, so it probably makes sense to have it inlined into the callers. Suggested by Marek. Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* freedreno: fix clang error in fd_get_compute_paramRob Herring2017-05-091-1/+1
| | | | | | | | | | | | With commit 10c17f23b752 ("freedreno: core compute state support"), Android builds fail with the following error: external/mesa3d/src/gallium/drivers/freedreno/freedreno_screen.c:610:17: error: format string is not a string literal (potentially insecure) [-Werror,-Wformat-security] sprintf(ret, ir); ^~ Signed-off-by: Rob Herring <[email protected]> Signed-off-by: Rob Clark <[email protected]>
* mesa/vbo: fix invalid min/max indexesRob Clark2017-05-091-6/+16
| | | | | | | Fixes: c3f37e9b ("st/mesa: use min_index and max_index directly from vbo") Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Tested-by: Dieter Nützel <[email protected]>
* intel: compiler: prevent integer overflowLionel Landwerlin2017-05-091-2/+2
| | | | | | | CID: 1399477, 1399478 (Integer handling issues) Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* intel: compiler: remove duplicated codeLionel Landwerlin2017-05-091-12/+0
| | | | | | | CID: 1399470: (Control flow issues) Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* intel: gen decoder: don't check for size_t negative valuesLionel Landwerlin2017-05-091-1/+1
| | | | | | | | | We should get either 0 or 1 here. CID: 1373562 (Control flow issues) Signed-off-by: Lionel Landwerlin <[email protected]> Acked-by: Matt Turner <[email protected]>
* bin/*py: honor editorconfig formattingAndres Gomez2017-05-091-2/+2
| | | | | | | Replace the two stray tabs with respective space. Signed-off-by: Andres Gomez <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* bin: use tabs for coding style on *.sh filesAndres Gomez2017-05-091-2/+1
| | | | | | | v2: Instead of changing *.sh, adapt the editorconfig file (Emil). Signed-off-by: Andres Gomez <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* android: i965: add per-gen libmesa_i965_gen{4,45,5} staticMauro Rossi2017-05-091-0/+66
| | | | | | | | | | | | | Needed to fix android building errors: external/mesa/src/mesa/drivers/dri/i965/brw_state_upload.c:148: error: undefined reference to 'gen5_init_atoms' external/mesa/src/mesa/drivers/dri/i965/brw_state_upload.c:150: error: undefined reference to 'gen45_init_atoms' external/mesa/src/mesa/drivers/dri/i965/brw_state_upload.c:152: error: undefined reference to 'gen4_init_atoms' clang++: error: linker command failed with exit code 1 (use -v to see invocation) Fixes: 5a19d0b ("i965: Get real per-gen atom lists") Acked-by: Jason Ekstrand <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* swr: fix polygonmode for front==backGeorge Kyriazis2017-05-082-1/+27
| | | | | | | | | | | | | | | | | | | | Rasterizer core only supports polygonmode front==back. Add logic for populating fillMode for the rasterizer only for that case correctly. Provide enum conversion between mesa enums and core enums. The core renders lines/points as tris. Previously, code would enable stipple for polygonmode != FILL. Modify stipple enable logic so that this works correctly. No regressions in vtk tests. Fixes the following piglit tests: pointsprite gl-1.0-edgeflag-const v2: remove cc stable, and remove "not implemented" assert v3: modified commit message Reviewed-by: Bruce Cherniak <[email protected]>
* swr/rast: support polygonmode pointGeorge Kyriazis2017-05-081-52/+116
| | | | | | | | | | | | | | | Add support for polygonmode point in the binner. This is done by splitting BinPostSetupPoints from BinPoints, so the earlier call can be called from BinTriangles. Setup has already been done at the time BinPostSetupPoints needs to be called. This checkin just adds support in the rasterizer. A separate checkin will add the appropriate driver support. v2: remove cc stable v3: modified commit message and subject line Reviewed-by: Bruce Cherniak <[email protected]>
* util: move ALWAYS_INLINE macro to util/macro.hTimothy Arceri2017-05-092-11/+11
| | | | | | | | Also added clang check. macro.h is include by p_compiler.h so no other change is needed. Reviewed-by: Nicolai Hähnle <[email protected]>
* swr: move msaa resolve to generalized StoreTileBruce Cherniak2017-05-083-80/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | v3: list piglit tests fixed by this patch. Fixed typo Tim pointed out. v2: Reword commit message to more closely adhere to community guidelines. This patch moves msaa resolve down into core/StoreTiles where the surface format conversion routines are available. The previous "experimental" resolve was limited to 8-bit unsigned render targets. This fixes a number of piglit msaa tests by adding resolve support for all the render target formats we support. Specifically: layered-rendering/gl-layer-render: fail->pass layered-rendering/gl-layer-render-storage: fail->pass multisample-formats *[2,4,8,16] gl_arb_texture_rg: crash->pass multisample-formats *[2,4,8,16] gl_ext_texture_snorm: crash->pass multisample-formats *[2,4,8,16] gl_arb_texture_float: fail->pass multisample-formats *[2,4,8,16] gl_arb_texture_rg-float: fail->pass MSAA is still disabled by default, but can be enabled with "export SWR_MSAA_MAX_COUNT=4" (1,2,4,8,16 are options) The default is 0, which is disabled. This patch improves the number of multisample-formats supported by swr, and fixes several crashes currently in the 17.1 branch. Therefore, it should be considered for inclusion in the 17.1 stable release. Being disabled by default, it poses no risk to most users of swr. Reviewed-by: Tim Rowley <[email protected]> cc: [email protected]
* glsl: Don't allow redefining builtin functions on GLSL 1.00.Eric Anholt2017-05-081-2/+13
| | | | | | | | | | The spec text cited above says you can't, but only the GLSL 3.00 (redefine or overload) case was implemented. Fixes dEQP scoping.invalid.redefine_builtin_fragment/vertex. Reviewed-by: Samuel Pitoiset <[email protected]> Tested-by: Matt Turner <[email protected]>
* glsl: Restrict func redeclarations (not just redefinitions) on GLSL 1.00.Eric Anholt2017-05-081-0/+10
| | | | | | | | | Fixes DEQP's scoping.invalid.redeclare_function_fragment/vertex. v2: Fix accidental rejection of prototype+decl. Reviewed-by: Samuel Pitoiset <[email protected]> (v1) Tested-by: Matt Turner <[email protected]>
* glsl: Ban #undefining __LINE__ and friends on GLES2.Eric Anholt2017-05-081-5/+2
| | | | | | | Fixes deqp_gles2 undefine_invalid_object_* failures. Reviewed-by: Samuel Pitoiset <[email protected]> Tested-by: Matt Turner <[email protected]>
* glsl: Restrict functions to not return arrays or SOAs in GLSL 1.00.Eric Anholt2017-05-083-0/+31
| | | | | | | | | | | | | | | From the spec, Arrays are allowed as arguments, but not as the return type. [...] The return type can also be a structure if the structure does not contain an array. Fixes DEQP shaders.functions.invalid.return_array_in_struct_fragment. v2: Spec cite wording change Reviewed-by: Samuel Pitoiset <[email protected]> Tested-by: Matt Turner <[email protected]>
* nir: fix (hopefully) windows buildRob Clark2017-05-082-4/+4
| | | | | Fixes: 53aa109b ("nir: add pass to lower atomic counters to SSBO") Signed-off-by: Rob Clark <[email protected]>
* radeonsi: rename si_eliminate_const_vs_outputs -> si_optimize_vs_outputsMarek Olšák2017-05-081-2/+2
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* ac: fix broken elimination of duplicated VS exportsMarek Olšák2017-05-081-14/+14
| | | | | | | | | | | | | | The renumbering code didn't take into account that multiple VS exports can have the same PARAM index. This also significantly simplifies the renumbering. Thankfully, we have piglits for this: spec@arb_gpu_shader5@arb_gpu_shader5-interpolateatcentroid-packing [email protected]@execution@interface-blocks-complex-vs-fs Reported by Michel Dänzer. Fixes: b08715499e61 ("ac: eliminate duplicated VS exports") Reviewed-by: Nicolai Hähnle <[email protected]>
* egl: Fix -Wint-to-pointer-castChad Versace2017-05-081-1/+1
| | | | | | | | | | | | | main/egldisplay.c: In function '_eglParseX11DisplayAttribList': main/egldisplay.c:491:38: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] display->Options.Platform = (void *)value; The fix: cast to uinptr_t before void*. ^ Fixes: ddb99127 egl/x11: Honor the EGL_PLATFORM_X11_SCREEN_EXT attribute Cc: Adam Jackson <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* st/mesa: remove unused st parameter in init_velement_loweredMarek Olšák2017-05-081-4/+3
| | | | | | Tested-by: Edmondo Tommasina <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* st/mesa: use PIPE_MAX_ATTRIBS as the max number of vertex buffersMarek Olšák2017-05-081-1/+1
| | | | | | Tested-by: Edmondo Tommasina <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* st/mesa: simplify code due to unification to st_common_programMarek Olšák2017-05-084-99/+35
| | | | | | | | v2: use the st_common_program() helper Tested-by: Edmondo Tommasina <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* st/mesa: simplify update_constants functionsMarek Olšák2017-05-084-38/+17
| | | | | Tested-by: Edmondo Tommasina <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* st/mesa: unify TCS, TES, GS st_*_program structuresMarek Olšák2017-05-0810-160/+94
| | | | | | Tested-by: Edmondo Tommasina <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* st/mesa: decrease the size of remaining st_translate_program array paramsMarek Olšák2017-05-087-11/+11
| | | | | | Tested-by: Edmondo Tommasina <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* st/mesa: remove unused outputSlotToAttrMarek Olšák2017-05-083-11/+0
| | | | | | Tested-by: Edmondo Tommasina <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>