PS3: Fix rendering and add actions workflow

This commit is contained in:
UnknownShadow200 2023-10-07 08:57:25 +11:00
parent 4c60ceda46
commit 67c7a486cd
2 changed files with 41 additions and 3 deletions

34
.github/workflows/build_ps3.yml vendored Normal file
View File

@ -0,0 +1,34 @@
name: Build latest (PS3)
on: [push]
concurrency:
group: ${{ github.ref }}-ps3
cancel-in-progress: true
jobs:
build-PS3:
if: github.ref_name == github.event.repository.default_branch
runs-on: ubuntu-latest
container:
image: akusiroyo/ps3sdk:latest
steps:
- uses: actions/checkout@v3
- name: Compile PS3 build
id: compile
run: |
pacman -S make --noconfirm
export PSL1GHT=/usr/local/ps3dev
export PS3DEV=/usr/local/ps3dev
make ps3
- uses: ./.github/actions/notify_failure
if: ${{ always() && steps.compile.outcome == 'failure' }}
with:
NOTIFY_MESSAGE: 'Failed to compile PS3 build'
WEBHOOK_URL: '${{ secrets.WEBHOOK_URL }}'
- uses: ./.github/actions/upload_build
if: ${{ always() && steps.compile.outcome == 'success' }}
with:
SOURCE_FILE: 'ClassiCube-ps3.self'
DEST_NAME: 'ClassiCube-ps3.self'

View File

@ -346,6 +346,7 @@ void Gfx_DepthOnlyRendering(cc_bool depthOnly) {
*#########################################################################################################################*/
void Gfx_CalcOrthoMatrix(struct Matrix* matrix, float width, float height, float zNear, float zFar) {
// Same as Direct3D9
// TODO: should it be like OpenGL? ???
*matrix = Matrix_Identity;
matrix->row1.X = 2.0f / width;
@ -363,6 +364,7 @@ void Gfx_CalcPerspectiveMatrix(struct Matrix* matrix, float fov, float aspect, f
float c = (float)Cotangent(0.5f * fov);
// Same as Direct3D9
// TODO: should it be like OpenGL? ???
*matrix = Matrix_Identity;
matrix->row1.X = c / aspect;
@ -401,10 +403,12 @@ static void ResetFrameState(void) {
rsxSetBlendEquation(context, GCM_FUNC_ADD, GCM_FUNC_ADD);
rsxSetColorMaskMrt(context, 0);
rsxSetDepthFunc(context, GCM_LEQUAL);
rsxSetClearColor(context, clearColor);
rsxSetClearDepthStencil(context, 0xFFFFFFFF);
rsxSetFrontFace(context, GCM_FRONTFACE_CCW);
rsxSetDepthFunc(context, GCM_LEQUAL);
rsxSetDepthWriteEnable(context, true);
rsxSetDepthTestEnable(context, true);
rsxSetUserClipPlaneControl(context, GCM_USER_CLIP_PLANE_DISABLE,
GCM_USER_CLIP_PLANE_DISABLE,