Script - Fixed (image) command

This commit is contained in:
Emmanuel BENOîT 2017-12-24 11:39:41 +01:00
parent 7db090fb5d
commit 4394d911c2

View file

@ -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 ) );