summaryrefslogtreecommitdiffstats
path: root/src/mesa
Commit message (Collapse)AuthorAgeFilesLines
* mesa/bufferobj: fix atomic offset/size getDave Airlie2017-10-131-2/+4
| | | | | | | | | | | When I realigned the bufferobj code, I didn't see the getters were different, realign the getters to work the same as ssbo. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103214 Fixes: 65d3ef7cd (mesa: align atomic buffer handling code with ubo/ssbo (v1.1)) Reviewed-by: Samuel Pitoiset <[email protected]> Tested-by: Mark Janes <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* mesa: Disallow GL_RED/GL_RG with half-floats on GLES2.Eric Anholt2017-10-121-0/+4
| | | | | | | | | Sure, you'd think that the combination of GL_OES_texture_half_float and GL_EXT_texture_rg would mean that GL_RG16F exists, but it doesn't. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103227 Fixes: c16a7443e999 ("mesa: Expose GL_OES_required_internalformat on GLES contexts.") Reviewed-by: Nicolai Hähnle <[email protected]>
* st/glsl_to_tgsi: the second destination doesn't support relative addressingNicolai Hähnle2017-10-111-5/+2
| | | | | | | | It's not used -- DFRACEXP gets array indexes of its exponent out-parameter lowered earlier -- and it wouldn't have worked correctly anyway when both dst and dst1 use relative addressing. Reviewed-by: Marek Olšák <[email protected]>
* st/glsl_to_tgsi: fix DFRACEXP with only one destinationNicolai Hähnle2017-10-111-15/+23
| | | | | | | | Replace the undefined destination by a new temporary register. Cleanup merge_two_dsts while we're at it. Reviewed-by: Marek Olšák <[email protected]>
* st/glsl_to_tgsi: fix indirect access to 64-bit integerNicolai Hähnle2017-10-111-1/+1
| | | | | | | | | | | | Make sure we actually allocate two adjacent TGSI temporaries. The current code fails e.g. when an arithmetic operation has two operands with indirect accesses. I will send out a new piglit test (arb_gpu_shader_int64/execution/indirect-array-two-accesses.shader_test) Cc: [email protected] Reviewed-by: Marek Olšák <[email protected]>
* st/mesa: don't assign prog->ShadowSamplersNicolai Hähnle2017-10-112-5/+0
| | | | | | | | It's not used, and the assignment for the TGSI case was incorrect for sampler arrays. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* st/glsl_to_tgsi: ignore GL_TEXTURE_SRGB_DECODE_EXT for samplers used with ↵Nicolai Hähnle2017-10-118-17/+63
| | | | | | | | | | | | | | texelFetch*() See the comment for the relevant spec quote. Fixes dEQP-GLES31.functional.srgb_texture_decode.skip_decode.srgba8.texel_fetch v2: note the interaction between ARB_bindless_texture and EXT_texture_sRGB_decode as a TODO Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* st/mesa: store state that affects sampler views per contextNicolai Hähnle2017-10-114-41/+44
| | | | | | | | | | | | | This fixes sequences like: 1. Context 1 samples from texture with sRGB decode enabled 2. Context 2 samples from texture with sRGB decode disabled 3. Context 1 samples from texture with sRGB decode disabled Previously, step 3 would see the prev_sRGBDecode value from context 2 and would incorrectly use the old sampler view with sRGB decode enabled. Reviewed-by: Marek Olšák <[email protected]>
* i965: Drop brw_bo_alloc in ARB_indirect_parameters implementation.Kenneth Graunke2017-10-111-1/+1
| | | | | | | | | | The original implementation allocated a new BO here, but we decided to switch to intel_upload_space, which returns a reference to the current upload BO. We accidentally kept the brw_bo_alloc, even though it's no longer necessary - intel_upload_space will immediately unreference it, causing us to allocate and immediately free a buffer. Reviewed-by: Plamena Manolova <[email protected]>
* i965: Allow mapped VBOs during drawing in non-debug contexts.Kenneth Graunke2017-10-111-0/+3
| | | | | | | | | | | | | | | | | | | | | | Section 6.3.2 of the GL 4.5 spec says: "Any GL command which attempts to read from, write to, or change the state of a buffer object may generate an INVALID_OPERATION error if all or part of the buffer object is mapped ... However, only commands which explicitly describe this error are required to do so. If an error is not generated, such commands will have undefined results and may result in GL interruption or termination." Setting this flag allows us to skip walking over the buffer bindings for every enabled vertex attribute (_mesa_all_buffers_are_unmapped). Improves performance in GFXBench4's gl_driver2_off microbenchmark by 3.05797% +/- 0.709031% (n=33) on Apollolake. This breaks KHR-*.draw_elements_base_vertex_tests.invalid_mapped_bos, but that test is invalid and has been removed from the upstream CTS. Reviewed-by: Eric Anholt <[email protected]>
* i965: Make brw_update_texture_surface static.Kenneth Graunke2017-10-112-5/+1
| | | | Trivial. It's not used in other files.
* mesa/st: fix atomic buffer sizing to align with ssbo.Dave Airlie2017-10-111-0/+6
| | | | | | | | This respects the size from the range setting like ssbo. Reviewed-by: Samuel Pitoiset <[email protected]> Reviewed-by: Iago Toral Quiroga <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* mesa/bufferobj: consolidate some buffer binding code.Dave Airlie2017-10-111-42/+35
| | | | | | | | | These paths are again 90% the same, consolidate them into one. Reviewed-by: Samuel Pitoiset <[email protected]> Reviewed-by: Iago Toral Quiroga <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* mesa/bufferobj: consolidate some codepaths between ubo/ssbo/atomics.Dave Airlie2017-10-111-102/+47
| | | | | | | | | These are 90% the same code, consolidate them into a couple of common codepaths. Reviewed-by: Samuel Pitoiset <[email protected]> Reviewed-by: Iago Toral Quiroga <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* mesa: rename various buffer bindings to one struct.Dave Airlie2017-10-117-45/+20
| | | | | | | | One binding to bind them all, these are all the same thing. Reviewed-by: Samuel Pitoiset <[email protected]> Reviewed-by: Iago Toral Quiroga <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* mesa: align atomic buffer handling code with ubo/ssbo (v1.1)Dave Airlie2017-10-112-44/+92
| | | | | | | | | | | | | | this adds automatic size support to the atomic buffer code, but also realigns the code to act like the ubo/ssbo code. v1.1: add missing blank lines. reindent one block properly. check for NullBufferObj. Reviewed-by: Samuel Pitoiset <[email protected]> Reviewed-by: Iago Toral Quiroga <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* main/format: skip format conversion if src and dst format are equalKarol Herbst2017-10-101-0/+14
| | | | | | | | | | | Fixes 'KHR-GL45.copy_image.functional' on Nouveau and i965. v2: (by Kenneth Graunke) Rewrite patch according to Jason Ekstrand's review feedback. This makes it handle differing strides, which i965 needed. Signed-off-by: Karol Herbst <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* mesa: Make _mesa_get_format_bytes handle array formats.Jason Ekstrand2017-10-101-0/+5
| | | | | | This is easier than making callers handle a bunch of special cases. Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Disable auxiliary buffers when there are self-dependencies.Kenneth Graunke2017-10-103-25/+37
| | | | | | | | | | | | | | | | | | | Jason and I investigated several OpenGL CTS failures where the tests bind the same texture for rendering and texturing, at the same time. This has defined results as long as the reads happen before writes, or the regions are non-overlapping. Normally, this just works out. However, CCS can cause problems. If the shader is reading one set of pixels, and writing to different pixels that are adjacent, they may end up being covered by the same CCS block. So rendering may be writing a CCS block, while the sampler is trying to read it. Corruption ensues. Disabling CCS is unfortunate, but safe. Fixes several KHR-GL45.texture_barrier.* subtests. Reviewed-by: Nanley Chery <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* mesa: Alphabetize GL_MESA_tile_raster_order in the extensions list.Eric Anholt2017-10-101-1/+1
| | | | trivial, fixes make check.
* mesa: Implement a new GL_MESA_tile_raster_order extension.Eric Anholt2017-10-107-0/+62
| | | | | | | | | | | | | | The intent is to use this extension on vc4 to allow X11 to do overlapping CopyArea() within a pixmap without first blitting the pixmap to a temporary. With associated glamor patches, improves x11perf -copywinwin100 performance on a Raspberry Pi 3 from ~4700/sec to ~5130/sec, and is an even larger boost to uncomposited window movement performance (most copywinwin100 copies don't overlap). v2: Fix glIsEnabled() on the new enums. v3: Drop the local spec since I'm upstreaming the spec. Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa: move _mesa_half_is_negative() to half_float.hBrian Paul2017-10-101-6/+0
| | | | | | | | v2: use !! in the function to be explicit about type conversion. Though, gcc generates the same code with or without the logical !!. Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* mesa: move _mesa_exec_malloc/free() prototypes to their own headerBrian Paul2017-10-106-7/+41
| | | | | | | | Try to start removing things from the cluttered imports.h file. v2: add new header to Makefile.sources Reviewed-by: Roland Scheidegger <[email protected]>
* i965: minor whitespace fixKenneth Graunke2017-10-101-1/+1
|
* mesa: Set new renderbuffers to RGBA4 on all GLES contexts.Eric Anholt2017-10-101-1/+1
| | | | | | | | | Before we were doing RGBA4 on GLES3 only, but as of GLES2 2.0.22 it should be RGBA4 as well. Fixes DEQP functional.state_query.rbo.renderbuffer_internal_format. Tested-by: Matt Turner <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa: Expose GL_OES_required_internalformat on GLES contexts.Eric Anholt2017-10-104-38/+74
| | | | | | | | | | | | | | | | | | | | | | | This extension is effectively a backport of GLES3's internalformat handling to GLES 1/2. It guarantees that sized internalformats specified for textures and renderbuffers have at least the specified size stored. That's a pretty minimal requirement, so I think it can be dummy_true and exposed as a standard in Mesa. As a side effect, it also allows GL_RGB565 to be specified as a texture format, not just as a renderbuffer. Mesa had previously been allowing 565 textures, which angered DEQP in the absence of this extension being exposed. v2: Allow 2101010rev with sized internalformats even on GLES3, citing the extension spec. Extend extension checks for GLES2 contexts exposing with texture_float, texture_half_float, and texture_rg. v3: Fix ALPHA/LUMINANCE/LUMINANCE_ALPHA error checking (GLES3 CTS failures) v4: Mark GL_RGB10 non-color-renderable on ES, fix A/L/LA errors on GLES2 with float formats. Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa: Only expose GLES's EXT_texture_type_2_10_10_10_REV if supported in HW.Eric Anholt2017-10-105-2/+10
| | | | | | | | | | | | Previously, we were downconverting to 8888 automatically if the hardware didn't suport it. However, with the advent of GL_OES_required_internalformat, we have to actually store the internalformats we advertise support for. And, it seems rather disingenuous to advertise the extension if we don't actually support it. v2: Throw an error when using the format on ES2 without the extension present. Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium: Add support for 5551 with the 1-bit field in the low bit.Eric Anholt2017-10-101-2/+12
| | | | | | | | | | | | This is how VC4 stores 5551 textures, which we need to support for GL_OES_required_internalformat. v2: Extend commit message, fix svga driver build, add BE ordering from Roland. v3: Rebase on PIPE_FORMAT_R10G10B10X2_UNORM addition. Reviewed-by: Marek Olšák <[email protected]> (v2) Reviewed-by: Nicolai Hähnle <[email protected]> (v2)
* mesa: Add X1B5G5R5 along with A1B5G5R5.Eric Anholt2017-10-105-0/+9
| | | | | | | | | | For supporting RGB5 in hardware with A in the low bit (vc4), we need this format as well. v2: Add proper _mesa_format_matches_format_and_type() support (from Nicolai). Reviewed-by: Nicolai Hähnle <[email protected]> (v1)
* st/dri: implement createImageFromRenderbuffer(2)Nicolai Hähnle2017-10-101-0/+5
| | | | | | Tested with dEQP-EGL.functional.image.*renderbuffer* tests. Reviewed-by: Eric Anholt <[email protected]>
* st/mesa: don't clobber glGetInternalformat* buffer for GL_NUM_SAMPLE_COUNTSNicolai Hähnle2017-10-101-1/+2
| | | | | | | | | | Applications might pass in a buffer that is sized too large and rely on the extra space of the buffer not being overwritten. Fixes dEQP-GLES31.functional.state_query.internal_format.partial_query.num_sample_counts Cc: [email protected] Reviewed-by: Marek Olšák <[email protected]>
* st/mesa: whitespace fixNicolai Hähnle2017-10-101-1/+1
| | | | Reviewed-by: Marek Olšák <[email protected]>
* st/mesa: fix import of EGL images with non-zero level or layerNicolai Hähnle2017-10-105-10/+28
| | | | | | | | | | In GL state, textures created from EGL images look like plain 2D textures with a single level, so we use the existing layer_override facility and add an analogous level_override one. Fixes dEQP-EGL.functional.image.create.gles2_cubemap_{positive,negative}_{x,y,z}_rgba_texture Reviewed-by: Marek Olšák <[email protected]>
* st/mesa: fix switching from surface-based to non-surface-based texturesNicolai Hähnle2017-10-106-9/+14
| | | | | | | | | This can happen with surface-based texture objects derived from EGL images, since those aren't immutable. Fixes tests in dEQP-EGL.functional.sharing.gles2.multithread.random.images.teximage2d.* and others Reviewed-by: Marek Olšák <[email protected]>
* i965: silence coverity warningLionel Landwerlin2017-10-101-1/+1
| | | | | | | | | Also makes this statement a bit clearer. CID: 1418920 Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Antia Puentes <[email protected]>
* meson: build classic swrastDylan Baker2017-10-092-0/+33
| | | | | | | | This adds support for building the classic swrast implementation. This driver has been tested with glxinfo and glxgears. Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* meson: Add support for configuring dri drivers directory.Dylan Baker2017-10-091-1/+1
| | | | | | | | v2: - drop with_ from dri_drivers_path variable (Eric A) v3: - Move HAVE_X11_PLATFORM to the proper patch (Eric A) Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* meson: Build i965 and dri stackDylan Baker2017-10-096-0/+933
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This gets pretty much the entire classic tree building, as well as i965, including the various glapis. There are some workarounds for bugs that are fixed in meson 0.43.0, which is due out on October 8th. I have tested this with piglit using glx. v2: - fix typo "vaule" -> "value" - use gtest dep instead of linking to libgtest (rebase error) - use gtest dep instead of linking against libgtest (rebase error) - copy the megadriver, then create hard links from that, then delete the megadriver. This matches the behavior of the autotools build. (Eric A) - Use host_machine instead of target_machine (Eric A) - Put a comment in the right place (Eric A) - Don't have two variables for the same information (Eric A) - Put pre_args at top of file in this patch (Eric A) - Fix glx generators in this patch instead of next (Eric A) - Remove -DMESON hack (Eric A) - add sha1_h to mesa in this patch (Eric A) - Put generators in loops when possible to reduce code in mapi/glapi/gen (Eric A) v3: - put HAVE_X11_PLATFORM in this patch Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: make glFramebuffer* check immutable texture level boundsKenneth Graunke2017-10-071-6/+14
| | | | | | | | | | | | | | When a texture is immutable, we can't tack on extra levels after-the-fact like we could with glTexImage. So check against that level limit and return an error if it's surpassed. This fixes: KHR-GL45.geometry_shader.layered_fbo.fb_texture_invalid_level_number (Based on a patch by Ilia Mirkin.) Reviewed-by: Antia Puentes <[email protected]> [imirkin v2] Reviewed-by: Nicolai Hähnle <[email protected]>
* i965: pass wanted format to intel_miptree_create_for_dri_imageTapani Pälli2017-10-065-40/+7
| | | | | | | | | | | | | | | | | Change b3a44ae7a4 caused regressions on Android where DRI and renderbuffer can disagree on the format being used. This patch removes the colorspace parameter and instead we pass renderbuffer format. For non-winsys images we still do srgb/linear modification in same manner as change b3a44ae7a4 wanted but take format from renderbuffer instead of DRI image. This patch fixes regressions seen with following test sets: dEQP-EGL.functional.color_clears* dEQP-EGL.functional.render* Signed-off-by: Tapani Pälli <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102999 Reviewed-by: Jason Ekstrand <[email protected]>
* glsl_to_tgsi: skip UARL for 1D registers if the driver doesn't need itMarek Olšák2017-10-062-9/+44
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* glsl_to_tgsi: handle reladdr as TEMP in rename_temp_registers and dead_codeMarek Olšák2017-10-061-16/+44
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* glsl_to_tgsi: each reladdr object should have only one parentMarek Olšák2017-10-062-5/+65
| | | | | | required by rename_temp_registers. Reviewed-by: Nicolai Hähnle <[email protected]>
* glsl_to_tgsi: fix instruction order for bindless texturesMarek Olšák2017-10-061-4/+14
| | | | | | | | | We emitted instructions loading the bindless handle after the memory instruction. Cc: 17.2 <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* glsl_to_tgsi: enable copy propagation for tessellation shadersMarek Olšák2017-10-061-4/+3
| | | | | | just don't propagate output reads Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa: Use a 565 format for GL_RGB and GL_UNSIGNED_SHORT_5_6_5 textures.Kenneth Graunke2017-10-051-0/+3
| | | | | | | | | | Found while trying to optimize an application. Not observed to help performance on i965, but should at least reduce the memory usage of such textures a bit. Reviewed-by: Eric Anholt <[email protected]> Tested-by: Eero Tamminen <[email protected]>
* i965: Add Atom graphics names to parse_devid_override()Matt Turner2017-10-041-0/+3
|
* automake: add texcompress_s3tc_tmp.h to the sources listEmil Velikov2017-10-041-0/+1
| | | | | | | | Otherwise it will be missing from the tarball. Fixes: f7daa737d17 ("mesa: Combine libtxc_dxtn sources into texcompress_s3tc_tmp.h") Signed-off-by: Emil Velikov <[email protected]>
* mesa: silence 'variable may be used uninitialized' warning in teximage.cBrian Paul2017-10-031-1/+1
| | | | | | Found with MinGW optimized build. Reviewed-by: Charmaine Lee <[email protected]>
* mesa: silence 'variable may be used uninitialized' warning in bufferobj.cBrian Paul2017-10-031-0/+1
| | | | | | Found with MinGW optimized build. Reviewed-by: Charmaine Lee <[email protected]>