[rlsw][rcore_drm] Silence warnings when using PLATFORM_DRM and GRAPHICS_API_OPENGL_SOFTWARE (#5839)
* fix warnings: goto label not used outside of SW_ENABLE_DEPTH_TEST * comment out x coordinates that aren't used in SW_RASTER_TRIANGLE * silence warnings: unused DrmModeConnector functions in rcore_drm.c when using GRAPHICS_API_OPENGL_SOFTWARE
This commit is contained in:
parent
7207c03c72
commit
080f5c94bd
16
src/external/rlsw.h
vendored
16
src/external/rlsw.h
vendored
|
|
@ -5517,7 +5517,9 @@ static void SW_RASTER_TRIANGLE_SPAN(const sw_vertex_t *start, const sw_vertex_t
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef SW_ENABLE_DEPTH_TEST
|
||||||
discard:
|
discard:
|
||||||
|
#endif
|
||||||
srcColor[0] += dSrcColordx[0];
|
srcColor[0] += dSrcColordx[0];
|
||||||
srcColor[1] += dSrcColordx[1];
|
srcColor[1] += dSrcColordx[1];
|
||||||
srcColor[2] += dSrcColordx[2];
|
srcColor[2] += dSrcColordx[2];
|
||||||
|
|
@ -5562,9 +5564,13 @@ static void SW_RASTER_TRIANGLE(const sw_vertex_t *v0, const sw_vertex_t *v1, con
|
||||||
if (v0->position[1] > v1->position[1]) { const sw_vertex_t *tmp = v0; v0 = v1; v1 = tmp; }
|
if (v0->position[1] > v1->position[1]) { const sw_vertex_t *tmp = v0; v0 = v1; v1 = tmp; }
|
||||||
|
|
||||||
// Extracting coordinates from the sorted vertices
|
// Extracting coordinates from the sorted vertices
|
||||||
float x0 = v0->position[0], y0 = v0->position[1];
|
// Put x away for safe keeping. Only y is used right now. Silences warnings.
|
||||||
float x1 = v1->position[0], y1 = v1->position[1];
|
//float x0 = v0->position[0];
|
||||||
float x2 = v2->position[0], y2 = v2->position[1];
|
float y0 = v0->position[1];
|
||||||
|
//float x1 = v1->position[0];
|
||||||
|
float y1 = v1->position[1];
|
||||||
|
//float x2 = v2->position[0];
|
||||||
|
float y2 = v2->position[1];
|
||||||
|
|
||||||
// Compute height differences
|
// Compute height differences
|
||||||
float h02 = y2 - y0;
|
float h02 = y2 - y0;
|
||||||
|
|
@ -5774,7 +5780,9 @@ static void SW_RASTER_QUAD(const sw_vertex_t *a, const sw_vertex_t *b,
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef SW_ENABLE_DEPTH_TEST
|
||||||
discard:
|
discard:
|
||||||
|
#endif
|
||||||
color[0] += dCdx[0];
|
color[0] += dCdx[0];
|
||||||
color[1] += dCdx[1];
|
color[1] += dCdx[1];
|
||||||
color[2] += dCdx[2];
|
color[2] += dCdx[2];
|
||||||
|
|
@ -5927,7 +5935,9 @@ static void SW_RASTER_LINE(const sw_vertex_t *v0, const sw_vertex_t *v1)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef SW_ENABLE_DEPTH_TEST
|
||||||
discard:
|
discard:
|
||||||
|
#endif
|
||||||
x += xInc;
|
x += xInc;
|
||||||
y += yInc;
|
y += yInc;
|
||||||
#ifdef SW_ENABLE_DEPTH_TEST
|
#ifdef SW_ENABLE_DEPTH_TEST
|
||||||
|
|
|
||||||
|
|
@ -266,9 +266,12 @@ static void PollKeyboardEvents(void); // Process evdev keyboard events
|
||||||
static void PollGamepadEvents(void); // Process evdev gamepad events
|
static void PollGamepadEvents(void); // Process evdev gamepad events
|
||||||
static void PollMouseEvents(void); // Process evdev mouse events
|
static void PollMouseEvents(void); // Process evdev mouse events
|
||||||
|
|
||||||
|
// Not used by software rendering.
|
||||||
|
#if !defined(GRAPHICS_API_OPENGL_SOFTWARE)
|
||||||
static int FindMatchingConnectorMode(const drmModeConnector *connector, const drmModeModeInfo *mode); // Search matching DRM mode in connector's mode list
|
static int FindMatchingConnectorMode(const drmModeConnector *connector, const drmModeModeInfo *mode); // Search matching DRM mode in connector's mode list
|
||||||
static int FindExactConnectorMode(const drmModeConnector *connector, uint width, uint height, uint fps, bool allowInterlaced); // Search exactly matching DRM connector mode in connector's list
|
static int FindExactConnectorMode(const drmModeConnector *connector, uint width, uint height, uint fps, bool allowInterlaced); // Search exactly matching DRM connector mode in connector's list
|
||||||
static int FindNearestConnectorMode(const drmModeConnector *connector, uint width, uint height, uint fps, bool allowInterlaced); // Search the nearest matching DRM connector mode in connector's list
|
static int FindNearestConnectorMode(const drmModeConnector *connector, uint width, uint height, uint fps, bool allowInterlaced); // Search the nearest matching DRM connector mode in connector's list
|
||||||
|
#endif
|
||||||
|
|
||||||
static void SetupFramebuffer(int width, int height); // Setup main framebuffer (required by InitPlatform())
|
static void SetupFramebuffer(int width, int height); // Setup main framebuffer (required by InitPlatform())
|
||||||
|
|
||||||
|
|
@ -2560,6 +2563,7 @@ static void PollMouseEvents(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if !defined(GRAPHICS_API_OPENGL_SOFTWARE)
|
||||||
// Search matching DRM mode in connector's mode list
|
// Search matching DRM mode in connector's mode list
|
||||||
static int FindMatchingConnectorMode(const drmModeConnector *connector, const drmModeModeInfo *mode)
|
static int FindMatchingConnectorMode(const drmModeConnector *connector, const drmModeModeInfo *mode)
|
||||||
{
|
{
|
||||||
|
|
@ -2648,6 +2652,7 @@ static int FindNearestConnectorMode(const drmModeConnector *connector, uint widt
|
||||||
|
|
||||||
return nearestIndex;
|
return nearestIndex;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// Compute framebuffer size relative to screen size and display size
|
// Compute framebuffer size relative to screen size and display size
|
||||||
// NOTE: Global variables CORE.Window.render.width/CORE.Window.render.height and CORE.Window.renderOffset.x/CORE.Window.renderOffset.y can be modified
|
// NOTE: Global variables CORE.Window.render.width/CORE.Window.render.height and CORE.Window.renderOffset.x/CORE.Window.renderOffset.y can be modified
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user