From 4394d911c23be4eb28bfaa06ce7a66945a11ba2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emmanuel=20Beno=C3=AEt?= Date: Sun, 24 Dec 2017 11:39:41 +0100 Subject: [PATCH] Script - Fixed (image) command --- ui-opemu.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 ) );