[Libreoffice-commits] core.git: Branch 'libreoffice-7-4' - external/skia

2023-02-01 Thread Stephan Bergmann (via logerrit)
 external/skia/missing-include.patch.0 |   10 ++
 1 file changed, 10 insertions(+)

New commits:
commit fc16fb483ef505f1c4808c5eaadf851e550b49cb
Author: Stephan Bergmann 
AuthorDate: Mon Jan 16 08:16:00 2023 +0100
Commit: Michael Stahl 
CommitDate: Wed Feb 1 09:49:46 2023 +

external/skia: Missing include

> In file included from 
workdir/UnpackedTarball/skia/third_party/vulkanmemoryallocator/GrVulkanMemoryAllocator.cpp:27:
> In file included from 
workdir/UnpackedTarball/skia/third_party/vulkanmemoryallocator/GrVulkanMemoryAllocator.h:35:
> 
workdir/UnpackedTarball/skia/third_party/vulkanmemoryallocator/include/vk_mem_alloc.h:2817:9:
 error: use of undeclared identifier 'snprintf'
> snprintf(outStr, strLen, "%u", static_cast(num));
> ^

etc.

Change-Id: I4f13c8a137f23ef62d67c3b4dfa8f1c0ddfc5ec9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145552
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 
(cherry picked from commit 5877c6b118c99c9ec807a111471bfd67720a5086)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146383
Reviewed-by: Sam James 
Reviewed-by: Michael Stahl 

diff --git a/external/skia/missing-include.patch.0 
b/external/skia/missing-include.patch.0
index 6b15e87590b5..5d1d0609b989 100644
--- a/external/skia/missing-include.patch.0
+++ b/external/skia/missing-include.patch.0
@@ -8,3 +8,13 @@
  #include 
  #include 
  #include "include/core/SkSpan.h"
+--- third_party/vulkanmemoryallocator/include/vk_mem_alloc.h
 third_party/vulkanmemoryallocator/include/vk_mem_alloc.h
+@@ -2570,6 +2570,7 @@
+ #include 
+ #include 
+ #include 
++#include 
+ 
+ #ifdef _MSC_VER
+ #include  // For functions like __popcnt, _BitScanForward etc.


[Libreoffice-commits] core.git: Branch 'libreoffice-7-4' - external/skia

2023-01-31 Thread Stephan Bergmann (via logerrit)
 external/skia/UnpackedTarball_skia.mk |1 +
 external/skia/missing-include.patch.0 |   10 ++
 2 files changed, 11 insertions(+)

New commits:
commit c52565f5092393f10c25b67ead2ba8a8df279885
Author: Stephan Bergmann 
AuthorDate: Wed Oct 26 08:06:01 2022 +0200
Commit: Caolán McNamara 
CommitDate: Tue Jan 31 14:50:09 2023 +

external/skia: Missing include

...at least when building with Visual Studio 2022 Preview 17.4.0,

> In file included from 
workdir/UnpackedTarball/skia/src/core/SkKeyHelpers.cpp:14:
> workdir/UnpackedTarball/skia\src/core/SkShaderCodeDictionary.h(45,43): 
error: no type named 'string' in namespace 'std'
> using GenerateGlueCodeForEntry = std::string (*)(const std::string& 
resultName,
>  ~^

etc.

Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141833
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 
(cherry picked from commit 3e009159cd1801507f6e965444a7dade5497f89a)
Conflicts:
external/skia/UnpackedTarball_skia.mk

Change-Id: Idd8dafb4e57e04088ee60954ecfa601cc7588e55
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146382
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/external/skia/UnpackedTarball_skia.mk 
b/external/skia/UnpackedTarball_skia.mk
index 7670b7798fbd..f88cb371d65c 100644
--- a/external/skia/UnpackedTarball_skia.mk
+++ b/external/skia/UnpackedTarball_skia.mk
@@ -38,6 +38,7 @@ skia_patches := \
 allow-no-es2restrictions.patch.1 \
 vk_mem_alloc.patch.1 \
 tdf148624.patch.1 \
+missing-include.patch.0 \
 
 $(eval $(call gb_UnpackedTarball_set_patchlevel,skia,1))
 
diff --git a/external/skia/missing-include.patch.0 
b/external/skia/missing-include.patch.0
new file mode 100644
index ..6b15e87590b5
--- /dev/null
+++ b/external/skia/missing-include.patch.0
@@ -0,0 +1,10 @@
+--- src/core/SkShaderCodeDictionary.h
 src/core/SkShaderCodeDictionary.h
+@@ -9,6 +9,7 @@
+ #define SkShaderCodeDictionary_DEFINED
+ 
+ #include 
++#include 
+ #include 
+ #include 
+ #include "include/core/SkSpan.h"


[Libreoffice-commits] core.git: Branch 'libreoffice-7-4' - external/skia

2022-06-19 Thread Luboš Luňák (via logerrit)
 external/skia/UnpackedTarball_skia.mk |1 
 external/skia/tdf148624.patch.1   |   60 ++
 2 files changed, 61 insertions(+)

New commits:
commit 30687f36f935381b30e463702fad9963377c25d3
Author: Luboš Luňák 
AuthorDate: Fri Jun 17 10:38:03 2022 +0200
Commit: Caolán McNamara 
CommitDate: Sun Jun 19 22:02:42 2022 +0200

upstream Skia fix for Vulkan crash on texture binding (tdf#148624)

Change-Id: Ic16a516bfde04aba0336baca58f605d6cf9fd413
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136011
Tested-by: Jenkins
Reviewed-by: Luboš Luňák 
(cherry picked from commit dce3cf219479c353f332b99a51aaa20843530100)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136034
Reviewed-by: Caolán McNamara 

diff --git a/external/skia/UnpackedTarball_skia.mk 
b/external/skia/UnpackedTarball_skia.mk
index 99c70d557eee..7670b7798fbd 100644
--- a/external/skia/UnpackedTarball_skia.mk
+++ b/external/skia/UnpackedTarball_skia.mk
@@ -37,6 +37,7 @@ skia_patches := \
 fix-graphite-ifdef.patch.1 \
 allow-no-es2restrictions.patch.1 \
 vk_mem_alloc.patch.1 \
+tdf148624.patch.1 \
 
 $(eval $(call gb_UnpackedTarball_set_patchlevel,skia,1))
 
diff --git a/external/skia/tdf148624.patch.1 b/external/skia/tdf148624.patch.1
new file mode 100644
index ..c42beca22903
--- /dev/null
+++ b/external/skia/tdf148624.patch.1
@@ -0,0 +1,60 @@
+commit b2cecde549c76cbd1c8b7d0cee2c6799936c1e7a
+Author: Greg Daniel 
+Date:   Thu Jun 16 11:29:08 2022 -0400
+
+Fix not using texture barrier on StrokeTessOp.
+
+Previously we were overwriting the renderpassXferBarriers flag on
+ProgramInfo to set it to kNone. This flag is meant to say whether or not
+the entire render pass uses barriers or not. This is needed in Vulkan
+because all pipelines in a render pass that has an input attachment
+must bind the input attachment regardless if it is used or not. So the
+pipeline must be created with a layout for an input attachment
+descriptor set.
+
+This change just removes to performance optimization to only use the
+barrier on the stencil and not fill draw. This use case shouldn't
+come up too often and also shouldn't be a big perf hit regardless.
+The way GrAppliedClip is created/used it is hard for us to create
+multiple different Pipeline objects: one for stencil and one for the
+fill.
+
+Bug: skia:13402
+Change-Id: I15ce74b4d41b90d3dd4169a1f4fb77ed87c8b26d
+Reviewed-on: https://skia-review.googlesource.com/c/skia/+/549898
+Reviewed-by: Michael Ludwig 
+Commit-Queue: Greg Daniel 
+
+diff --git a/src/gpu/ganesh/ops/StrokeTessellateOp.cpp 
b/src/gpu/ganesh/ops/StrokeTessellateOp.cpp
+index 8f47441eb9..de8153cd0f 100644
+--- a/src/gpu/ganesh/ops/StrokeTessellateOp.cpp
 b/src/gpu/ganesh/ops/StrokeTessellateOp.cpp
+@@ -179,7 +179,12 @@ void 
StrokeTessellateOp::prePrepareTessellator(GrTessellationShader::ProgramArgs
+ fStencilProgram = GrTessellationShader::MakeProgram(args, 
fTessellationShader, pipeline,
+ );
+ fillStencil = 
+-args.fXferBarrierFlags = GrXferBarrierFlags::kNone;
++// TODO: Currently if we have a texture barrier for a dst read it 
will get put in before
++// both the stencil draw and the fill draw. In reality we only really 
need the barrier
++// once to guard the reads of the color buffer in the fill from the 
previous writes. Maybe
++// we can investigate how to remove one of these barriers but it is 
probably not something
++// that is required a lot and thus the extra barrier shouldn't be too 
much of a perf hit to
++// general Skia use.
+ }
+ 
+ fFillProgram = GrTessellationShader::MakeProgram(args, 
fTessellationShader, pipeline,
+diff --git a/src/gpu/ganesh/vk/GrVkPipelineStateBuilder.cpp 
b/src/gpu/ganesh/vk/GrVkPipelineStateBuilder.cpp
+index 54bc7f857a..0d61b8c4cb 100644
+--- a/src/gpu/ganesh/vk/GrVkPipelineStateBuilder.cpp
 b/src/gpu/ganesh/vk/GrVkPipelineStateBuilder.cpp
+@@ -279,6 +279,10 @@ GrVkPipelineState* 
GrVkPipelineStateBuilder::finalize(const GrProgramDesc& desc,
+ }
+ }
+ 
++// The vulkan spec says that if a subpass has an input attachment, then 
the input attachment
++// descriptor set must be bound to all pipelines in that subpass. This 
includes pipelines that
++// don't actually use the input attachment. Thus we look at the 
renderPassBarriers and not just
++// the DstProxyView barrier flags to determine if we use the input 
attachment.
+ bool usesInput = SkToBool(fProgramInfo.renderPassBarriers() & 
GrXferBarrierFlags::kTexture);
+ uint32_t layoutCount =
+ usesInput ? GrVkUniformHandler::kDescSetCount : 
(GrVkUniformHandler::kDescSetCount - 1);