summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* radeonsi: add new polaris11 pci idsAlex Deucher2016-05-171-0/+3
| | | | | Reviewed-by: Nicolai Hähnle <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* radeonsi: add new polaris10 pci idsAlex Deucher2016-05-171-0/+9
| | | | | Reviewed-by: Nicolai Hähnle <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* 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-172-3/+4
| | | | | | | | | | | | | | | 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
|
* anv: Add a devinfo argument to the get_format functionsJason Ekstrand2016-05-175-15/+20
|
* anv/formats: Set the swizzle to RGB1 when using an RGBA format to fake RGBJason Ekstrand2016-05-171-2/+5
| | | | | | | | | This way we get correct sampling from RGB formats that are faked as RGBA. This should also cause it to disable rendering and blending on those formats. We should be able to render to them and, on Broadwell and above, we can blend on them with work-arounds. However, we'll add support for that more properly later when it's deemed useful. For now, disabling rendering and blending should be safe.
* anv/formats: Refactor anv_get_formatJason Ekstrand2016-05-171-30/+27
| | | | | | The new code removes the switch statement and instead handles depth/stencil as up-front special cases. This allows for potentially more complicated color format handling in the future.
* anv: Use 16 bits for the isl_format in anv_formatJason Ekstrand2016-05-171-1/+1
| | | | This way the entire anv_format structure fits in 32 bits
* anv/formats: Use the isl_channel_select enum for the swizzleJason Ekstrand2016-05-173-20/+24
|
* anv/formats: Add an anv_get_format helperJason Ekstrand2016-05-175-66/+58
| | | | | | | | | This commit removes anv_format_for_vk_format and adds an anv_get_format helper. The anv_get_format helper returns the anv_format by-value. Unlike anv_format_for_vk_format the format returned by anv_get_format is 100% accurate and includes any tweaks needed for tiled vs. linear. anv_get_isl_format is now just a wrapper around anv_get_format that picks off just the isl_format.
* anv/format: Simplify anv_formatJason Ekstrand2016-05-172-55/+39
| | | | | | Now that we have VkFormat introspection and we've removed everything that tried to use anv_format for introspection, we no longer need most of what was in anv_format.
* anv/formats: Delete validate_GetPhysicalDeviceFormatPropertiesJason Ekstrand2016-05-171-10/+0
| | | | | All it ever did was some extra logging that was useful when initially bringing up Dota2. We don't need it anymore.
* anv/image: Use aspects for computing full usageJason Ekstrand2016-05-171-4/+3
|
* anv: Remove the anv_format member from anv_imageJason Ekstrand2016-05-173-4/+2
|