Skip to content

Commit

Permalink
fix padding, remove unused function
Browse files Browse the repository at this point in the history
  • Loading branch information
HifiExperiments committed Jan 12, 2025
1 parent b2665cb commit a7be389
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 18 deletions.
16 changes: 0 additions & 16 deletions libraries/gpu/src/gpu/Texture.h
Original file line number Diff line number Diff line change
Expand Up @@ -188,24 +188,8 @@ class Sampler {
_minMip == other._minMip &&
_maxMip == other._maxMip;
}

DataSerializer &operator<<(DataSerializer &dsd) {
dsd << _borderColor;
dsd << _maxAnisotropy;
dsd << _filter;
dsd << _comparisonFunc;
dsd << _wrapModeU;
dsd << _wrapModeV;
dsd << _wrapModeW;
dsd << _mipOffset;
dsd << _minMip;
dsd << _maxMip;
return dsd;
}
};



Sampler() {}
Sampler(const Filter filter, const WrapMode wrap = WRAP_REPEAT) : _desc(filter, wrap) {}
Sampler(const Desc& desc) : _desc(desc) {}
Expand Down
4 changes: 2 additions & 2 deletions libraries/gpu/src/gpu/Texture_ktx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ struct GPUKTXPayload {
uint8_t usagetype = 0;

dsr >> version;
dsr.skipPadding(1);

if (version > CURRENT_VERSION) {
// If we try to load a version that we don't know how to parse,
Expand All @@ -109,13 +108,14 @@ struct GPUKTXPayload {
_usage = gpu::Texture::Usage(usageData);

dsr >> usagetype;
dsr.skipPadding(1);
_usageType = (TextureUsageType)usagetype;

if (version >= 2) {
dsr >> _originalSize;
}

dsr.skipPadding(PADDING);

return true;
}

Expand Down

0 comments on commit a7be389

Please sign in to comment.