summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* mesa/main: add support for ARB_compute_variable_groups_sizeSamuel Pitoiset2016-10-0711-1/+185
| | | | | | | | | | | | | v5: - replace fixed_local_size by !LocalSizeVariable (Nicolai) v4: - slightly indent spec quotes (Nicolai) - drop useless _mesa_has_compute_shaders() check (Nicolai) - move the fixed local size outside of the loop (Nicolai) - add missing check for invalid use of work group count v2: - update formatting spec quotations (Ian) - move the total_invocations check outside of the loop (Ian) Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* glapi: add entry points for GL_ARB_compute_variable_group_sizeSamuel Pitoiset2016-10-076-1/+45
| | | | | | | | | v2: - correctly sort that new extension (Ian) - fix up the comment (Ian) Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* nv50/ir: optimize sub(a, 0) to aKarol Herbst2016-10-061-0/+3
| | | | | | | | | | | | | | | | | helped some ue4 demos and divinity OS shaders total instructions in shared programs : 2818674 -> 2818606 (-0.00%) total gprs used in shared programs : 379273 -> 379273 (0.00%) total local used in shared programs : 9505 -> 9505 (0.00%) total bytes used in shared programs : 25837792 -> 25837192 (-0.00%) local gpr inst bytes helped 0 0 33 33 hurt 0 0 0 0 Signed-off-by: Karol Herbst <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Pierre Moreau <[email protected]>
* st/mesa: move all sampler view code into new st_sampler_view.[ch] filesBrian Paul2016-10-0613-493/+589
| | | | | | | | | | | | | Previously, the sampler view code was scattered across several different files. Note, the previous REALLOC(), FREE() for st_texture_object::sampler_views are replaced by realloc(), free() to avoid conflicting macros in Mesa vs. Gallium. Reviewed-by: Edward O'Callaghan <[email protected]> Acked-by: Nicolai Hähnle <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* st/mesa: optimize pipe_sampler_view validationBrian Paul2016-10-064-30/+101
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before, st_get_texture_sampler_view_from_stobj() did a lot of work to check if the texture parameters matched the sampler view (format, swizzle, min/max lod, first/last layer, etc). We did this every time we validated the texture state. Now, we use a ctx->Driver.TexParameter() callback and a couple other checks to proactively release texture views when we know that view-related parameters have changed. Then, the validation step is simplified: - Search the texture's list of sampler views (just match the context). - If found, we're done. - Else, create a new sampler view. There will never be old, out-of-date sampler views attached to texture objects that we have to test. Most apps create textures and set the texture parameters once. This make sampler view validation much cheaper for that case. Note that the old texture/sampler comparison code has been converted into a set of assertions to verify that the sampler view is in fact consistent with the texture parameters. This should help to spot any potential regressions. Reviewed-by: Edward O'Callaghan <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* mesa: call ctx->Driver.TexParameter() in texture_buffer_range()Brian Paul2016-10-061-0/+13
| | | | | | | To inform drivers of texture buffer offset/size changes, as we do for other texture object parameters. Reviewed-by: Nicolai Hähnle <[email protected]>
* st/mesa: consolidate view format setup codeBrian Paul2016-10-061-34/+54
| | | | | | | | | | | | Before, we had code to compute the sampler view's format spread across two different functions: in update_single_texture() and st_get_texture_sampler_view_from_stobj(). Now it's all in one new function. Also, use _mesa_texture_base_format() to simplify the code. Reviewed-by: Edward O'Callaghan <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* st/mesa: add some const qualifiers in st_atom_texture.cBrian Paul2016-10-061-3/+5
| | | | | | | | And minor code reformatting. Reviewed-by: Edward O'Callaghan <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* st/mesa: simplify some code in get_texture_format_swizzle()Brian Paul2016-10-061-5/+5
| | | | | | | | There's no need to cast to st_texture_image. Just use gl_texture_image. Reviewed-by: Edward O'Callaghan <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* mesa: make _mesa_texture_buffer_range() staticBrian Paul2016-10-062-23/+19
| | | | | | Not called from any other file. Also, add a comment. Reviewed-by: Anuj Phogat <[email protected]>
* mesa: add const qualifier, comment on can_avoid_reallocation()Brian Paul2016-10-061-1/+8
| | | | Reviewed-by: Anuj Phogat <[email protected]>
* mesa: add comment/assertion on get_tex_level_parameter_buffer()Brian Paul2016-10-061-0/+5
| | | | Reviewed-by: Anuj Phogat <[email protected]>
* nir: Remove some no longer needed assertsJason Ekstrand2016-10-068-16/+1
| | | | | | | | Now that the NIR casting functions have type assertions, we have a bunch of assertions that aren't needed anymore. Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Connor Abbott <[email protected]>
* nir: Make nir_foo_first/last_cf_node return a block insteadJason Ekstrand2016-10-069-116/+84
| | | | | | | | | | One of NIR's invariants is that control flow lists always start and end with blocks. There's no good reason why we should return a cf_node from these functions since we know that it's always a block. Making it a block lets us remove a bunch of code. Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Connor Abbott <[email protected]>
* nir: Add asserts to the casting functionsJason Ekstrand2016-10-062-24/+45
| | | | | | | | | | | This makes calling nir_foo_as_bar a bit safer because we're no longer 100% trusting in the caller to ensure that it's safe. The caller still needs to do the right thing but this ensures that we catch invalid casts with an assert rather than by reading garbage data. The one downside is that we do use the casts a bit in nir_validate and it's not a validate_assert. Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Connor Abbott <[email protected]>
* gallium/hud: Remove superfluous debugSteven Toth2016-10-064-52/+0
| | | | | | | No longer required. Signed-off-by: Steven Toth <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* amd: add amd_kernel_code_t.h to the sources listEmil Velikov2016-10-061-0/+1
| | | | | | | | Otherwise it won't be picked in the tarball and the build will fail. Fixes: 91ec6e56649 ("radeonsi/compute: Use the HSA abi for non-TGSI compute shaders v3") Signed-off-by: Emil Velikov <[email protected]>
* svga: add svga_mksstats.h to the sources listEmil Velikov2016-10-061-0/+1
| | | | | | | Otherwise it won't be picked in the tarball and the build will fail. Fixes: 0035f7f1365 ("svga: add guest statistic gathering interface") Signed-off-by: Emil Velikov <[email protected]>
* glx: rename choose_visual(), drop const argumentEmil Velikov2016-10-061-15/+11
| | | | | | | | | | | | | The function deals with fb (style) configs, thus using "visual" in the name is misleading. Which in itself had led to the use of fbconfig_style_tags argument. Rename the function to reflect what it does and drop the unneeded argument. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* glx: return GL_FALSE from glx_screen_init where applicable.Emil Velikov2016-10-061-2/+5
| | | | | | | | | | Return GL_FALSE if we fail to find any fb/visual configs, otherwise we end up with all sorts of chaos further down the GLX stack. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* glx: correctly mask the drawableType for GLX_ARB_fbconfig_floatEmil Velikov2016-10-061-1/+1
| | | | | | | | | | | The comment/spec says - only for pbuffer drawables, while the code clears the window/pixmap bit. Practise what you preach and apply the trivial tweak. In practise this should not cause functional change. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* autoconf: Make header install distinct for various APIs (v2)Chuck Atkins2016-10-063-10/+26
| | | | | | | | | | | | This fixes a problem where GL headers would only get installed if glx was enabled. So if osmesa was enabled but not glx, then the GL headers required by osmesa would be missing from the install. v2: Dropped unneeded mesa_glinterop.h redundant osmesa.h install Cc: [email protected] Signed-off-by: Chuck Atkins <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* mesa: annotate AttribFuncsARB[] as constEmil Velikov2016-10-061-1/+1
| | | | | | | | It's read-only data, so annotate it accordingly. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* mapi/glapi: remove unused _glapi_check_table()Emil Velikov2016-10-062-68/+0
| | | | | | | | | Similar to earlier commit - symbol was never part of the public API so we're safe to remove it. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* glapi/hgl: remove the final user of _glapi_check_table()Emil Velikov2016-10-062-10/+0
| | | | | | | | | | | | The symbol is a no-op since, the EXTRA_DEBUG macro is not set in the build. Unused by !Haiku people/platforms since 2010 (commit a73c6540d9a7f6e26d8568ba2fc522cb865f0a6c) while the Haiku C++ wrapper has no obvious users. Cc: Alexander von Gluck IV <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* mapi/glapi: remove unused _glapi_check_table_not_nullEmil Velikov2016-10-062-24/+0
| | | | | | | | Function was never part of the API/ABI and the final user was removed with commit a73c6540d9a7f6e26d8568ba2fc522cb865f0a6c, back in 2010. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* st/xvmc/tests: force enable assertionsEmil Velikov2016-10-061-0/+2
| | | | | | | | | | Similar to the other 'tests', enable assertions in xvmc_bench. This silences the GCC warnings about unused-variable(s), makes the program actually useful, as the XvMC API called. Atm the function calls are omitted, since they're called within the assert. Signed-off-by: Emil Velikov <[email protected]>
* anv: automake: ship intel_icd.json.in in the tarballEmil Velikov2016-10-061-0/+1
| | | | | | Otherwise we'll fail to (re)generate intel_icd.json. Signed-off-by: Emil Velikov <[email protected]>
* intel: automake: reference the correct headerEmil Velikov2016-10-062-2/+2
| | | | | | | | | | The header was renamed with earlier commit, so update the Makefile.sources respectively. {vulkan/genX_multisample.h => common/gen_sample_positions.h} Fixes: c779ad3e661("intel: Move Vulkan sample positions to common code") Signed-off-by: Emil Velikov <[email protected]>
* intel: aubinator: add missing return charactersLionel Landwerlin2016-10-061-5/+5
| | | | | Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* nir: Delete open coded type printing.Kenneth Graunke2016-10-063-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 <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* anv: fix GetPhysicalDeviceProperties to return timestampPeriod in nsPhilipp Zabel2016-10-061-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 <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965: remove remaining tabs in brw_draw.cTimothy Arceri2016-10-061-13/+13
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* i965: get inputs read from nir infoTimothy Arceri2016-10-0610-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 <[email protected]>
* i965: get outputs written from nir infoTimothy Arceri2016-10-066-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 <[email protected]>
* i965: get outputs read from nir infoTimothy Arceri2016-10-062-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 <[email protected]>
* i965: remove remaining tabs in brw_wm.cTimothy Arceri2016-10-061-44/+44
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: remove the UsesDFdy flagTimothy Arceri2016-10-065-22/+2
| | | | | | Seems the last user of this was removed in 08bc74e69. Reviewed-by: Kenneth Graunke <[email protected]>
* i965: get uses discard from nir infoTimothy Arceri2016-10-061-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 <[email protected]>
* i965: get uses texture gather from nir infoTimothy Arceri2016-10-063-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 <[email protected]>
* i965: Eliminate brw->cs.prog_data pointer.Kenneth Graunke2016-10-056-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 <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* i965: Eliminate brw->wm.prog_data pointer.Kenneth Graunke2016-10-0514-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 <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* i965: Eliminate brw->gs.prog_data pointer.Kenneth Graunke2016-10-0510-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 <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* i965: Eliminate brw->tes.prog_data pointer.Kenneth Graunke2016-10-0510-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 <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* i965: Eliminate brw->tcs.prog_data pointer.Kenneth Graunke2016-10-058-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 <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* i965: Eliminate brw->vs.prog_data pointer.Kenneth Graunke2016-10-0518-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 <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* i965: Introduce downcast helpers for prog_data structures.Kenneth Graunke2016-10-057-62/+66
| | | | | | | Similar to brw_context(...), intel_texture_object(...), and so on. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* i965/sync: Rename awkward variableChad Versace2016-10-051-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 <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965/sync: Rename intel_syncobj.c -> brw_sync.cChad Versace2016-10-053-2/+2
| | | | | Reviewed-by: Iago Toral Quiroga <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965/sync: Replace 'intel' prefix with 'brw'Chad Versace2016-10-053-37/+37
| | | | | | | This is yet another patch for the great renaming begun long ago. Reviewed-by: Iago Toral Quiroga <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>