-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add fixes for the extension and unique_ptr creation
Signed-off-by: Rodrigo Holztrattner <quic_rholztra@quicinc.com>
- Loading branch information
1 parent
8d95c2c
commit 55b1d30
Showing
22 changed files
with
263 additions
and
97 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
samples/BloomImageProcessing/shaders/BlurBase-Horizontal-Ext.frag
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
//============================================================================================================ | ||
// | ||
// | ||
// Copyright (c) 2023, Qualcomm Innovation Center, Inc. All rights reserved. | ||
// SPDX-License-Identifier: BSD-3-Clause | ||
// | ||
//============================================================================================================ | ||
|
||
#version 450 | ||
|
||
#extension GL_QCOM_image_processing : require | ||
|
||
precision mediump float; precision mediump int; | ||
|
||
layout(location = 0) noperspective in vec2 in_TEXCOORD0; | ||
|
||
layout(set = 0, binding = 0, std140) uniform WeightInfo | ||
{ | ||
vec4 weights[8]; | ||
} _Globals; | ||
|
||
|
||
layout(set = 0, binding = 1) uniform texture2D SourceTexture; | ||
layout(set = 0, binding = 2) uniform sampler SourceSampler; | ||
layout(set = 0, binding = 3) uniform texture2DArray BloomWeightTexture; | ||
layout(set = 0, binding = 4) uniform sampler BloomWeightSampler; | ||
|
||
layout(location = 0) out vec4 FragColor; | ||
|
||
void main() | ||
{ | ||
FragColor = textureWeightedQCOM(sampler2D(SourceTexture, SourceSampler), in_TEXCOORD0, sampler2DArray(BloomWeightTexture, BloomWeightSampler)); | ||
} |
38 changes: 38 additions & 0 deletions
38
samples/BloomImageProcessing/shaders/BlurBase-Horizontal.frag
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
//============================================================================================================ | ||
// | ||
// | ||
// Copyright (c) 2023, Qualcomm Innovation Center, Inc. All rights reserved. | ||
// SPDX-License-Identifier: BSD-3-Clause | ||
// | ||
//============================================================================================================ | ||
|
||
#version 450 | ||
|
||
precision mediump float; precision mediump int; | ||
|
||
layout(location = 0) noperspective in vec2 in_TEXCOORD0; | ||
|
||
layout(set = 0, binding = 0, std140) uniform WeightInfo | ||
{ | ||
vec4 weights[8]; | ||
} _Globals; | ||
|
||
layout(set = 0, binding = 1) uniform texture2D SourceTexture; | ||
layout(set = 0, binding = 2) uniform sampler SourceSampler; | ||
|
||
layout(location = 0) out vec4 FragColor; | ||
|
||
void main() | ||
{ | ||
const float StepX = 1.0 / 1920.0; | ||
const float StepY = 0; | ||
|
||
int WeightSize = int(_Globals.weights[0][0]); | ||
FragColor = vec4(0); | ||
for (int ww = 0; ww < WeightSize; ++ww) | ||
{ | ||
float coordIndex = float(ww - WeightSize / 2); | ||
ivec2 weightIndex = ivec2((ww + 1) / 4, (ww + 1) % 4); | ||
FragColor += texture(sampler2D(SourceTexture, SourceSampler), in_TEXCOORD0 + vec2(coordIndex * StepX, coordIndex * StepY)) * _Globals.weights[weightIndex.x][weightIndex.y]; | ||
} | ||
} |
33 changes: 33 additions & 0 deletions
33
samples/BloomImageProcessing/shaders/BlurBase-Vertical-Ext.frag
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
//============================================================================================================ | ||
// | ||
// | ||
// Copyright (c) 2023, Qualcomm Innovation Center, Inc. All rights reserved. | ||
// SPDX-License-Identifier: BSD-3-Clause | ||
// | ||
//============================================================================================================ | ||
|
||
#version 450 | ||
|
||
#extension GL_QCOM_image_processing : require | ||
|
||
precision mediump float; precision mediump int; | ||
|
||
layout(location = 0) noperspective in vec2 in_TEXCOORD0; | ||
|
||
layout(set = 0, binding = 0, std140) uniform WeightInfo | ||
{ | ||
vec4 weights[8]; | ||
} _Globals; | ||
|
||
|
||
layout(set = 0, binding = 1) uniform texture2D SourceTexture; | ||
layout(set = 0, binding = 2) uniform sampler SourceSampler; | ||
layout(set = 0, binding = 3) uniform texture2DArray BloomWeightTexture; | ||
layout(set = 0, binding = 4) uniform sampler BloomWeightSampler; | ||
|
||
layout(location = 0) out vec4 FragColor; | ||
|
||
void main() | ||
{ | ||
FragColor = textureWeightedQCOM(sampler2D(SourceTexture, SourceSampler), in_TEXCOORD0, sampler2DArray(BloomWeightTexture, BloomWeightSampler)); | ||
} |
Oops, something went wrong.