Global: Cleanup some unreferenced warnings.

This commit is contained in:
Unknown W. Brackets committed 2022-08-13 12:43:14 -07:00
1 parent ca4a0a848a
commit cf030c3bce
7 files changed
+13 -19

No files matched your search

+4
View File
@@ -101,6 +101,10 @@ public:
return offset_;
}
const char *Name() const {
return name_;
}
// "Zero-copy" variant - you can write the data directly as you compute it.
// Recommended.
void *Push(size_t size, uint32_t *bindOffset, VkBuffer *vkbuf) {
+6
View File
@@ -2,6 +2,7 @@
#include <cstdint>
#include <zstd.h>
#include "Common/Log.h"
#include "Common/Render/TextureAtlas.h"
class ByteReader {
@@ -10,6 +11,7 @@ public:
template<class T>
T Read() {
_dbg_assert_(offset_ + sizeof(T) <= size_);
T x;
memcpy(&x, data_ + offset_, sizeof(T));
offset_ += sizeof(T);
@@ -18,6 +20,7 @@ public:
template<class T>
void ReadInto(T *t) {
_dbg_assert_(offset_ + sizeof(T) <= size_);
memcpy(t, data_ + offset_, sizeof(T));
offset_ += sizeof(T);
}
@@ -26,13 +29,16 @@ public:
T *ReadMultipleAlloc(size_t count, bool compressed) {
T *t = new T[count];
if (!compressed) {
_dbg_assert_(offset_ + sizeof(T) * count <= size_);
memcpy(t, data_ + offset_, sizeof(T) * count);
offset_ += sizeof(T) * count;
} else {
_dbg_assert_(offset_ + sizeof(uint32_t) <= size_);
uint32_t compressed_size = 0;
memcpy(&compressed_size, data_ + offset_, sizeof(uint32_t));
offset_ += sizeof(uint32_t);
_dbg_assert_(offset_ + compressed_size <= size_);
ZSTD_decompress(t, sizeof(T) * count, data_ + offset_, compressed_size);
offset_ += compressed_size;
}
+1 -15
View File
@@ -217,7 +217,7 @@ u32 GetTextureBufw(int level, u32 texaddr, GETextureFormat format) {
return bufw;
}
// Is this compatible with QuickTexHashNEON/SSE?
// Matches QuickTexHashNEON/SSE, see #7029.
static u32 QuickTexHashNonSSE(const void *checkp, u32 size) {
u32 check = 0;
@@ -269,20 +269,6 @@ static u32 QuickTexHashNonSSE(const void *checkp, u32 size) {
return check;
}
static u32 QuickTexHashBasic(const void *checkp, u32 size) {
u32 check = 0;
const u32 size_u32 = size / 4;
const u32 *p = (const u32 *)checkp;
for (u32 i = 0; i < size_u32; i += 4) {
check += p[i + 0];
check ^= p[i + 1];
check += p[i + 2];
check ^= p[i + 3];
}
return check;
}
u32 StableQuickTexHash(const void *checkp, u32 size) {
#if defined(_M_SSE)
return QuickTexHashSSE2(checkp, size);
+1 -1
View File
@@ -209,7 +209,7 @@ static void load_sample(ptrdiff_t w, ptrdiff_t h, ptrdiff_t s, const u8 *pixels,
// Check if the sample is inside. NOTE: for b>=0
// the expression (UNSIGNED)a<(UNSIGNED)b is
// equivalent to a>=0&&a<b.
typedef int static_assert_size_matches[sizeof(ptrdiff_t)==sizeof(size_t)?1:-1];
static_assert(sizeof(ptrdiff_t) == sizeof(size_t), "Assumes ptrdiff_t same width as size_t");
if((size_t)x >= (size_t)w||(size_t)y >= (size_t)h) {
switch(wrap_mode) {
-1
View File
@@ -79,7 +79,6 @@ private:
GLRTexture *lastBoundTexture = nullptr;
FramebufferManagerGLES *framebufferManagerGL_;
ShaderManagerGLES *shaderManagerGL_;
DrawEngineGLES *drawEngine_;
enum { INVALID_TEX = -1 };
+1 -1
View File
@@ -72,7 +72,7 @@ private:
struct FrameData {
FrameData() : descPool("VulkanComputeShaderManager", true) {
descPool.Setup([this] { });
descPool.Setup([] { });
}
VulkanDescSetPool descPool;
-1
View File
@@ -39,7 +39,6 @@ private:
bool array[ARRAY_SIZE(CustomKey::comboKeyList)];
int id_;
UI::ChoiceStrip *comboselect;
UI::ScrollView *rightScroll_;
class ChoiceEventHandler{
public: