mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-18 17:35:30 +00:00
Implement textureGather, textureGatherCompare
All writers implemented, along with resolving and validation. TODO: SPIR-V Reader. Bug: tint:1330 Change-Id: I8ba2f6023749474f80efb8a5422ac187e6c73a69 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/71820 Reviewed-by: David Neto <dneto@google.com> Commit-Queue: Ben Clayton <bclayton@google.com> Kokoro: Ben Clayton <bclayton@google.com>
This commit is contained in:
committed by
Tint LUCI CQ
parent
2f7730a16e
commit
3703522d41
@@ -50,6 +50,8 @@ bool IsFloatClassificationIntrinsic(IntrinsicType i) {
|
||||
|
||||
bool IsTextureIntrinsic(IntrinsicType i) {
|
||||
return IsImageQueryIntrinsic(i) || i == IntrinsicType::kTextureLoad ||
|
||||
i == IntrinsicType::kTextureGather ||
|
||||
i == IntrinsicType::kTextureGatherCompare ||
|
||||
i == IntrinsicType::kTextureSample ||
|
||||
i == IntrinsicType::kTextureSampleLevel ||
|
||||
i == IntrinsicType::kTextureSampleBias ||
|
||||
|
||||
@@ -261,6 +261,12 @@ IntrinsicType ParseIntrinsicType(const std::string& name) {
|
||||
if (name == "textureDimensions") {
|
||||
return IntrinsicType::kTextureDimensions;
|
||||
}
|
||||
if (name == "textureGather") {
|
||||
return IntrinsicType::kTextureGather;
|
||||
}
|
||||
if (name == "textureGatherCompare") {
|
||||
return IntrinsicType::kTextureGatherCompare;
|
||||
}
|
||||
if (name == "textureNumLayers") {
|
||||
return IntrinsicType::kTextureNumLayers;
|
||||
}
|
||||
@@ -488,6 +494,10 @@ const char* str(IntrinsicType i) {
|
||||
return "workgroupBarrier";
|
||||
case IntrinsicType::kTextureDimensions:
|
||||
return "textureDimensions";
|
||||
case IntrinsicType::kTextureGather:
|
||||
return "textureGather";
|
||||
case IntrinsicType::kTextureGatherCompare:
|
||||
return "textureGatherCompare";
|
||||
case IntrinsicType::kTextureNumLayers:
|
||||
return "textureNumLayers";
|
||||
case IntrinsicType::kTextureNumLevels:
|
||||
|
||||
@@ -111,6 +111,8 @@ enum class IntrinsicType {
|
||||
kUnpack4x8unorm,
|
||||
kWorkgroupBarrier,
|
||||
kTextureDimensions,
|
||||
kTextureGather,
|
||||
kTextureGatherCompare,
|
||||
kTextureNumLayers,
|
||||
kTextureNumLevels,
|
||||
kTextureNumSamples,
|
||||
|
||||
@@ -35,6 +35,8 @@ const char* str(ParameterUsage usage) {
|
||||
return "array_index";
|
||||
case ParameterUsage::kBias:
|
||||
return "bias";
|
||||
case ParameterUsage::kComponent:
|
||||
return "component";
|
||||
case ParameterUsage::kCoords:
|
||||
return "coords";
|
||||
case ParameterUsage::kDdx:
|
||||
|
||||
@@ -34,6 +34,7 @@ enum class ParameterUsage {
|
||||
kNone = -1,
|
||||
kArrayIndex,
|
||||
kBias,
|
||||
kComponent,
|
||||
kCoords,
|
||||
kDdx,
|
||||
kDdy,
|
||||
|
||||
Reference in New Issue
Block a user