summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* i965/drm: Drop libpciaccess dependencies.Kenneth Graunke2017-04-102-49/+0
| | | | | | | | | | | | | | | | | | | | i965 doesn't use drm_intel_get_aperture_sizes(), so we can delete support for it. This avoids a build dependency on libpciaccess. Chris also notes: "There's a really old bug that hopefully has been closed already (although as far as I can tell, it has never been fixed) about how using libpciaccess from libdrm_intel breaks the world (since libpciaccess uses a singleton that is torn down at the first request rather than upon the last user)." This bug should go away in two commits when we switch over to our internal copy of libdrm_intel. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=84325 Reviewed-by: Chris Wilson <[email protected]> Acked-by: Jason Ekstrand <[email protected]>
* i965/drm: Make libdrm_lists.h compile by defining typeof.Kenneth Graunke2017-04-101-0/+4
| | | | | | | typeof doesn't seem to exist, so this won't compile (but we don't yet try). Define it to __typeof__. This code is going to die soon anyway. Acked-by: Jason Ekstrand <[email protected]>
* i965/drm: remove legacy defines, aub functions, and decoder prototypesKenneth Graunke2017-04-102-176/+0
| | | | | | | | | We never imported any of this code, so drop the prototypes, unused enums, and defines. Based on patches by Emil Velikov. Acked-by: Jason Ekstrand <[email protected]>
* i965: Import libdrm_intel.Kenneth Graunke2017-04-109-0/+6724
| | | | | | | | | | | | | | This imports commit 19c4cfc54918d361f2535aec16650e9f0be667cd of libdrm/intel/*.[ch], minus a few files that we're never going to use (and would immediately delete), plus a few necessary dependencies. We rename intel_bufmgr.h to brw_bufmgr.h to avoid #include conflicts. We also fix UTF-8 symbol problems in intel_bufmgr_gem.c comments because vim keeps trying to fix that every time I edit the file, and we may as well fix it right away. Acked-by: Chris Wilson <[email protected]> Acked-by: Jason Ekstrand <[email protected]>
* i965: Make sure we don't use CPU maps for the scanout buffer.Kenneth Graunke2017-04-101-1/+13
| | | | | | | | | | | | | | | | | | | | Using an incoherent CPU map on the active scanout buffer is really sketchy - we may need extra flushing via GEM_SW_FINISH, or using drmModeDirtyFB() and kernel commit a6a7cc4b7db6d (4.10+). Chris suggests "never ever do that", which seems like a wise plan! intel_miptree_map_raw() uses CPU maps on linear buffers. Having a linear scanout buffer should be really rare, and mapping the front buffer should be similarly rare. Together, it should basically never happen. But, in case it does somehow...make sure that mapping the scanout buffer always goes through an uncached GTT map. v2: Add a giant comment written by Chris Wilson. Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Chris Wilson <[email protected]>
* i965: Stop calling drm_intel_bufmgr_gem_enable_fenced_relocs().Kenneth Graunke2017-04-101-2/+0
| | | | | | | This does nothing on Gen4+, which is the only hardware we support. Reviewed-by: Chris Wilson <[email protected]> Acked-by: Jason Ekstrand <[email protected]>
* i965: Fix GLX_MESA_query_renderer video memory on 32-bit.Kenneth Graunke2017-04-101-4/+12
| | | | | | | | | | | | | | | | | | | | | | | On modern systems with 4GB apertures, the size in bytes is 4294967296, or (1ull << 32). The kernel gives us the aperture size as a __u64, which works out great. Unfortunately, libdrm "helpfully" returns the data as a size_t, which on 32-bit systems means it truncates the aperture size to 0 bytes. We've happily reported this value as 0 MB of video memory via GLX_MESA_query_renderer since it was originally exposed. This patch bypasses libdrm and calls the ioctl ourselves so we can use a proper uint64_t, avoiding the 32-bit integer overflow. We now report a proper video memory size on 32-bit systems. Chris points out that the aperture size (CPU mappable size limit) isn't really the right thing to be checking. But libdrm_intel uses it to fail execbuffer, so it is an actual limit for now. Once that's fixed we can probably move to something else. In the meantime, fix the obvious typecasting bug. Reviewed-by: Jason Ekstrand <[email protected]>
* gallium/radeon: add HUD queries for GPU temperature and clocksSamuel Pitoiset2017-04-102-7/+12
| | | | | | | | | | | | | | | Only the Radeon kernel driver exposed the GPU temperature and the shader/memory clocks, this implements the same functionality for the AMDGPU kernel driver. These queries will return 0 if the DRM version is less than 3.10, I don't explicitely check the version here because the query codepath is already a bit messy. v2: - rebase on top of master Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* configure.ac: require libdrm_amdgpu 2.4.79Samuel Pitoiset2017-04-101-1/+1
| | | | | | | The sensor info requires amdgpu_query_sensor_info(). Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: add new si_check_render_feedback_texture() helperSamuel Pitoiset2017-04-101-45/+44
| | | | | | | For bindless. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: add new si_decompress_color_texture() helperSamuel Pitoiset2017-04-101-13/+17
| | | | | | | For bindless. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: add new depth_needs_decompression() helperSamuel Pitoiset2017-04-101-2/+8
| | | | | | | v2: - rename to depth_needs_decompression() instead Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: add a 'break' in si_check_render_feedback_*()Samuel Pitoiset2017-04-101-2/+6
| | | | | | | No need to check all color buffers. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: re-use 'desc' in si_set_shader_image()Samuel Pitoiset2017-04-101-2/+1
| | | | | | | No need to compute the offset in the descriptor twice. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* ac: add unreachable() in ac_build_image_opcode()Samuel Pitoiset2017-04-101-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | To silent the following compiler warning: common/ac_llvm_build.c: In function ‘ac_build_image_opcode’: common/ac_llvm_build.c:1080:3: warning: ‘name’ may be used uninitialized in this function [-Wmaybe-uninitialized] snprintf(intr_name, sizeof(intr_name), "%s%s%s%s.v4f32.%s.v8i32", ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ name, ~~~~~ a->compare ? ".c" : "", ~~~~~~~~~~~~~~~~~~~~~~~ a->bias ? ".b" : ~~~~~~~~~~~~~~~~ a->lod ? ".l" : ~~~~~~~~~~~~~~~ a->deriv ? ".d" : ~~~~~~~~~~~~~~~~~ a->level_zero ? ".lz" : "", ~~~~~~~~~~~~~~~~~~~~~~~~~~~ a->offset ? ".o" : "", ~~~~~~~~~~~~~~~~~~~~~~ type); ~~~~~ Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* r600g: get rid of dummy pixel shaderConstantine Kharlamov2017-04-103-40/+30
| | | | | | | | | | | | | | | | The idea is taken from radeonsi. The code mostly was already checking for null pixel shader, so little checks had to be added. Interestingly, acc. to testing with GTAⅣ, though binding of null shader happens a lot at the start (then just stops), but draw_vbo() never actually sees null ps. v2: added a check I missed because of a macros using a prefix to choose a shader. Signed-off-by: Constantine Kharlamov <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* r600g: add draw_vbo check for a NULL pixel shaderConstantine Kharlamov2017-04-104-2/+10
| | | | | | | | Taken from radeonsi, required to remove dummy pixel shader in the next patch Signed-off-by: Constantine Kharlamov <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* r600g: skip repeating vs, gs, and tes shader bindsConstantine Kharlamov2017-04-101-1/+7
| | | | | | | | | | | | | | | | | | | The idea is taken from radeonsi. The code lacks some checks for null vs, and I'm unsure about some changes against that, so I left it in place. Some statistics for GTAⅣ: Average tesselation bind skip per frame: ≈350 Average geometric shaders bind skip per frame: ≈260 Skip of binding vertex ones occurs rarely enough to not get into per-frame counter at all, so I just gonna say: it happens. v2: I've occasionally removed an empty line, don't do this. v3: return a check for null tes and gs back, while I haven't figured out the way to move stride assignment to r600_update_derived_state() (as it is in radeonsi). Signed-off-by: Constantine Kharlamov <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* mesa: use single memcpy when strides match in glReadPixels, texstore codeBartosz Tomczyk2017-04-102-9/+21
| | | | | | v2: fix indentation Reviewed-by: Brian Paul <[email protected]>
* intel/blorp: Use ISL for emitting depth/stencil/hizJason Ekstrand2017-04-101-86/+33
| | | | Reviewed-by: Topi Pohjolainen <[email protected]>
* intel/blorp: Emit 3DSTATE_STENCIL_BUFFER before HIER_DEPTHJason Ekstrand2017-04-101-12/+12
| | | | | | | We're about to replace blorp's emit code with ISL and it emits them in the other order. This makes diffing the aubs easier. Reviewed-by: Topi Pohjolainen <[email protected]>
* anv: Use ISL for emitting depth/stencil/hizJason Ekstrand2017-04-103-181/+41
| | | | Reviewed-by: Topi Pohjolainen <[email protected]>
* intel/isl: Add support for emitting depth/stencil/hizJason Ekstrand2017-04-105-0/+401
| | | | Reviewed-by: Topi Pohjolainen <[email protected]>
* amd/addrlib: use correct variable name in headerThomas Hindoe Paaboel Andersen2017-04-101-1/+1
| | | | | | | | Since the inclusion in 7f160efcde41b52ad78e562316384373dab419e3 the header used x_biased, while the implementation used y_biased. This changes the header to macth the implementation since the uses of the function seems to expect y_biased. Reviewed-by: Marek Olšák <[email protected]>
* mesa/st: take ownership rather than adding reference for new renderbuffersTimothy Arceri2017-04-101-5/+13
| | | | | | | | | | This avoids locking in the reference calls and fixes a leak after the RefCount initialisation was change from 0 to 1. Fixes: 32141e53d1520 (mesa: tidy up renderbuffer RefCount initialisation) Reviewed-by: Emil Velikov <[email protected]> Tested-by: Bartosz Tomczyk <[email protected]>
* x11: take ownership rather than adding reference for new renderbuffersTimothy Arceri2017-04-101-4/+4
| | | | | | | | | This avoids locking in the reference calls and fixes a leak after the RefCount initialisation was change from 0 to 1. Fixes: 32141e53d1520 (mesa: tidy up renderbuffer RefCount initialisation) Reviewed-by: Emil Velikov <[email protected]>
* osmesa: tidy up renderbuffer refCount initialisationTimothy Arceri2017-04-101-1/+0
| | | | | | | 32141e53d1520 changed _mesa_init_renderbuffer() to set it to 1 for us. Reviewed-by: Emil Velikov <[email protected]>
* swrast: take ownership rather than adding reference for new renderbuffersTimothy Arceri2017-04-102-13/+10
| | | | | | | | | This avoids locking in the reference calls and fixes a leak after the RefCount initialisation was change from 0 to 1. Fixes: 32141e53d1520 (mesa: tidy up renderbuffer RefCount initialisation) Reviewed-by: Emil Velikov <[email protected]>
* radeon: take ownership rather than adding reference for new renderbuffersTimothy Arceri2017-04-101-5/+5
| | | | | | | | | This avoids locking in the reference calls and fixes a leak after the RefCount initialisation was change from 0 to 1. Fixes: 32141e53d1520 (mesa: tidy up renderbuffer RefCount initialisation) Reviewed-by: Emil Velikov <[email protected]>
* nouveau: take ownership rather than adding reference for new renderbuffersTimothy Arceri2017-04-101-5/+5
| | | | | | | | | This avoids locking in the reference calls and fixes a leak after the RefCount initialisation was change from 0 to 1. Fixes: 32141e53d1520 (mesa: tidy up renderbuffer RefCount initialisation) Reviewed-by: Emil Velikov <[email protected]>
* i965: take ownership rather than adding reference for new renderbuffersTimothy Arceri2017-04-101-6/+7
| | | | | | | | | This avoids locking in the reference calls and fixes a leak after the RefCount initialisation was change from 0 to 1. Fixes: 32141e53d1520 (mesa: tidy up renderbuffer RefCount initialisation) Reviewed-by: Emil Velikov <[email protected]>
* i915: take ownership rather than adding reference for new renderbuffersTimothy Arceri2017-04-101-4/+5
| | | | | | | | | This avoids locking in the reference calls and fixes a leak after the RefCount initialisation was change from 0 to 1. Fixes: 32141e53d1520 (mesa: tidy up renderbuffer RefCount initialisation) Reviewed-by: Emil Velikov <[email protected]>
* mesa: create _mesa_attach_renderbuffer_without_ref() helperTimothy Arceri2017-04-102-8/+40
| | | | | | | | | | | | | | | This will be used to take ownership of freashly created renderbuffers, avoiding the need to call the reference function which requires locking. V2: dereference any existing fb attachments and actually attach the new rb. v3: split out validation and attachment type/complete setting into a shared static function. Reviewed-by: Emil Velikov <[email protected]> Tested-by: Bartosz Tomczyk <[email protected]>
* nv50/ir: remove unused swizzle field in ValueRefIlia Mirkin2017-04-091-1/+0
| | | | | | | | The nv50 ir is scalar. Perhaps this was from some early attempts to integrate the simd aspects of nv30. However at this point it's entirely unused. Signed-off-by: Ilia Mirkin <[email protected]>
* nouveau: enable ARB_shader_clock on nv50 and nvc0Boyan Ding2017-04-094-4/+4
| | | | | | | v2: Also enable support on nv50 Signed-off-by: Boyan Ding <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* nv50/ir: Handle TGSI_OPCODE_CLOCKBoyan Ding2017-04-091-0/+7
| | | | | | Signed-off-by: Boyan Ding <[email protected]> [imirkin: make zero mov non-fixed] Reviewed-by: Ilia Mirkin <[email protected]>
* gm107/ir: Emit SV_CLOCK system valueBoyan Ding2017-04-091-0/+1
| | | | | Signed-off-by: Boyan Ding <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* gbm: Assert modifiers and count are copaceticBen Widawsky2017-04-091-0/+3
| | | | | | | | | | | | | The API/entry point in mesa already checks the correct behavior, however, it's possible to be handled by another implementation and those implementations should not be able to abuse a weird combination of count and pointer. This fixes CID 1403193 Cc: Mark Janes <[email protected]> Signed-off-by: Ben Widawsky <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* st/mesa: Use compressed fog mode for atifs.Gustaw Smolarczyk2017-04-082-19/+4
| | | | | | Signed-off-by: Gustaw Smolarczyk <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* mesa/main/ff_frag: Use compressed TexEnv Combine state.Gustaw Smolarczyk2017-04-081-231/+104
| | | | | | | | Along the way, add missing GL_ONE source support and drop non-existing GL_ZERO and GL_ONE operand support. Signed-off-by: Gustaw Smolarczyk <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* mesa/main/ff_frag: Use compressed fog mode.Gustaw Smolarczyk2017-04-081-17/+1
| | | | | Signed-off-by: Gustaw Smolarczyk <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* mesa/main: Maintain compressed TexEnv Combine state.Gustaw Smolarczyk2017-04-082-0/+186
| | | | | Signed-off-by: Gustaw Smolarczyk <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* mesa/main: Maintain compressed fog mode.Gustaw Smolarczyk2017-04-083-0/+24
| | | | | Signed-off-by: Gustaw Smolarczyk <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* mesa/main/ff_frag: Don't retrieve format if not necessary.Gustaw Smolarczyk2017-04-081-9/+6
| | | | | | Signed-off-by: Gustaw Smolarczyk <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* mesa/main/ff_frag: Use gl_texture_object::TargetIndex.Gustaw Smolarczyk2017-04-081-2/+1
| | | | | | | Instead of computing it once again using _mesa_tex_target_to_index. Signed-off-by: Gustaw Smolarczyk <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* mesa/main/ff_frag: Store nr_enabled_units only once.Gustaw Smolarczyk2017-04-081-2/+4
| | | | | Signed-off-by: Gustaw Smolarczyk <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* mesa/main/ff_frag: Simplify get_fp_input_mask.Gustaw Smolarczyk2017-04-081-56/+55
| | | | | | | | | | | Change it into filter_fp_input_mask transform function that instead of returning a mask, transforms input. Also, simplify the case of vertex program handling by assuming that fp_inputs is always a combination of VARYING_BIT_COL* and VARYING_BIT_TEX*. Signed-off-by: Gustaw Smolarczyk <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* mesa/main/ff_frag: Don't bother with VARYING_BIT_FOGC.Gustaw Smolarczyk2017-04-081-3/+1
| | | | | | | It's not used. Signed-off-by: Gustaw Smolarczyk <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* mesa/main/ff_frag: Remove unused struct.Gustaw Smolarczyk2017-04-081-8/+0
| | | | | Signed-off-by: Gustaw Smolarczyk <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* mesa/main/ff_frag: Reduce the size of nr_enabled_units.Gustaw Smolarczyk2017-04-081-1/+1
| | | | | | | | Since it holds values from 0 to 8, 4 bits will suffice. Signed-off-by: Gustaw Smolarczyk <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Signed-off-by: Marek Olšák <[email protected]>