3 Replies Latest reply on Mar 19, 2009 4:03 PM by ryta1203

    ISA and CAL

    ryta1203

      How is ISA used in CAL?

      I have used the output from AMUDISASM and have added the " .....\n" to every line and I get parser errors when attempting to compile. Any ideas?

        • ISA and CAL
          ryta1203

          Any clue?

          It would just be great if ATI could throw together a sample of using ISA for download, the docs spent ~1 paragraph on this.

            • ISA and CAL
              ryta1203

              So here is my ISA kernel I am trying to use in CAL:

               

               

               

               

              "ShaderType = 1\n"

              "TargetChip = w\n"

              ";SC Dep components\n"

              "NumClauseTemps = 4\n"

              "; -------- Disassembly --------------------\n"

              "00 TEX: ADDR(48) CNT(1) VALID_PIX\n"

              " 0 SAMPLE R0.x___, R0.xyxx, t0, s0 UNNORM(XYZW)\n"

               

               

               

              "01 ALU: ADDR(32) CNT(2) \n"

              " 1 x: MUL_e R0.x, R0.x, R0.x\n"

               

               

               

              " y: MOV R0.y, 0.0f\n"

               

               

               

              "02 EXP_DONE: PIX0, R0.xyyy\n"

              "END_OF_PROGRAM\n"

              "; ----------------- PS Data ------------------------\n"

              "; Input Semantic Mappings\n"

              "IN R0 = position0 V0.xxxx DefaultVal={0,0,0,0}\n"

              "NumTexStages = 0\n"

              "TexCubeMaskBits = 0x00000000\n"

              "GprPoolSize = 0\n"

              "CodeLen = 400;Bytes\n"

              "PGM_END_CF = 0; words(64 bit)\n"

              "PGM_END_ALU = 0; words(64 bit)\n"

              "PGM_END_FETCH = 0; words(64 bit)\n"

              "MaxScratchRegsNeeded = 0\n"

              "; texResourceUsage[0] = 0x00000000\n"

              "; texResourceUsage[1] = 0x00000000\n"

              "; texResourceUsage[2] = 0x00000000\n"

              "; texResourceUsage[3] = 0x00000000\n"

              "; fetch4ResourceUsage[0] = 0x00000000\n"

              "; fetch4ResourceUsage[1] = 0x00000000\n"

              "; fetch4ResourceUsage[2] = 0x00000000\n"

              "; fetch4ResourceUsage[3] = 0x00000000\n"

              "; texSamplerUsage = 0x00000000\n"

              "; constBufUsage = 0x00000000\n"

              "ResourcesAffectAlphaOutput[0] = 0x00000000\n"

              "ResourcesAffectAlphaOutput[1] = 0x00000000\n"

              "ResourcesAffectAlphaOutput[2] = 0x00000000\n"

              "ResourcesAffectAlphaOutput[3] = 0x00000000\n"

              ";SQ_PGM_RESOURCES = 0x72000000\n"

              "SQ_PGM_RESOURCES:NUM_GPRS = 0\n"

              "SQ_PGM_RESOURCES:STACK_SIZE = 0\n"

              "SQ_PRM_RESOURCES:FETCH_CACHE_LINES = 2\n"

              "SQ_PRM_RESOURCESRIME_CACHE_ENABLE = 1\n"

              "; SPI_PS_IN_CONTROL_0 = 0x00000000\n"

              "SPI0:NUM_INTERP = 0\n"

              "SPI0OSITION_ENA = 0\n"

              "SPI0OSITION_CENTROID = 0\n"

              "SPI0OSITION_ADDR = 0\n"

              "SPI0ARAM_GEN = 0\n"

              "SPI0ARAM_GEN_ADDR = 0\n"

              "SPI0:BARYC_SAMPLE_CNTL = 0\n"

              "SPI0ERSP_GRADIENT_ENA = 0\n"

              "SPI0:LINEAR_GRADIENT_ENA = 0\n"

              "SPI0OSITION_SAMPLE = 0\n"

              "SPI0:BARYC_SAMPLE_ENA = 0\n"

              ";SPI_PS_IN_CONTROL_1 = 0x00000000\n"

              "SPI1:GEN_INDEX_PIX = 0\n"

              "SPI1:FIXED_PT_POSITION_ENA = 0\n"

              "SPI1:FIXED_PT_POSITION_ADDR = 0\n"

              "SPI1:FRONT_FACE_ENA = 0\n"

              "SPI1:FRONT_FACE_ADDR = 0\n"

              "SPI1:FRONT_FACE_CHAN = 0\n"

              "SPI1:FOG_ADDR = 0\n"

              "SPI1:GEN_INDEX_PIX_ADDR = 0\n"

              "; SPI_INPUT_Z\n"

              "SPIROVIDE_Z_TO_SPI = 0\n"

              "; CB_SHADER_MASK = 0x00000000\n"

              "CB_SHADER_CONTROL:bitmap = 00000000\n"

              "; DB_SHADER_CONTROL = 0x00000200\n"

              "DB:Z_EXPORT_ENABLE = 0\n"

              "DB:STENCIL_REF_EXPORT_ENABLE = 0\n"

              "DB:MASK_EXPORT_ENABLE = 0\n"

              "DB:ALPHA_TO_MASK_DISABLE = 0\n"

              "DB:Z_ORDER = 0\n"

              "DB:KILL_ENABLE = 0\n"

              "; SQ_PGM_EXPORTS_PS\n"

              "SQ_PGM_EXPORTS_PSS_EXPORT_MODE = 0x00000000 ; (0 color)\n"

              "; bHasFogMerge = 0x00000000\n"

               

              ;

               

              This is producing parser errors. The kernel call is here:



               

               

              if(calclAssembleObject(&obj, CAL_PROGRAM_TYPE_PS, ILkernel, info.target) != CAL_RESULT_OK)

              fprintf(stderr,



              "Error compiling, string is %s\n", calclGetErrorString());

              error string is Parser errors.

               

              The ISA kernel above was generated this way:

              SKA Brook+ -> ISA

              ISA assembled using AMUASM

              IMAGE disassembled using AMUDISASM

              Then copy and pasted and added ".....\n"

               

              As far as the limited documentation goes, this looks like it should work but it does not, any ideas?

              Anyone from AMD comfortable enough to talk about using the ISA?????