Merge pull request #5 from abaire/fix/mismerged_handling_of_ilu_floats

Fix/mismerged handling of ilu floats
This commit is contained in:
Erik Abair 2022-06-24 23:18:29 -07:00 committed by GitHub
commit d5a7308809
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 41 additions and 4 deletions

37
.github/workflows/build.yml vendored Normal file
View File

@ -0,0 +1,37 @@
name: Build
on:
push:
branches:
- main
paths-ignore:
- '.github/**'
- '!.github/workflows/**'
pull_request:
paths-ignore:
- '.github/**'
- '!.github/workflows/**'
- 'README.md'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
submodules: recursive
- name: Install Dependencies
run: sudo apt-get update && sudo apt-get install -yq libboost-test-dev
- name: Build
run: |
mkdir build
cmake -Bbuild -S.
cmake --build build/ --target all
ls build
- name: Test Operations
run: build/operations_tests
- name: Test Disassembler
run: build/disassembler_tests
- name: Test Emulator
run: build/emulator_tests

View File

@ -16,7 +16,7 @@ option(nv2a_vsh_cpu_UNIT_TEST "Enable nv2a_vsh_cpu's various unit tests" ON)
if (nv2a_vsh_cpu_UNIT_TEST) if (nv2a_vsh_cpu_UNIT_TEST)
include(FindPkgConfig) include(FindPkgConfig)
find_package( find_package(
Boost 1.74 Boost 1.71
COMPONENTS COMPONENTS
unit_test_framework unit_test_framework
REQUIRED REQUIRED

View File

@ -146,7 +146,7 @@ static inline void apply(Nv2aVshExecutionState *state,
const Nv2aVshStep *step) { const Nv2aVshStep *step) {
float mac_inputs[3 * 4]; float mac_inputs[3 * 4];
float ilu_input[4]; float ilu_input[4];
prepare_inputs(mac_inputs, &ilu_input, state, step); prepare_inputs(mac_inputs, ilu_input, state, step);
if (step->mac.opcode) { if (step->mac.opcode) {
apply_operation(state, &step->mac, mac_inputs); apply_operation(state, &step->mac, mac_inputs);
@ -161,7 +161,7 @@ static inline void apply_track_context_writes(Nv2aVshExecutionState *state,
bool *context_dirty) { bool *context_dirty) {
float mac_inputs[3 * 4]; float mac_inputs[3 * 4];
float ilu_input[4]; float ilu_input[4];
prepare_inputs(mac_inputs, &ilu_input, state, step); prepare_inputs(mac_inputs, ilu_input, state, step);
if (step->mac.opcode) { if (step->mac.opcode) {
apply_operation(state, &step->mac, mac_inputs); apply_operation(state, &step->mac, mac_inputs);
@ -172,7 +172,7 @@ static inline void apply_track_context_writes(Nv2aVshExecutionState *state,
} }
} }
if (step->ilu.opcode) { if (step->ilu.opcode) {
apply_operation(state, &step->ilu, &ilu_input); apply_operation(state, &step->ilu, ilu_input);
if (step->ilu.outputs[0].type == NV2ART_CONTEXT) { if (step->ilu.outputs[0].type == NV2ART_CONTEXT) {
context_dirty[step->ilu.outputs[0].index] = true; context_dirty[step->ilu.outputs[0].index] = true;
} else if (step->ilu.outputs[1].type == NV2ART_CONTEXT) { } else if (step->ilu.outputs[1].type == NV2ART_CONTEXT) {