summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2016-10-07radeonsi: enable GLSL 4.50ARB_enhanced_layoutsNicolai Hähnle1-1/+1
2016-10-07st/mesa: enable ARB_enhanced_layouts and turn the cap onNicolai Hähnle6-12/+19
2016-10-07st/glsl_to_tgsi: adjust swizzles and writemasks for explicit componentsNicolai Hähnle1-19/+51
2016-10-07st/glsl_to_tgsi: explicitly track all input and output declarationNicolai Hähnle1-133/+144
In order to be able to emit overlapping input and output array declarations, we flip the logic of emitting those declarations on its head: rather than iterating over slots and emitting the corresponding declarations, we iterate over the declarations from GLSL and emit those.
2016-10-07st/glsl_to_tgsi: mark "gaps" in input/output arrays as usedNicolai Hähnle1-8/+24
In some cases, a shader may have an input/output array but not use some entries in the middle. This happens with eON games, for example. We emit declarations that cover the entire array range even if there are some unused gaps. This patch now reflects that in the InputsRead etc. fields to ensure the various input/outputMapping arrays are actually correct, which will be important when we re-jiggle the way declarations are emitted.
2016-10-07st/glsl_to_tgsi: disable on-the-fly peephole for 64-bit operationsNicolai Hähnle1-0/+4
This optimization is incorrect with 64-bit operations, because the channel-splitting logic in emit_asm ends up being applied twice to the source operands. A lucky coincidence of how the writemask test works resulted in this optimization basically never being applied anyway. As far as I can tell, the only case where it would (incorrectly) have been applied is something like dvec2 d; float x = (float)d.y; which nobody seems to have ever done. But the moral equivalent does occur in one of the component layout piglit test. Cc: mesa-stable@lists.freedesktop.org
2016-10-07st/glsl_to_tgsi: simpler fixup of empty writemasksNicolai Hähnle1-27/+10
Empty writemasks mean "copy everything", so we can always just use the number of vector elements (which uses the GLSL meaning here, i.e. each double is a single element/writemask bit).
2016-10-07st/glsl_to_tgsi: explicit handling of writemask for depth/stencil exportNicolai Hähnle1-8/+17
2016-10-07glsl: dump explicit location when printing IRNicolai Hähnle1-3/+7
2016-10-07tgsi/ureg: add ureg_DECL_output_layoutNicolai Hähnle2-15/+40
For specifying an exact location/component.
2016-10-07tgsi/ureg: add layout/component input declarationsNicolai Hähnle2-13/+77
2016-10-07tgsi/scan: fix num_inputs/num_outputs for shaders with overlapping arraysNicolai Hähnle1-6/+3
2016-10-07gallium: add PIPE_CAP_TGSI_ARRAY_COMPONENTSNicolai Hähnle17-0/+24
This is a screen cap because drivers are expected to support it either for all shader types or for none of them.
2016-10-07radeonsi: make more use of si_have_tgsi_computeNicolai Hähnle1-3/+1
2016-10-07gallium/radeon: assign a name to LLVM output variables in debug buildsNicolai Hähnle1-1/+6
This can be helpful with R600_DEBUG=preoptir.
2016-10-07gallium/radeon: avoid redundant work with overlapping in/out arraysNicolai Hähnle1-1/+4
2016-10-06intel: aubinator: add missing return charactersLionel Landwerlin1-5/+5
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2016-10-06nir: Delete open coded type printing.Kenneth Graunke3-36/+11
glsl_print_type() prints arrays of arrays incorrectly. For example, a type with name float[3][7] would be printed as float[7][3]. (This is an array of length 3 containing arrays of 7 floats.) cdecl says that the type name is correct. glsl_print_type() doesn't really do anything above and beyond printing type->name, and glsl_print_struct() wasn't used at all. So, drop them. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
2016-10-06anv: fix GetPhysicalDeviceProperties to return timestampPeriod in nsPhilipp Zabel1-1/+1
According to chapters 16.5. (Timestamp Queries) and 30.2 (Limits) of the Vulkan Specification 1.0.29, the .limits.timestampPeriod field returned by vkGetPhysicalDeviceProperties is measured in nanoseconds, not in seconds. Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-10-06i965: remove remaining tabs in brw_draw.cTimothy Arceri1-13/+13
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-10-06i965: get inputs read from nir infoTimothy Arceri10-20/+39
This is a step towards dropping the GLSL IR version of do_set_program_inouts() in i965 and moving towards native nir support. This is important because we want to eventually convert to nir and use its optimisations passes before we can call this GLSL IR pass. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-10-06i965: get outputs written from nir infoTimothy Arceri6-22/+34
This is a step towards dropping the GLSL IR version of do_set_program_inouts() in i965 and moving towards native nir support. This is important because we want to eventually convert to nir and use its optimisations passes before we can call this GLSL IR pass. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-10-06i965: get outputs read from nir infoTimothy Arceri2-2/+3
This is a step towards dropping the GLSL IR version of do_set_program_inouts() in i965 and moving towards native nir support. This is important because we want to eventually convert to nir and use its optimisations passes before we can call this GLSL IR pass. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-10-06i965: remove remaining tabs in brw_wm.cTimothy Arceri1-44/+44
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-10-06mesa: remove the UsesDFdy flagTimothy Arceri5-22/+2
Seems the last user of this was removed in 08bc74e69. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-10-06i965: get uses discard from nir infoTimothy Arceri1-2/+4
This is a step towards dropping the GLSL IR version of do_set_program_inouts() in i965 and moving towards native nir support. This is important because we want to eventually convert to nir and use its optimisations passes before we can call this GLSL IR pass. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-10-06i965: get uses texture gather from nir infoTimothy Arceri3-9/+11
This is a step towards dropping the GLSL IR version of do_set_program_inouts() in i965 and moving towards native nir support. This is important because we want to eventually convert to nir and use its optimisations passes before we can call this GLSL IR pass. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-10-05i965: Eliminate brw->cs.prog_data pointer.Kenneth Graunke6-17/+18
Just say no to: - brw->cs.base.prog_data = &brw->cs.prog_data->base.base; We'll just use the brw_stage_prog_data pointer in brw_stage_state and downcast it to brw_cs_prog_data as needed. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Timothy Arceri <timothy.arcero@collabora.com>
2016-10-05i965: Eliminate brw->wm.prog_data pointer.Kenneth Graunke14-50/+68
Just say no to: - brw->wm.base.prog_data = &brw->wm.prog_data->base.base; We'll just use the brw_stage_prog_data pointer in brw_stage_state and downcast it to brw_wm_prog_data as needed. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Timothy Arceri <timothy.arcero@collabora.com>
2016-10-05i965: Eliminate brw->gs.prog_data pointer.Kenneth Graunke10-59/+73
Just say no to: - brw->gs.base.prog_data = &brw->gs.prog_data->base.base; We'll just use the brw_stage_prog_data pointer in brw_stage_state and downcast it to brw_gs_prog_data as needed. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Timothy Arceri <timothy.arcero@collabora.com>
2016-10-05i965: Eliminate brw->tes.prog_data pointer.Kenneth Graunke10-25/+29
Just say no to: - brw->tes.base.prog_data = &brw->tes.prog_data->base.base; We'll just use the brw_stage_prog_data pointer in brw_stage_state and downcast it to brw_tes_prog_data as needed. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Timothy Arceri <timothy.arcero@collabora.com>
2016-10-05i965: Eliminate brw->tcs.prog_data pointer.Kenneth Graunke8-25/+28
Just say no to: - brw->tcs.base.prog_data = &brw->tcs.prog_data->base.base; We'll just use the brw_stage_prog_data pointer in brw_stage_state and downcast it to brw_tcs_prog_data as needed. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Timothy Arceri <timothy.arcero@collabora.com>
2016-10-05i965: Eliminate brw->vs.prog_data pointer.Kenneth Graunke18-96/+121
Just say no to: - brw->vs.base.prog_data = &brw->vs.prog_data->base.base; We'll just use the brw_stage_prog_data pointer in brw_stage_state and downcast it to brw_vs_prog_data as needed. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Timothy Arceri <timothy.arcero@collabora.com>
2016-10-05i965: Introduce downcast helpers for prog_data structures.Kenneth Graunke7-62/+66
Similar to brw_context(...), intel_texture_object(...), and so on. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Timothy Arceri <timothy.arcero@collabora.com>
2016-10-05i965/sync: Rename awkward variableChad Versace1-6/+6
What is the difference between a 'driver_fence' and a 'fence'? Do the characters 'driver_' add anything helpful? Nope. They do, though, add an extra 7 chars and pull your eyeballs away to ask "huh? what's that?" one microsecond too many. Reviewed-by: Iago Toral Quiroga <itoral@igalia.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-10-05i965/sync: Rename intel_syncobj.c -> brw_sync.cChad Versace3-2/+2
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-10-05i965/sync: Replace 'intel' prefix with 'brw'Chad Versace3-37/+37
This is yet another patch for the great renaming begun long ago. Reviewed-by: Iago Toral Quiroga <itoral@igalia.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-10-05i965/sync: Fix uninitalized usage and leak of mutexChad Versace1-2/+12
We locked an unitialized mutex in the callstack glClientWaitSync intel_gl_client_wait_sync brw_fence_client_wait_sync because we forgot to initialize it in intel_gl_fence_sync. (The EGLSync codepath didn't have this bug. It initialized the mutex in intel_dri_create_sync). We also forgot to tear down (mtx_destroy) the mutex when destroying the sync object. Cc: mesa-stable@lists.freedesktop.org Reviewed-by: Iago Toral Quiroga <itoral@igalia.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-10-05nir: Use the correct infos structure for copying atomic sourcesJason Ekstrand1-1/+1
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Connor Abbott <cwabbott0@gmail.com> Tested-by: Mark Janes <mark.a.janes@intel.com> Cc: "12.0" <mesa-dev@lists.freedestkop.org>
2016-10-05nvc0: dump program binary when chipset has been forcedSamuel Pitoiset1-0/+5
Currently, program binaries are only dumped at upload time, but when the chipset has been forced via NV50_PROG_CHIPSET we might want to show the generated code, especially with shaderdb. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
2016-10-05radeonsi: fix texture border colors for compute shadersMarek Olšák1-0/+12
There are VM faults without this. Cc: 12.0 <mesa-stable@lists.freedesktop.org> Acked-by: Edward O'Callaghan <funfunctor@folklore1984.net> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2016-10-05gallium/radeon/winsyses: set reasonable max_alloc_sizeMarek Olšák2-3/+5
which is returned for GL_MAX_TEXTURE_BUFFER_SIZE. It doesn't have any other use at the moment. Bigger allocations are not rejected. This fixes GL45-CTS.texture_buffer.texture_buffer_max_size on Bonaire. Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2016-10-05radeonsi: fix interpolateAt opcodes for .zw componentsMarek Olšák1-1/+1
Not returning garbage in .zw seems pretty important. This fixes: GL45-CTS.shader_multisample_interpolation.render.interpolate_at_*_check.* Cc: 11.2 12.0 <mesa-stable@lists.freedesktop.org> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2016-10-05radeonsi: add assertions to validate interpolation flagsMarek Olšák1-0/+34
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2016-10-05radeonsi: interpolate colors after interpolation weight shufflingMarek Olšák1-48/+48
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2016-10-05tgsi/scan: don't set interp flags for inputs only used by INTERP (v2)Marek Olšák1-48/+57
(v1 pushed, then reverted) This fixes 9 randomly failing tests on radeonsi: GL45-CTS.shader_multisample_interpolation.render.interpolate_at_centroid.* v2: use input_interpolate[input] (correct) instead of input_interpolate[index] (incorrect) Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2016-10-05ddebug: dump most driver information with GALLIUM_DDEBUG=alwaysMarek Olšák1-1/+5
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2016-10-05nv50/ra: let simplify return an error and handle thatKarol Herbst1-5/+7
fixes a crash in the case simplify reports an error Signed-off-by: Karol Herbst <karolherbst@gmail.com> Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
2016-10-05intel/blorp: Use documented RECTLIST vertex positionsNanley Chery1-3/+3
Use the vertex positions described in the PRMs. This has no effect on rendering but quiets the simulator warnings seen when the vertices appear out of order. Signed-off-by: Nanley Chery <nanley.g.chery@intel.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
2016-10-05anv/meta: Roll clear_image into CmdClearDepthStencilImageJason Ekstrand1-56/+28
It is now the only caller so there's no sense in keeping things split out. Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>