summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* spirv: add switch case for nir_texop_txf_ms_mcs in vtn_handle_texture()Brian Paul2016-05-181-0/+2
| | | | | | | | | | | Mark it as unreachable. Silences a compiler warning: spirv/spirv_to_nir.c:1397:4: warning: enumeration value 'nir_texop_txf_ms_mcs' not handled in switch [-Wswitch] switch (instr->op) { ^ Reviewed-by: Jason Ekstrand <[email protected]>
* Revert "i965/urb: fixes division by zero"Matt Turner2016-05-181-5/+19
| | | | This reverts commit 2a8aa1e3deb99a1ae16d942318da648c1327ece5.
* i965/urb: fixes division by zeroArdinartsev Nikita2016-05-181-19/+5
| | | | | | | Fixes regression introduced by af5ca43f2676bff7499f93277f908b681cb821d0 Reviewed-by: Matt Turner <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=95419
* mesa: fclose() filename on error.Matt Turner2016-05-181-1/+5
| | | | | Pretty useless, as it's in debugging code. Found by Coverity (CID 1257016).
* i965/fs: Assert that nir_op_extract_*'s src1 is a constant.Matt Turner2016-05-181-0/+2
|
* glsl: Check that layout is non-null before dereferencing.Matt Turner2016-05-181-1/+1
| | | | | | | layout should only be null for structs, but it's checked everywhere else and confuses Coverity (CID 1358495). Reviewed-by: Timothy Arceri <[email protected]>
* egl/dri2: Don't check return result of mtx_unlock().Matt Turner2016-05-181-8/+2
| | | | | | | Coverity (CID 1358496) warns that the cleanup code doesn't unlock the mutex (which is arguably kind of stupid, since the only case that can happen is when mtx_unlock() failed!). But, mtx_unlock() isn't going to fail -- the mutex was locked by this thread just a few lines above it.
* spirv: Properly size the src[] array.Matt Turner2016-05-181-1/+1
| | | | | | | Operations like nir_op_bitfield_insert have four arguments, and Coverity isn't privy to the fact that 4-argument operations aren't possible here, so it thinks this can lead to memory corruption. Just increase the size of the array to quell any fears.
* isl: Mark default cases in switch unreachable.Matt Turner2016-05-181-0/+6
| | | | To silence -Wmaybe-uninitialized warnings.
* glsl/linker: Ensure the first stage of an SSO pipeline has input locs assignedIan Romanick2016-05-181-3/+6
| | | | | | | | | | | | | | | | | | | | | Previously an SSO pipeline containing only a tessellation control shader and a tessellation evaluation shader would not get locations assigned for the TCS inputs. This would lead to assertion failures in some piglit tests, such as arb_program_interface_query-resource-query. That piglit test still fails on some tessellation related subtests. Specifically, these subtests fail: 'GL_PROGRAM_INPUT(tcs) active resources' expected 2 but got 3 'GL_PROGRAM_INPUT(tcs) max length name' expected 12 but got 16 'GL_PROGRAM_INPUT(tcs,tes) active resources' expected 2 but got 3 'GL_PROGRAM_INPUT(tcs,tes) max length name' expected 12 but got 16 'GL_PROGRAM_OUTPUT(tcs) active resources' expected 15 but got 3 'GL_PROGRAM_OUTPUT(tcs) max length name' expected 23 but got 12 Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Timothy Arceri <[email protected]> Cc: [email protected]
* glsl/linker: Don't include interface name for built-in blocksIan Romanick2016-05-181-1/+2
| | | | | | | | | | | | | | Commit 11096ec introduced a regression in some piglit tests (e.g., arb_program_interface_query-resource-query). I did not notice this regression because other (unrelated) problems caused failed assertions in those same tests on my system... so they crashed before getting to the new failure. v2: Use is_gl_identifier. Suggested by Tim. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Timothy Arceri <[email protected]> Cc: [email protected]
* glsl: Assert that inputs have a location assignedIan Romanick2016-05-181-0/+2
| | | | | | | This catches a problem previously undetected until deep in the backend. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* glsl/linker: Fix trivial typos in commentsIan Romanick2016-05-182-8/+8
| | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* glsl/linker: Fix some formatting to match current coding conventionsIan Romanick2016-05-181-8/+6
| | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* glsl/linker: Silence unused parameter warningIan Romanick2016-05-181-5/+3
| | | | | | | | | | | The use of the parameter was removed in d6b92028. glsl/link_varyings.cpp:1390:39: warning: unused parameter ‘separate_shader’ [-Wunused-parameter] bool separate_shader) ^ Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* glsl/linker: Silence unused parameter warningIan Romanick2016-05-181-3/+2
| | | | | | | | | | | | The parameter appears to have been unused since the function was added in commit 12ba6cfb. Remove it. glsl/linker.cpp:2886:60: warning: unused parameter ‘prog’ [-Wunused-parameter] match_explicit_outputs_to_inputs(struct gl_shader_program *prog, ^ Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* i965: Silence unused parameter warningsIan Romanick2016-05-1814-35/+19
| | | | | | | | | | | | The only place that actually used the type parameter was the GS visitor, and it was always passed glsl_type::int. Just remove the parameter. brw_vec4_vs_visitor.cpp:38:61: warning: unused parameter ‘type’ [-Wunused-parameter] const glsl_type *type) ^ Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: Don't advertise GLES 3.1 without compute supportDaniel Scharrer2016-05-181-1/+2
| | | | | | | | | | | The MaxComputeWorkGroupInvocations constant is used in compute_version_es2() instead of extensions->ARB_compute_shader as ES has lower requirements than desktop GL. Both i965 and gallium set this constant before enabling compute support. Signed-off-by: Daniel Scharrer <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* mesa/st: don't leak nameRob Clark2016-05-181-2/+5
| | | | | | Pointed out by coverity. Signed-off-by: Rob Clark <[email protected]>
* svga: null out all sampler views if start=num=0Brian Paul2016-05-171-0/+12
| | | | | | | | | | | Because the CSO module handles sampler views for fragment shaders differently than vertex/geom shaders, VS/GS shader sampler views aren't explicitly unbound like for FS sampler vers. This code checks for the case of start=num=0 and nulls out the sampler views. Fixes a assert regression in piglit's arb_texture_multisample- sample-position test. Reviewed-by: Charmaine Lee <[email protected]>
* st/mesa: remove unused st_context::default_textureBrian Paul2016-05-172-7/+0
| | | | | | | | The code which used this was removed quite a while ago. Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Sinclair Yeh <[email protected]> Reviewed-by: Charmaine Lee <[email protected]>
* cso: remove / add some commentsBrian Paul2016-05-171-6/+4
| | | | Signed-off-by: Brian Paul <[email protected]>
* vc4: Add support for vertex color clamping in the rasterizer.Eric Anholt2016-05-173-1/+6
| | | | | This gets us precompile of vertex shaders at the state tracker level as well.
* vc4: Move tgsi_to_nir to precompile time.Eric Anholt2016-05-171-12/+15
| | | | | Now we have an immutable nir shader in our shader's CSO that we can clone and lower/optimize.
* vc4: Mark the driver as supporting fragment color clamping in rast.Eric Anholt2016-05-171-1/+1
| | | | | | | We always clamp fragment colors, since they're always 8-bit unorm, so there's no need to have us compile separate shaders based on GL_ARB_color_buffer_float. This gives us precompilation of fragment programs to the vc4_shader_state_create() level.
* vc4: Enable sharing shaders across contexts.Eric Anholt2016-05-172-2/+3
| | | | | | This allows the same pipe_shader_state to be referenced from multiple contexts. Since our pipe_shader_state is treated as immutable (other than the variant number) within the driver, this is no problem.
* vc4: Switch to using nir_load_front_face.Eric Anholt2016-05-172-9/+18
| | | | | | | | This will be generated by glsl_to_nir, and it turns out that this is a more code-efficient path than the floating point math, anyway. No change on shader-db, but drops an instruction in piglit's glsl-fs-frontfacing.
* vc4: Drop the dead export_linkage array.Eric Anholt2016-05-171-5/+0
| | | | This came from deriving from freedreno.
* vc4: Fix a -Wformat-security warning.Eric Anholt2016-05-171-1/+1
| | | | | This is apparently enabled as an error in Android builds, and the compiler can't tell that the return value is safe.
* i965: Make brw_reg_from_fs_reg() halve exec_size when compressed.Kenneth Graunke2016-05-171-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | In a5d7e144eaf43fee37e6ff9e2de194407087632b, Connor generalized the exec_size halving code to handle more cases. As part of this, he made it not halve anything if the region accessed falls completely in a single register. Unfortunately, it started producing some invalid regions: -add(16) g6<1>F g10<8,8,1>UW -g1<0,1,0>F { align1 compr }; -add(16) g8<1>F g12<8,8,1>UW -g1.1<0,1,0>F { align1 compr }; +add(16) g6<1>F g10<16,16,1>UW -g1<0,1,0>F { align1 compr }; +add(16) g8<1>F g12<16,16,1>UW -g1.1<0,1,0>F { align1 compr }; Here, the UW source region completely fits within a register. However, we have to use instruction compression because the destination region spans two registers. <16,16,1> is invalid because it's compressed. To handle this, skip the "everything fits in one register" case and fall through to the exec_size halving case when compressed. Fixes hundreds of Piglit regressions on GM965. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=95370 Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* i965: Move compression decisions before brw_reg_from_fs_reg().Kenneth Graunke2016-05-171-26/+26
| | | | | | | | | brw_reg_from_fs_reg() needs to know whether the instruction will be compressed or not. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=95370 Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* i965: Enable ES 3.2 sample shading extensions.Kenneth Graunke2016-05-171-0/+1
| | | | | | | | | | | | | | | This enables: - GL_OES_sample_shading - GL_OES_sample_variables - GL_OES_shader_multisample_interpolation On Gen8, we pass all the CTS tests, and all but 4 of the dEQP-GLES31 tests (dealing with 1x/2x MSAA at half rate sampling). We believe those 4 dEQP-GLES31 tests are incorrect. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* anv: Fix warning: unused variable ‘cs_prog_data’Jordan Justen2016-05-172-2/+0
| | | | | | | This was introduced in 8a80af282091e692da7bf4e412918ba2362dfb4f. Reported-by: Jason Ekstrand <[email protected]> Signed-off-by: Jordan Justen <[email protected]>
* android: fix building error in libmesa_st_mesaMauro Rossi2016-05-171-0/+2
| | | | | | | | | | | | | | | | Fixes the following building error due to libmesa_nir dependency: In file included from external/mesa/src/mesa/state_tracker/st_glsl_to_nir.cpp:44:0: external/mesa/src/compiler/nir/nir.h:42:25: fatal error: nir_opcodes.h: No such file or directory #include "nir_opcodes.h" ^ compilation terminated. build/core/binary.mk:706: recipe for target 'out/target/product/x86/obj/STATIC_LIBRARIES/libmesa_st_mesa_intermediates/state_tracker/st_glsl_to_nir.o' failed make: *** [out/target/product/x86/obj/STATIC_LIBRARIES/libmesa_st_mesa_intermediates/state_tracker/st_glsl_to_nir.o] Error 1 make: *** Waiting for unfinished jobs.... Reviewed-by: Rob Herring <[email protected]> Signed-off-by: Rob Clark <[email protected]>
* radeonsi: force level zero on image instructions in non-fragment shaders (v2)Nicolai Hähnle2016-05-171-0/+5
| | | | | | | | | | | | | | | | | | | | | | | Section 8.9 (Texture Functions) of the OpenGL Shading Language 4.5 specification: However, automatic level of detail is computed only for fragment shaders. Other shaders operate as though the base level of detail were computed as zero. and Section 8.9.3 (Texture Gather Functions): When performing a texture gather operation, the minification and magnification filters are ignored, and the rules for LINEAR filtering in the OpenGL Specification are applied to the base level of the texture image to identify the four texels i_0 j_1, i_1 j_1, i_1 j_0, and i_0 j_0. Of course, explicit LOD or derivative variants work in all shader types. This fixes several GL4x-CTS.texture_gather.* tests. v2: TG4 is always level zero (thanks, Ilia) Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: emit TXQ in separate functionsNicolai Hähnle2016-05-171-52/+78
| | | | | | | | | TXQ is sufficiently different that having in it in the same code path as texture sampling/fetching opcodes doesn't make much sense. v2: guard against NULL pointer dereferences Reviewed-by: Marek Olšák <[email protected]> (v1)
* winsys/amdgpu: cleanup error handling in amdgpu_ctx_createNicolai Hähnle2016-05-171-9/+14
| | | | Reviewed-by: Marek Olšák <[email protected]>
* winsys/amdgpu: avoid ioctl call when fence_wait is called without timeoutNicolai Hähnle2016-05-171-3/+10
| | | | | | When user fences are used, we don't need the kernel for polling. Reviewed-by: Marek Olšák <[email protected]>
* gallium/radeon: add radeon_emitted to check for non-trivial IBsNicolai Hähnle2016-05-178-16/+17
| | | | Reviewed-by: Marek Olšák <[email protected]>
* gallium/radeon: use radeon_emit_arrayNicolai Hähnle2016-05-171-2/+1
| | | | Reviewed-by: Marek Olšák <[email protected]>
* gallium/radeon: use radeon_emitNicolai Hähnle2016-05-179-136/+135
| | | | | | | Mostly generated using a sed-script, with manual fix-up for multi-line statements. Reviewed-by: Marek Olšák <[email protected]>
* st/mesa: fix reversed copyimage canonical formatNicolai Hähnle2016-05-171-3/+3
| | | | | | | | | | | The format_desc swizzle describes where in the array each color channel comes from - but the existing code was written as if each entry in the swizzle described the meaning of an array element. Fixes piglit's arb_copy_image-format-swizzle. Cc: "11.1 11.2" <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* Revert "HACK: Don't re-configure L3$ in render stages pre-BDW"Jordan Justen2016-05-171-11/+0
| | | | | | | This reverts commit 41af9b2e517dd0c17e519490ca915b96f6898390. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94468 Reviewed-by: Jason Ekstrand <[email protected]>
* anv: Port L3 cache programming from i965Jordan Justen2016-05-179-173/+593
| | | | | Signed-off-by: Jordan Justen <[email protected]> Acked-by: Jason Ekstrand <[email protected]>
* anv/gen7: Add memory barrier to vkCmdWaitEvents callJordan Justen2016-05-171-0/+6
| | | | | | | | | | | | We also have this barrier call for gen8 vkCmdWaitEvents. We don't implement waiting on events for gen7 yet, but this barrier at least helps to not regress CTS cases when data caching is enabled. Without this, the tests would intermittently report a failure when the data cache was enabled. Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv: Keep track of whether the data cache should be enabled in L3Jordan Justen2016-05-173-1/+11
| | | | | | | | If images or shader buffers are used, we will enable the data cache in the the L3 config. Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* genxml/hsw: Add L3 cache control registersJordan Justen2016-05-171-0/+8
| | | | | | | | These were added to the i965 driver in 5912da45a69923afa1b7f2eb5bb371d848813c41. Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* Treewide: Remove Elements() macroJan Vesely2016-05-1742-149/+141
| | | | | Signed-off-by: Jan Vesely <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* r600g,sb: Don't use standard macro nameJan Vesely2016-05-175-11/+11
| | | | Signed-off-by: Jan Vesely <[email protected]>
* anv/formats: Add support for VK_FORMAT_B4G4R4A4_UNORM pre-gen8Jason Ekstrand2016-05-171-0/+10
|