diff --git a/ui-opemu.cc b/ui-opemu.cc index 6885502..fa13f79 100644 --- a/ui-opemu.cc +++ b/ui-opemu.cc @@ -8,6 +8,7 @@ #include "ui-opemu.hh" #include "ui-profiling.hh" #include "ui-rendertarget.hh" +#include "ui-utilities.hh" using namespace ops; using namespace ebcl; @@ -666,7 +667,7 @@ void T_OpContext::run( ensureStack( instr , 3 + ( instr.args[ 1 ] ? 1 : 0 ) ); const auto ss( stack.size( ) ); - uint32_t texId = stack[ ss - 1 ].f , + uint32_t texId = stack[ ss - 1 ].u , unit = stack[ ss - 2 ].f , level = stack[ ss - 3 ].f , layer = ( instr.args[ 1 ] ? stack[ ss - 4 ].f : 0 ); @@ -685,7 +686,7 @@ void T_OpContext::run( glBindImageTexture( unit , texture.id( ) , level , instr.args[ 1 ] != 0 , layer , - AccessModes_[ instr.args[ 0 ] ] , + AccessModes_[ instr.args[ 0 ] - 1 ] , texture.internalFormat( ) ); stack.resize( ss - 3 - ( instr.args[ 1 ] ? 1 : 0 ) );