summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
Commit message (Collapse)AuthorAgeFilesLines
* gallium: remove TGSI_SAT_MINUS_PLUS_ONEMarek Olšák2015-05-2011-78/+30
| | | | | | | | It's a remnant of some old NV extension. Unused. I also have a patch that removes predicates if anyone is interested. Reviewed-by: Roland Scheidegger <[email protected]>
* softpipe: start adding gather support (v2)Dave Airlie2015-05-203-83/+210
| | | | | | | | | | | | | | This adds both ARB_texture_gather and the enhanced gather for ARB_gpu_shader5. This passes all the piglit tests, it relies on the GLSL lowering pass to make textureGatherOffsets work. v2: use inline to get gather component (Brian) fix function name, add asserts (Brian) Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* softpipe: use arrays to make gather easierDave Airlie2015-05-201-36/+36
| | | | | | | | This is a prep change for gather, and it makes more sense to use an array in these cases. Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* softpipe: add textureOffset support.Dave Airlie2015-05-202-62/+97
| | | | | | | | | | | | | | This was an oversight when GLSL1.30 was enabled, I think my misunderstanding. This fixes a bunch of tex-miplevel-selection tests under softpipe, and is required for textureGather support. I'm not sure this won't make sampling slowering, but its softpipe, correctness first and all that. Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* softpipe: move control into a filter args structDave Airlie2015-05-202-26/+32
| | | | | | | more stuff for offsets and gather will go in here later. Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* softpipe: move some image filter parameters into a structDave Airlie2015-05-202-258/+224
| | | | | | | | | | | This moves some of the image filter args into a struct, and passes that instead, this is prep work for adding texture gather support which needs new arguments. review: make filter args const. Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* freedreno: fence fixRob Clark2015-05-181-1/+3
| | | | | | | | A fence can outlive the ctx, so we shouldn't deref the ctx to get at the screen. We need some updates in libdrm_freedreno API to completely handle fences properly, but this is at least an improvement. Signed-off-by: Rob Clark <[email protected]>
* gk110/ir: switch to gk104-style sched codes rather than all-in-oneIlia Mirkin2015-05-181-9/+9
| | | | | | Matches change to envydis/envyas tools. Signed-off-by: Ilia Mirkin <[email protected]>
* trace: implement new tessellation functionsMarek Olšák2015-05-162-0/+28
| | | | | Reviewed-by: Roland Scheidegger <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* gallium/drivers: Add extern "C" wrappers to public entryAlexander von Gluck IV2015-05-153-0/+24
| | | | Reviewed-by: Brian Paul <[email protected]>
* freedreno: fix bug in tile/slot calculationRob Clark2015-05-141-5/+4
| | | | | | | | | This was causing corruption with hw binning on a306. Unlikely that it is a306 specific, but rather the smaller gmem size resulted in different tile configuration which was triggering the bug at certain resolutions. Signed-off-by: Rob Clark <[email protected]> Cc: "10.4" and "10.5" and "10.6" <[email protected]>
* freedreno: enable a306Rob Clark2015-05-142-1/+2
| | | | | | | | | | | | | | | | Whitelist adreno 306 (as found in msm8916/apq8016). Works pretty much out of the box, although the smaller GMEM size requires more tiles to fit 1920x1080, so bump up the max # of tiles as well. Since it is just whitelist + trivial change, it makes sense to land on all the active release branches. Note that a305c ends up with gpu-id "306", hence a306 ends up with gpu-id of "307". Apparently that is what happens when you let the marketing dept name things. Cc: "10.4" and "10.5" and "10.6" <[email protected]> Signed-off-by: Rob Clark <[email protected]>
* nvc0: remove unused nv50_tsc_wrap_mode() functionSamuel Pitoiset2015-05-141-18/+0
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* nv50/ir: silence compiler warnings about mismatched tagsSamuel Pitoiset2015-05-141-3/+3
| | | | | | | | | | These warnings have been detected by Clang 3.6. codegen/nv50_ir_from_tgsi.cpp:1319:10: warning: struct 'Source' was previously declared as a class [-Wmismatched-tags] const struct tgsi::Source *code; Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* nv50/ir: remove unused private field cycle to SchedDataCalculatorSamuel Pitoiset2015-05-141-1/+0
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* nv30: remove unused nvfx_fp_memcpy() function and comment nv40_fp_bra()Samuel Pitoiset2015-05-141-14/+3
| | | | | | | | The nv40_fp_bra() function in the same file is also unused but this is the only place where the nv30/nv40 isa is documented. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* nvc0: do not expose MP counters for nvf0 (GK110+)Samuel Pitoiset2015-05-141-39/+50
| | | | | | | | | This fixes a crash when trying to monitor MP counters because compute support is not implemented for nvf0. Reported-by: Ilia Mirkin <[email protected]> Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* softpipe: enable ARB_texture_viewRoland Scheidegger2015-05-135-124/+179
| | | | | | | | | | | | | | | | | | | | | | Some bits were already there for texture views but some were missing. In particular for cube map views things needed to change a bit. For simplicity I ended up removing the separate face addr bit (just use the z bit) - cube arrays didn't use it already, so just follow the same logic there. (In theory using separate bits could allow for better hash function but I don't think anyone ever did some measurements of that so probably not worth the trouble, if we'd reintroduce it we'd certainly wanted to use the same logic for cube arrays and cube maps.) Also extend the seamless cube sampling to cube arrays - as there were no piglit failures before this is apparently untested, but things now generally work quite the same for cube textures and cube array textures so there hopefully shouldn't be any trouble... 49 new piglits, 47 pass, 2 fail (both due to fake multisampling). v2: incorporate Brian's feedback, add sampler view validation, function rename, formatting fixes. Reviewed-by: Brian Paul <[email protected]>
* llvmpipe: enable ARB_texture_viewRoland Scheidegger2015-05-133-9/+44
| | | | | | | | | | | | | | | All the functionality was pretty much there, just not tested. Trivially fix up the missing pieces (take target info from view not resource), and add some missing bits for cubes. Also add some minimal debug validation to detect uninitialized target values in the view... 49 new piglits, 47 pass, 2 fail (both related to fake multisampling, not texture_view itself). No other piglit changes. v2: move sampler view validation to sampler view creation, update docs. Reviewed-by: Brian Paul <[email protected]>
* nouveau: document nouveau_heapIlia Mirkin2015-05-121-0/+20
| | | | Signed-off-by: Ilia Mirkin <[email protected]>
* nvc0: switch mechanism for shader eviction to be a while loopIlia Mirkin2015-05-121-5/+6
| | | | | | | | | | This aligns it to work similarly to nv50. However there's no library code there, so the whole thing can be freed. Here we end up with an allocated node that's not attached to a specific program. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=86792 Signed-off-by: Ilia Mirkin <[email protected]> Cc: [email protected]
* gallium: add PIPE_CAP_DEVICE_RESET_STATUS_QUERYMarek Olšák2015-05-1213-0/+13
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* r600: use pipe->hw prim convert from radeonsiDave Airlie2015-05-111-15/+16
| | | | | | | | This avoids future addition to PIPE_PRIM_ from causing regressions on r600g. Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* freedreno/ir3/nir: fix build break after f752effaRob Clark2015-05-101-4/+3
| | | | | | | Our lower if/else pass was missed when converting NIR to use linked lists rather than hashsets to track use/def sets. Signed-off-by: Rob Clark <[email protected]>
* nv50/ir: only enable mul saturate on G200+Ilia Mirkin2015-05-091-1/+4
| | | | | | | | | | | | | Commit 44673512a84 enabled support for saturating fmul. However experimentally this does not seem to work on the older chips. Restrict the feature to G200 (NVA0) and later. Reported-by: Pierre Moreau <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90350 Signed-off-by: Ilia Mirkin <[email protected]> Tested-by: Pierre Moreau <[email protected]> Reviewed-by: Tobias Klausmann <[email protected]> Cc: [email protected]
* nvc0: reset the instanced elements state when doing blit using 3d engineIlia Mirkin2015-05-091-0/+6
| | | | | | | | | | | | | | Since we update num_vtxelts here, we could otherwise end up with stale instancing information in the upper bits which wouldn't otherwise get reset. (Also we run the risk of the previous draw having set the first element as instanced.) This appears as one of the causes for the test pointed out in fdo#90363 to fail on nvc0. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90363 Signed-off-by: Ilia Mirkin <[email protected]> Cc: [email protected]
* nvc0: keep track of PGRAPH state in nvc0_screenIlia Mirkin2015-05-094-24/+34
| | | | | | | | | | See identical commit for nv50. Destroying the current context and then creating a new one or switching to another existing context would cause the "current" state to not be properly initialized, so we save it off in the screen. Signed-off-by: Ilia Mirkin <[email protected]> Cc: [email protected]
* nv50: keep track of PGRAPH state in nv50_screenIlia Mirkin2015-05-094-30/+36
| | | | | | | | | | | | | | Normally this is kept in nv50_context, and on switching the active context, the state is copied from the previous context. However when the last context is destroyed, this is lost, and a new context might later be created. When the currently-active context is destroyed, save its state in the screen, and restore it when setting the current context. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90363 Reported-by: Matteo Bruni <[email protected]> Signed-off-by: Ilia Mirkin <[email protected]> Tested-by: Matteo Bruni <[email protected]> Cc: [email protected]
* util: Move gallium's linked list to utilJason Ekstrand2015-05-0820-22/+17
| | | | | | | | | The linked list in gallium is pretty much the kernel list and we would like to have a C-based linked list for all of mesa. Let's not duplicate and just steal the gallium one. Acked-by: Connor Abbott <[email protected]> Reviewed-by: Rob Clark <[email protected]>
* nv50/ir: only propagate saturate up if some actual folding took placeIlia Mirkin2015-05-081-1/+2
| | | | | | | | | | The former logic would copy the saturate up to any mul with an immediate if there was a subsequent mul with a saturate. However we only want to do that if we collapsed 2 muls by multiplying their immediates (or were able to put the immediate in as a post-multiplier). Signed-off-by: Ilia Mirkin <[email protected]> Cc: [email protected]
* nv50/ir: add SHL to the list of U32 opcodesIlia Mirkin2015-05-061-0/+1
| | | | | | | | Having the wrong inferred type prevents a number of optimizations, including constant propagation (since float immediates work differently than integer immediates). Signed-off-by: Ilia Mirkin <[email protected]>
* r600g: Fix Clang return-type build error.Vinson Lee2015-05-061-1/+1
| | | | | | | | | | | | | | Fix Clang return-type error introduced with commit 96f164f6f047833091eb98a73aa80c31dc94f962 "gallium: make pipe_context::begin_query return a boolean". CC r600_query.lo r600_query.c:443:3: error: non-void function 'r600_begin_query' should return a value [-Wreturn-type] return; ^ Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Tom Stellard <[email protected]>
* ilo: silence a compiler warningChia-I Wu2015-05-061-1/+1
| | | | | | | | Silence ilo_query.c:120:7: warning: 'return' with no value, in function returning non-void since commit 96f164f6.
* nvc0: all queries use an unsigned 64-bits integer by defaultSamuel Pitoiset2015-05-061-5/+7
| | | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Martin Peres <[email protected]>
* nvc0: make begin_query return false when all MP counters are usedSamuel Pitoiset2015-05-061-5/+8
| | | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Martin Peres <[email protected]>
* nvc0: define driver-specific query groupsSamuel Pitoiset2015-05-063-0/+76
| | | | | | | | This patch defines "Driver statistics" and "MP counters" groups, but only the latter will be exposed through GL_AMD_performance_monitor. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Martin Peres <[email protected]>
* gallium: make pipe_context::begin_query return a booleanSamuel Pitoiset2015-05-0617-33/+50
| | | | | | | | | GL_AMD_performance_monitor must return an error when a monitoring session cannot be started. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Martin Peres <[email protected]>
* gallium: replace pipe_driver_query_info::max_value by a unionSamuel Pitoiset2015-05-064-25/+26
| | | | | | | | This allows queries to return different numeric types. Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Martin Peres <[email protected]>
* gallium: add new fields to pipe_driver_query_infoSamuel Pitoiset2015-05-063-18/+16
| | | | | | | | | | | | | | According to the spec of GL_AMD_performance_monitor, valid type values returned are UNSIGNED_INT, UNSIGNED_INT64_AMD, PERCENTAGE_AMD, FLOAT. This also introduces the new field group_id in order to categorize queries into groups. v2: add PIPE_DRIVER_QUERY_TYPE_BYTES v3: fix incorrect query type for radeon and svga drivers Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Martin Peres <[email protected]>
* ilo: use ilo_image exclusively in coreChia-I Wu2015-05-024-139/+149
| | | | | Initialize ilo_view_surface and ilo_zs_surface from ilo_image instead of ilo_texture.
* ilo: add ilo_image_can_enable_aux()Chia-I Wu2015-05-029-50/+27
| | | | It replaces ilo_texture_can_enable_hiz().
* ilo: make ilo_image more self-containedChia-I Wu2015-05-022-9/+21
| | | | Add depth0, sample_count, and scanout to ilo_image.
* ilo: add ilo_image_init_for_imported()Chia-I Wu2015-05-023-60/+66
| | | | | It replaces ilo_image_update_for_imported_bo() and enables more error checkings for imported textures.
* ilo: prepare for image init for imported boChia-I Wu2015-05-021-120/+129
| | | | Refactoring in prepraration for ilo_image_init_for_imported().
* ilo: constify ilo_image_paramsChia-I Wu2015-05-021-11/+11
| | | | Make ilo_image_params const in functions that do not modify it.
* ilo: improve readability of ilo_imageChia-I Wu2015-05-026-111/+127
| | | | Improve docs, rename struct fields, and reorder walk types. No real changes.
* ilo: move command builder to coreChia-I Wu2015-05-0223-61/+74
|
* ilo: move ilo_state_3d* to coreChia-I Wu2015-05-029-276/+274
| | | | ilo state structs (struct ilo_xxx_state) are moved as well.
* ilo: add ilo_buffer.h to coreChia-I Wu2015-05-025-90/+138
| | | | Rename the original ilo_buffer to ilo_buffer_resource to avoid name conflict.
* ilo: move BOs from ilo_texture to ilo_imageChia-I Wu2015-05-027-39/+63
| | | | We want to work with ilo_image instead of ilo_texture in core.